Public report of hyperledger-firefly/firefly, 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, 07:39 UTC Β· Survey ID cd_617c33f477b4443686873187876d6c2f

hyperledger-firefly/firefly

Measured 17 November 2026, 07:38 UTC, at code version 3b975f8

First survey, so nothing to compare with yet Knowledge freshness: not measured

Knowledge freshness is not measured: Freshness signal contradicted by repo activity.

CAI score 57.3out 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 medium codebase: 54,463 lines of product code in 8 projects, tests not counted Β· Estimated rebuild effort: about 1.0 person-years Β· Weakest lens: Security and Compliance, 41.3

Findings by how serious they are

122 critical 605 serious 66 minor

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

This survey was produced by

Assert small markCanine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
17 November 2026, 07:38 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 β–Έ

56of 56 dimensions measured by tools.
761of 793 findings point to an exact file and line, so you can open each one in the code. The other 32 concern the repository as a whole, such as missing documentation.
56dimensions across 6 lenses, read from 54,463 lines of product code in 8 projects.
Chapters

Executive summary

hyperledger-firefly/firefly is rated At risk because critical security findings are open. Its score is held back because 40 of the dependencies have a known vulnerability and it has passwords or keys in the code's history. It scores 57.3 out of 100, which the At risk rating leaves unchanged.

Security and Compliance, at 41.3, is the weakest lens and counts most in the score. The best first steps are replacing the eight passwords or keys found in the code's history and fixing the runtime or framework that no longer gets security updates, each worth about 2.3 points. Raising Security and Compliance to 70 would lift the score to about 69.8.

Forty-eight known security holes in the packages the code depends on can be used by attackers. Thirty-six pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with, and nineteen passwords or keys are open to anyone who can read the repository. Updating the vulnerable packages, pinning each tool to an exact version and replacing each exposed password or key would close these risks. Reading outside data into plain values would fix the nine places where outside data is turned straight into objects, and limiting each secret to its own step would deal with the three secrets exposed to more of the pipeline than needed.

The product code is 54,463 lines, about €150,000 to rebuild.

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

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

If Security and Compliance rose from 41.3 to 70, the lowest score rated Strong, the score would rise from 57.3 to about 69.8.

Code composition: what the lines of code are
Product code 38%Tests 62%
Rebuild cost: about €150,000 Β· Estimate
Cost to rebuild€49,000 to €250,000, for 822 to 2,609 hours of work, about 1.0 person-years for 1 to 2 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.
SizeMedium: 54,463 lines of product code
What it is notNot a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.

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

Top priorities

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

1
Resolve the 8 REDACTED finding(s) in Secrets (history) β€” start with REDACTED (4), REDACTED (2), REDACTED.
Raises the score by about 2.3 points Β· Low effort Β· Secrets (history)
2
Resolve the 1 End-of-life runtime finding(s) in Platform End-of-Life β€” start with .ruby-version.
Raises the score by about 2.3 points Β· Low effort Β· Platform End-of-Life
3
Resolve the 1 No ADRs found finding(s) in ADR Quality β€” start with main.go.
Raises the score by about 1.7 points Β· Low effort Β· ADR Quality

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 €150,000 to build again, about 1.0 person-years of work. Its weakest lens is Security and Compliance, at 41.3 (Weak). Security and Compliance is about how well the product is protected, and how it handles personal data. Because the weakest lens counts most in the score, work on Security and Compliance also moves the score most.
Based on: the rebuild estimate · the Security and Compliance grade · how much each lens counts
What to do: Start with the Security and Compliance actions in Top priorities.
If you do one thing first Β· First action
Resolve the 8 REDACTED finding(s) in Secrets (history). Of all the actions in this report, it raises the score most for the work it takes: about 2.3 points for low effort, because it clears the 8 Secrets (history) findings. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year Β· Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 5.9 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 5% to 12% on every change. The history of the code shows how much it changes: about 3,434 lines over the last 90 days, which is about 13,927 lines a year. At that pace, the extra work comes to an estimated 1.8 to 10.7 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 :kat-contracts :kat-contracts :kat-flows :kat-flows @hyperledger/firefly-contracts firefly-contracts github.com/hyperledger-firefly/firefly firefly github.com/hyperledger-firefly/firefly/chaincode-go chaincode-go github.com/hyperledger-firefly/firefly/custompin_sample custompin_sample kaleido-corda-kat kaleido-corda-kat sample-custompin-contract sample-custompin-contract sample-custompin-contract->@hyperledger/firefly-contracts

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.

71 modules, with 234 dependencies between them. Every module uses only modules listed above it, so there are no loops.

The table shows the 40 modules with the most connections; 31 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 com/hyperledger-firefly/firefly/internal/cache2 com/hyperledger-firefly/firefly/pkg/core3 com/hyperledger-firefly/firefly/internal/metrics4 com/hyperledger-firefly/firefly/pkg/database5 com/hyperledger-firefly/firefly/pkg/events6 com/hyperledger-firefly/firefly/pkg/identity7 com/hyperledger-firefly/firefly/pkg/sharedstorage8 com/hyperledger-firefly/firefly/internal/database/sqlcommon9 com/hyperledger-firefly/firefly/internal/events/system10 com/hyperledger-firefly/firefly/internal/events/websockets11 com/hyperledger-firefly/firefly/pkg/blockchain12 com/hyperledger-firefly/firefly/pkg/dataexchange13 com/hyperledger-firefly/firefly/internal/blockchain/common14 com/hyperledger-firefly/firefly/internal/data15 com/hyperledger-firefly/firefly/internal/dataexchange/ffdx16 com/hyperledger-firefly/firefly/pkg/tokens17 com/hyperledger-firefly/firefly/internal/blockchain/cardano18 com/hyperledger-firefly/firefly/internal/blockchain/ethereum19 com/hyperledger-firefly/firefly/internal/blockchain/fabric20 com/hyperledger-firefly/firefly/internal/blockchain/tezos21 com/hyperledger-firefly/firefly/internal/tokens/fftokens22 com/hyperledger-firefly/firefly/internal/txcommon23 com/hyperledger-firefly/firefly/internal/operations24 com/hyperledger-firefly/firefly/internal/multiparty25 com/hyperledger-firefly/firefly/internal/shareddownload26 com/hyperledger-firefly/firefly/internal/syncasync27 com/hyperledger-firefly/firefly/internal/txwriter28 com/hyperledger-firefly/firefly/internal/identity29 com/hyperledger-firefly/firefly/internal/batch30 com/hyperledger-firefly/firefly/internal/broadcast31 com/hyperledger-firefly/firefly/internal/privatemessaging32 com/hyperledger-firefly/firefly/internal/contracts33 com/hyperledger-firefly/firefly/internal/assets34 com/hyperledger-firefly/firefly/internal/definitions35 com/hyperledger-firefly/firefly/internal/events36 com/hyperledger-firefly/firefly/internal/networkmap37 com/hyperledger-firefly/firefly/internal/orchestrator38 com/hyperledger-firefly/firefly/internal/namespace39 com/hyperledger-firefly/firefly/internal/apiserver40 com/hyperledger-firefly/firefly/cmd
1 com/hyperledger-firefly/firefly/internal/cache
2 com/hyperledger-firefly/firefly/pkg/core
3 com/hyperledger-firefly/firefly/internal/metrics4
4 com/hyperledger-firefly/firefly/pkg/database34
5 com/hyperledger-firefly/firefly/pkg/events9
6 com/hyperledger-firefly/firefly/pkg/identity1
7 com/hyperledger-firefly/firefly/pkg/sharedstorage1
8 com/hyperledger-firefly/firefly/internal/database/sqlcommon3338
9 com/hyperledger-firefly/firefly/internal/events/system54
10 com/hyperledger-firefly/firefly/internal/events/websockets194
11 com/hyperledger-firefly/firefly/pkg/blockchain171
12 com/hyperledger-firefly/firefly/pkg/dataexchange41
13 com/hyperledger-firefly/firefly/internal/blockchain/common149
14 com/hyperledger-firefly/firefly/internal/data23942
15 com/hyperledger-firefly/firefly/internal/dataexchange/ffdx418
16 com/hyperledger-firefly/firefly/pkg/tokens73
17 com/hyperledger-firefly/firefly/internal/blockchain/cardano14173
18 com/hyperledger-firefly/firefly/internal/blockchain/ethereum64194
19 com/hyperledger-firefly/firefly/internal/blockchain/fabric44184
20 com/hyperledger-firefly/firefly/internal/blockchain/tezos64182
21 com/hyperledger-firefly/firefly/internal/tokens/fftokens717
22 com/hyperledger-firefly/firefly/internal/txcommon21722
23 com/hyperledger-firefly/firefly/internal/operations22353
24 com/hyperledger-firefly/firefly/internal/multiparty1522623
25 com/hyperledger-firefly/firefly/internal/shareddownload82223
26 com/hyperledger-firefly/firefly/internal/syncasync152222
27 com/hyperledger-firefly/firefly/internal/txwriter9222
28 com/hyperledger-firefly/firefly/internal/identity26242
29 com/hyperledger-firefly/firefly/internal/batch103332
30 com/hyperledger-firefly/firefly/internal/broadcast26222223232522
31 com/hyperledger-firefly/firefly/internal/privatemessaging2372322432532
32 com/hyperledger-firefly/firefly/internal/contracts22822223322222
33 com/hyperledger-firefly/firefly/internal/assets2412222362222
34 com/hyperledger-firefly/firefly/internal/definitions35322313233
35 com/hyperledger-firefly/firefly/internal/events36431092394810522234625
36 com/hyperledger-firefly/firefly/internal/networkmap11222222
37 com/hyperledger-firefly/firefly/internal/orchestrator152191123527123211222222322
38 com/hyperledger-firefly/firefly/internal/namespace18161111113
39 com/hyperledger-firefly/firefly/internal/apiserver3124
40 com/hyperledger-firefly/firefly/cmd11
Uses a module listed above itPart of a loopThe module itself
1 com/hyperledger-firefly/firefly/internal/cache2 com/hyperledger-firefly/firefly/pkg/core3 com/hyperledger-firefly/firefly/internal/metrics4 com/hyperledger-firefly/firefly/pkg/database5 com/hyperledger-firefly/firefly/pkg/events6 com/hyperledger-firefly/firefly/pkg/identity7 com/hyperledger-firefly/firefly/pkg/sharedstorage8 com/hyperledger-firefly/firefly/internal/database/sqlcommon9 com/hyperledger-firefly/firefly/internal/events/system10 com/hyperledger-firefly/firefly/internal/events/websockets11 com/hyperledger-firefly/firefly/pkg/blockchain12 com/hyperledger-firefly/firefly/pkg/dataexchange13 com/hyperledger-firefly/firefly/internal/blockchain/common14 com/hyperledger-firefly/firefly/internal/data15 com/hyperledger-firefly/firefly/internal/dataexchange/ffdx16 com/hyperledger-firefly/firefly/pkg/tokens17 com/hyperledger-firefly/firefly/internal/blockchain/cardano18 com/hyperledger-firefly/firefly/internal/blockchain/ethereum19 com/hyperledger-firefly/firefly/internal/blockchain/fabric20 com/hyperledger-firefly/firefly/internal/blockchain/tezos21 com/hyperledger-firefly/firefly/internal/tokens/fftokens22 com/hyperledger-firefly/firefly/internal/txcommon23 com/hyperledger-firefly/firefly/internal/operations24 com/hyperledger-firefly/firefly/internal/multiparty25 com/hyperledger-firefly/firefly/internal/shareddownload26 com/hyperledger-firefly/firefly/internal/syncasync27 com/hyperledger-firefly/firefly/internal/txwriter28 com/hyperledger-firefly/firefly/internal/identity29 com/hyperledger-firefly/firefly/internal/batch30 com/hyperledger-firefly/firefly/internal/broadcast31 com/hyperledger-firefly/firefly/internal/privatemessaging32 com/hyperledger-firefly/firefly/internal/contracts33 com/hyperledger-firefly/firefly/internal/assets34 com/hyperledger-firefly/firefly/internal/definitions35 com/hyperledger-firefly/firefly/internal/events36 com/hyperledger-firefly/firefly/internal/networkmap37 com/hyperledger-firefly/firefly/internal/orchestrator38 com/hyperledger-firefly/firefly/internal/namespace39 com/hyperledger-firefly/firefly/internal/apiserver40 com/hyperledger-firefly/firefly/cmdcom/hyperledger-firefly/firefly/internal/cache1com/hyperledger-firefly/firefly/pkg/core2com/hyperledger-firefly/firefly/internal/metrics3com/hyperledger-firefly/firefly/pkg/database4com/hyperledger-firefly/firefly/pkg/events5com/hyperledger-firefly/firefly/pkg/identity6com/hyperledger-firefly/firefly/pkg/sharedstorage7com/hyperledger-firefly/firefly/internal/database/sqlcommon8com/hyperledger-firefly/firefly/internal/events/system9com/hyperledger-firefly/firefly/internal/events/websockets10com/hyperledger-firefly/firefly/pkg/blockchain11com/hyperledger-firefly/firefly/pkg/dataexchange12com/hyperledger-firefly/firefly/internal/blockchain/common13com/hyperledger-firefly/firefly/internal/data14com/hyperledger-firefly/firefly/internal/dataexchange/ffdx15com/hyperledger-firefly/firefly/pkg/tokens16com/hyperledger-firefly/firefly/internal/blockchain/cardano17com/hyperledger-firefly/firefly/internal/blockchain/ethereum18com/hyperledger-firefly/firefly/internal/blockchain/fabric19com/hyperledger-firefly/firefly/internal/blockchain/tezos20com/hyperledger-firefly/firefly/internal/tokens/fftokens21com/hyperledger-firefly/firefly/internal/txcommon22com/hyperledger-firefly/firefly/internal/operations23com/hyperledger-firefly/firefly/internal/multiparty24com/hyperledger-firefly/firefly/internal/shareddownload25com/hyperledger-firefly/firefly/internal/syncasync26com/hyperledger-firefly/firefly/internal/txwriter27com/hyperledger-firefly/firefly/internal/identity28com/hyperledger-firefly/firefly/internal/batch29com/hyperledger-firefly/firefly/internal/broadcast30com/hyperledger-firefly/firefly/internal/privatemessaging31com/hyperledger-firefly/firefly/internal/contracts32com/hyperledger-firefly/firefly/internal/assets33com/hyperledger-firefly/firefly/internal/definitions34com/hyperledger-firefly/firefly/internal/events35com/hyperledger-firefly/firefly/internal/networkmap36com/hyperledger-firefly/firefly/internal/orchestrator37com/hyperledger-firefly/firefly/internal/namespace38com/hyperledger-firefly/firefly/internal/apiserver39com/hyperledger-firefly/firefly/cmd4043491133385419417141149239424187314173641944418464182717217222235315226238222315222292222624210333226222223232522237232243253222822223322222241222236222235322313233364310923948105222346251122222215219112352712321122222232218161111113312411+31 more modules (most-connected shown)

At a glance β€” Code Health Β· 66.9 Β· Adequate Β· gated by D4 Β·

At a glance β€” Architecture Β· 95.3 Β· Exemplary Β·

At a glance β€” Maturity Β· 71.8 Β· Strong Β·

At a glance β€” Readiness Β· 68.8 Β· Adequate Β· gated by P7 Β·

At a glance β€” Security Β· 41.3 Β· Weak Β· gated by D28, D29, D36 Β·

At a glance β€” Performance Β· 88.6 Β· Strong Β·

Security & Compliance β€” OWASP Top-10 mapping

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

OWASP categoryFindingsSeverity
A03:2025 β€” Software Supply Chain Failures85High / Critical
A05:2025 β€” Injection77High / Critical
A07:2025 β€” Authentication Failures20High / Critical
A02:2025 β€” Security Misconfiguration11High / Critical

Roadmap

Top priorities: Resolve the 11 High secret finding(s) in Secrets (history) β€” start with REDACTED (4), REDACTED (2), REDACTED (2); Resolve the 40 High CVE finding(s) in Dependency Vulnerabilities β€” start with REDACTED (40); Resolve the 8 REDACTED finding(s) in Secrets (history) β€” start with REDACTED (4), REDACTED (2), REDACTED.

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

Do thisHelpsEffortDimension
Resolve the 8 REDACTED finding(s) in Secrets (history) β€” start with REDACTED (4), REDACTED (2), REDACTED.+2.3 ptsLowSecrets (history)
Resolve the 1 End-of-life runtime finding(s) in Platform End-of-Life β€” start with .ruby-version.+2.3 ptsLowPlatform End-of-Life
Resolve the 1 No ADRs found finding(s) in ADR Quality β€” start with main.go.+1.7 ptsLowADR Quality
Resolve the 2 Deprecated module finding(s) in Dependency Hygiene.+1.6 ptsLowDependency Hygiene
Resolve the 11 High secret finding(s) in Secrets (history) β€” start with REDACTED (4), REDACTED (2), REDACTED (2).+3.2 ptsMediumSecrets (history)
Resolve the 40 High CVE finding(s) in Dependency Vulnerabilities β€” start with REDACTED (40).+3.0 ptsMediumDependency Vulnerabilities
Resolve the 9 REDACTED finding(s) in Static Analysis (SAST) β€” start with REDACTED (2), REDACTED (2), REDACTED (2).+1.2 ptsLowStatic Analysis (SAST)
Resolve the 3 REDACTED finding(s) in Static Analysis (SAST) β€” start with REDACTED, REDACTED, REDACTED.+1.2 ptsLowStatic Analysis (SAST)

File quality

Per-file score 0–10 β€” a quality signature. Of 202 files carrying findings, judged against the Production bar: 5% slop Β· 56% mixed Β· 39% near-clean.

FileScoreBandWorst signal
REDACTED0.0SlopStatic Analysis (SAST): High: REDACTED
REDACTED0.0SlopStatic Analysis (SAST): High: REDACTED
REDACTED0.0SlopStatic Analysis (SAST): High: REDACTED
REDACTED0.0SlopDependency Vulnerabilities: Critical CVE: REDACTED
REDACTED0.0SlopDependency Vulnerabilities: Critical CVE: REDACTED
REDACTED0.1SlopIaC & Container Security: High IaC: REDACTED
REDACTED2.4SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.9SlopSecrets (history): REDACTED: REDACTED
REDACTED3.0SlopStatic Analysis (SAST): High: REDACTED
REDACTED3.7SlopStatic Analysis (SAST): High: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.4MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.4MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.5MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.8MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.8MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED5.6MixedDependency Vulnerabilities: Medium CVE: REDACTED
REDACTED5.8MixedSecrets (history): REDACTED: REDACTED
REDACTED5.8MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.8MixedStatic 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 β€” 122

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 β€” 605

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 β€” 66

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

Could not be resolved β€” 14

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

Methodology & how to trust this report

This survey is a deep, periodic assessment β€” run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. All 56 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.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 β€” 56 dimensions across the health lenses
D1D2D3D4D5D6D8D11D12D13D14D15D16D17D19D20D21D22D23D26D27D28D29D30D31D35D36D37D43D44AX10AX2AX3AX4AX6AX8M1M2M3M4P1P2P3P4P6P7P8PF1PF3X2X26X27X28X3X4X5

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, 761 of 793 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 01a1e871-aea4-7cf1-b0e1-12a80eefe27b.

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.

  • D14 License Compliance β€” measured, with a gap in what it reached β€” We measured this, but not all of it. What we did not reach is a gap on our side β€” a collector, parser or image we have not built yet β€” so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository declares a Go module (REDACTED/go.sum), but the licence verdict published here was taken over its JVM dependencies. Nothing was read about its Go dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
  • D14 License Compliance β€” measured, with a gap in what it reached β€” We measured this, but not all of it. What we did not reach is a gap on our side β€” a collector, parser or image we have not built yet β€” so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository declares a Python pyproject.toml/requirements.txt (pip/uv/Poetry), but the licence verdict published here was taken over its JVM dependencies. Nothing was read about its Python dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
  • D19 Documentation Quality β€” measured, with a gap in what it reached β€” We measured this, but not all of it. What we did not reach is a gap on our side β€” a collector, parser or image we have not built yet β€” so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each ecosystem's manifests (what makes a folder runnable or a published package) need their own proof before D19 judges its units. Until then those folders' READMEs are judged only as documents (boilerplate, structure), never counted as complete.
  • 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.
  • D24 Comment Value β€” not measured this run β€” We could not measure this here. That is a gap on our side β€” a collector, parser or image we have not built yet β€” and it is neither a defect in this repository nor evidence that the check would have passed. Each source language's comment syntax, and the code a comment annotates in it, needs its own proof before D24 judges it. Until then those comments are left unread, not counted as clean.
  • D34 Knowledge Freshness β€” 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. File-level freshness contradicts repo activity: 36 commits in the last 90 days, yet 189 of 195 significant files carry no living knowledge. Those two readings cannot both be true, so the per-file recency signal is treated as unreliable here and freshness is not scored for this run.
  • AXB2 Runtime readiness β€” not measured this run β€” We could not measure this here. That is a gap on our side β€” a collector, parser or image we have not built yet β€” and it is neither a defect in this repository nor evidence that the check would have passed. The image build failed, and its output does not match a cause we recognise. (rule: unrecognised-build-failure). The renderer reported: docker build failed (exit 1) β€” #1 WARN: InvalidDefaultArgInFrom: Default value for ARG $BASE_TAG results in empty or invalid base image name (line 74) #1 DONE 0.0s REDACTED:14 -------------------- 12 | 13 | # Firefly Builder 14 | >>> FROM $FIREFLY_BUILDER_TAG AS firefly-builder 15 | ARG BUILD_VERSION 16 | ARG GIT_REF -------------------- ERROR: failed to solve: base name ($FIREFLY_BUILDER_TAG) should not be blank; likely cause (not identified): the image build failed, and its output does not match a cause we recognise; runtime evidence skipped.
  • 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 REDACTED (REDACTED). docker build failed (exit 1) β€” #1 WARN: InvalidDefaultArgInFrom: Default value for ARG $BASE_TAG results in empty or invalid base image name (line 74) #1 DONE 0.0s REDACTED:14 -------------------- 12 | 13 | # Firefly Builder 14 | >>> FROM $FIREFLY_BUILDER_TAG AS firefly-builder 15 | ARG BUILD_VERSION 16 | ARG GIT_REF -------------------- ERROR: failed to solve: base name ($FIREFLY_BUILDER_TAG) should not be blank; likely cause (not identified): the image build failed, and its output does not match a cause we recognise; 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.
  • GD1 Unfinished & placeholder code β€” not measured this run β€” We could not measure this here. That is a gap on our side β€” a collector, parser or image we have not built yet β€” and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, F#, JavaScript/TypeScript, Dart, Ruby, Scala, Rust and Java source only, and this repository's Go, solidity is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach β€” not a finding that the repository is free of what this check looks for.
  • IC1 Incompleteness & stubs β€” not measured this run β€” We could not measure this here. That is a gap on our side β€” a collector, parser or image we have not built yet β€” and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, JavaScript/TypeScript, Java, Dart, Ruby, Scala and Rust source only, and this repository's Go, solidity is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach β€” not a finding that the repository is free of what this check looks for.
  • M4 Documentation accuracy β€” measured, with a gap in what it reached β€” We measured this, but not all of it. What we did not reach is a gap on our side β€” a collector, parser or image we have not built yet β€” so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9), and artefact counts an order of magnitude off. Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
  • S1 Web-Security Posture β€” not measured this run β€” We could not measure this here. That is a gap on our side β€” a collector, parser or image we have not built yet β€” and it is neither a defect in this repository nor evidence that the check would have passed. These web-security controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach β€” not a finding that the repository lacks web-security controls.
  • X1 Async correctness β€” not measured this run β€” We could not measure this here. That is a gap on our side β€” a collector, parser or image we have not built yet β€” and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach β€” not a finding about this repository.
  • X16 Unfloored truncation loop β€” not measured this run β€” We could not measure this here. That is a gap on our side β€” a collector, parser or image we have not built yet β€” and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach β€” not a finding about this repository.
  • 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. 20 further occurrence(s) are not listed individually; the score already reflects all 60.

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

Limitations & what we did not check

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

Per-dimension blind spots

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

  • D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically β€” it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
  • D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
  • D3 God Classes: "God class" is sized by members and responsibilities visible in the type β€” a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module β€” one class/IIFE β€” earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
  • D4 Code Duplication: Duplication is token-similarity β€” an in-process token-stream comparison over sliding windows, with type-aware normalization β€” so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED β€” its repetition is the tool's, not the team's β€” so the score reflects hand-written duplication only.
  • D5 Coupling: Coupling is measured between projects/assemblies β€” runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
  • D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic β€” it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
  • D8 Code Coverage: Coverage is measured by building and running the test suite inside our isolated image β€” the target repo is never modified, and nothing on your systems runs. So coverage exists only when the suite builds and runs within the inline time budget; one that needs external services, can't build, or exceeds the budget yields no coverage (D8 then degrades to not-measured, not a low score). Line coverage also says nothing about assertion quality.
  • D11 Test Reliability: Flakiness is inferred from history/markers β€” we run the suite once (for coverage), not the repeated runs under varied conditions that reveal nondeterminism, so a flaky test never recorded as failing is invisible here.
  • 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").
  • D14 License Compliance: License compatibility is checked against declared package metadata and a policy β€” mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
  • D15 Churn × Complexity Hotspots: Churn hotspots come from git history β€” a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
  • D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension β€” pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
  • D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual β€” undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded β€” it is never the team's dead code to delete.
  • D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
  • D20 ADR Quality: ADR quality checks the structure of the decision records present: it cannot know about decisions made and never recorded, and it does not judge how well a record argues its case. Records in a language the section lexicon does not cover are not evaluated.
  • D21 Naming Consistency: Naming consistency compares each name with the convention its structural peers follow in this repository: it cannot tell whether a consistently used name is a good one, and languages other than C# and TypeScript are not measured.
  • 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.
  • D23 Boundary Type-Coupling: Boundary leakage is detected from type references across detected contexts β€” leaks that flow through primitives, serialization or shared infrastructure may not surface as a typed reference.
  • D26 Project Cohesion: Project focus is sized from members/namespaces per project β€” a project that is broad by deliberate design reads the same as one that has sprawled.
  • D27 Navigability: Indirection/navigability is structural β€” it measures hops to follow a call, not whether that indirection buys real flexibility or just ceremony.
  • D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns β€” a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
  • D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) β€” it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
  • D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases β€” a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
  • 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.
  • 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.
  • 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.
  • M4 Documentation accuracy: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
  • P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see β€” only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
  • P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) β€” controls configured in external tooling, with no in-repo trace, cannot be credited.

Dimensions

D1 Β· Cyclomatic Complexity7.1 / 10Strongβœ“ 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 7.1 / 10 Β· rule-coverage 100% Β· ceiling Prevented

35 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was subscriptionManager.parseSubscriptionDef at 37.

subscriptionManager.parseSubscriptionDef (cyclomatic 37)internal/events/subscription_manager.go:267
namespaceManager.loadNamespace (cyclomatic 30)internal/namespace/manager.go:801
definitionHandler.handleIdentityClaim (cyclomatic 29)internal/definitions/handler_identity_claim.go:154
orchestrator.initManagers (cyclomatic 29)internal/orchestrator/orchestrator.go:485
orchestrator.GetTransactionStatus (cyclomatic 29)internal/orchestrator/txn_status.go:65

+ 30 more group(s) β€” more in Appendix A; the complete list is findings.md.

What to do

  1. Bring the 1 body over 30 down to 30 or less in Cyclomatic Complexity β€” start with subscriptionManager.parseSubscriptionDef (cyclomatic 37). β€” Refactoring it lifts Cyclomatic Complexity from 7.1 to about 7.3/10.

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

D2 Β· Cognitive Complexity4.6 / 10Weakβœ“ 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 4.6 / 10 Β· rule-coverage 100% Β· ceiling Prevented

104 method(s) exceeded the cognitive complexity threshold of 15; the worst was tezos.processSchemaEntry at 61.

tezos.processSchemaEntry (cognitive 61)REDACTED:152
subscriptionManager.parseSubscriptionDef (cognitive 56)internal/events/subscription_manager.go:267
eventManager.persistBatchContent (cognitive 55)internal/events/persist_batch.go:255
eventDispatcher.deliverEvents (cognitive 50)internal/events/event_dispatcher.go:333
orchestrator.initManagers (cognitive 48)internal/orchestrator/orchestrator.go:485

+ 99 more group(s) β€” more in Appendix A; the complete list is findings.md.

What to do

  1. Bring the 19 bodies over 30 down to 30 or less in Cognitive Complexity β€” start with tezos.processSchemaEntry (cognitive 61), subscriptionManager.parseSubscriptionDef (cognitive 56), eventManager.persistBatchContent (cognitive 55). β€” 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 19 together lifts Cognitive Complexity from 4.6 to about 6.3/10, projected with the scoring formula itself and assuming each lands exactly at 30; a cleaner split scores higher.

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

D3 Β· God Classes8.4 / 10Strongβœ“ Tool-verified

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

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

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 8.4 / 10 Β· rule-coverage 100% Β· ceiling Prevented

31 god class(es) detected.

TooManyMethods: SQLCommon Β· Γ—11internal/database/sqlcommon/sqlcommon.go:33
FileTooLong: contracts/manager.go Β· Γ—9internal/contracts/manager.go
ClassTooLong: contractManager Β· Γ—6internal/contracts/manager.go:91
MethodTooLong: orchestrator.GetTransactionStatus Β· Γ—3internal/orchestrator/txn_status.go:65
FunctionTooLong: reference.GenerateObjectsReferenceMarkdown Β· Γ—2REDACTED:51

What to do

  1. Resolve the 11 TooManyMethods finding(s) in God Classes β€” start with REDACTED (4), sqlcommon.go, orchestrator.go. β€” One of this dimension's main actionable groups (11 warning-level).
  2. Resolve the 9 FileTooLong finding(s) in God Classes β€” start with REDACTED (2), REDACTED, fftokens.go. β€” One of this dimension's main actionable groups (9 warning-level).
  3. Resolve the 6 ClassTooLong finding(s) in God Classes β€” start with REDACTED (2), REDACTED, REDACTED. β€” One of this dimension's main actionable groups (6 warning-level).

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

D4 Β· Code Duplication2.6 / 10Weakβœ“ Tool-verified

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

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

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 2.6 / 10 Β· rule-coverage 100% Β· ceiling Verified

151 duplicated block group(s) detected. 18.6 % of the production lines (10,122 of 54,463) are in a reported copy. A further 155 rows report members as variants of one another; the share counts each copied line once, however many rows cite it.

Duplicated block (8 lines × 2) Β· Γ—14internal/apiserver/route_get_identity_by_did.go:31
Edited copy of a member (17 corresponding lines) Β· Γ—12internal/apiserver/route_post_new_subscription.go:27
Duplicated block (7 lines × 2) Β· Γ—12ffconfig/migrate/migrations.go:114
Duplicated block (10 lines × 2) Β· Γ—11REDACTED:640
Duplicated block (9 lines × 2) Β· Γ—11internal/apiserver/route_get_contract_api_listeners.go:38

+ 130 more group(s) β€” more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 14 Duplicated block (8 lines × 2) finding(s) in Code Duplication β€” start with eventstream.go (3), REDACTED (2), data_query.go (2). β€” One of this dimension's main actionable groups (14 warning-level).
  2. Resolve the 12 Edited copy of a member (17 corresponding lines) finding(s) in Code Duplication β€” start with handler_contracts.go (2), REDACTED (2), route_post_new_subscription.go. β€” One of this dimension's main actionable groups (12 warning-level).
  3. Resolve the 12 Duplicated block (7 lines × 2) finding(s) in Code Duplication β€” start with eventstream.go (3), migrations.go, tokenbalance_sql.go. β€” One of this dimension's main actionable groups (12 warning-level).

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

D5 Β· Coupling10.0 / 10Exemplaryβœ“ Tool-verified

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

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

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

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 10.0 / 10 Β· rule-coverage 100% Β· ceiling Prevented

8 production modules (Gradle+npm+Go), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; edges a convention plugin adds from buildSrc or build-logic are not visible there; 1 module(s) off the main sequence, with abstractness counted on 6 of the 8 (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: @hyperledger/firefly-contracts

βœ“ On the Gold path β€” maintain.

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

D6 Β· Cohesion (LCOM4)9.6 / 10Stronggated by 3 serious findingsβœ“ Tool-verified

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

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

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

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 9.6 / 10 Β· rule-coverage 100% Β· ceiling Verified

3 of 82 classes have LCOM4 above 3.

Low cohesion: SQLCommon (LCOM4 50) Β· Γ—3internal/database/sqlcommon/sqlcommon.go:33

What to do

  1. Resolve the 3 Low cohesion finding(s) in Cohesion (LCOM4) β€” start with sqlcommon.go, REDACTED, REDACTED. β€” One of this dimension's main actionable groups (3 warning-level).

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

D8 Β· Code Coverage10.0 / 10Stronggated by 5 serious findingsβœ“ Tool-verified

What it measures: How much of the code is actually exercised by tests.

Method: Coverage from the analyzer's own run of the suite, computed per-file with structured exclusions for generated, trivial, and glue code. A coverage report found in the repository is never read. When the suite can't be built/run in-image, coverage is reported NOT-MEASURED (excluded from the score) with the precondition to make it measurable β€” never a LoC-ratio proxy folded in as if measured. Deterministic.

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 10.0 / 10 Β· rule-coverage 100% Β· ceiling Verified

Line coverage 99.5% β€” 5 file(s) below 50%. Measured from the Go suite (github.com/hyperledger-firefly/firefly: `go test -coverprofile -coverpkg=./...`, the 3 run(s) test reliability made; github.com/hyperledger-firefly/firefly/custompin_sample: `go test -coverprofile -coverpkg=./...`, the 3 run(s) test reliability made; github.com/hyperledger-firefly/firefly/chaincode-go: `go test -coverprofile -coverpkg=./...`, the 3 run(s) test reliability made). Taken over 3 runs of the suite: a line counts as covered only when every run executed it.

Low coverage: auditevents/main.go Β· Γ—5auditevents/main.go:1

What to do

  1. Resolve the 5 Low coverage finding(s) in Code Coverage β€” start with main.go (2), custompin.go, contract.go. β€” One of this dimension's main actionable groups (5 warning-level).

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

D11 Β· Test Reliability8.0 / 10Adequategated by 1 critical findingβœ“ Tool-verified

What it measures: Whether the tests pass reliably, with no flakiness.

Method: Suite re-run N times within tiered wall-clock budgets (unit to e2e); tests failing non-deterministically across runs flagged; guarded tests retried when #if guards detected.

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 8.0 / 10 Β· rule-coverage 100% Β· ceiling Verified

1 flaky across 1 measured tier(s). Go (3 modules): measured (1 flaky).

Flaky test: .::github.com/hyperledger-firefly/firefly/internal/batch.TestRewindForNewMessage

What to do

  1. Resolve the 1 Flaky test finding(s) in Test Reliability. β€” One of this dimension's main actionable groups (1 issue-level).

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

D12 Β· Dependency Hygiene8.0 7.6 / 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.6 / 10 Β· rule-coverage 95% Β· ceiling Verified

20 outdated, 2 author-deprecated direct Go module(s), 0 pinning or checksum defect(s). 38 of 38 direct requirement(s) were graded against proxy.golang.org (0 not served there, 2 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.

Deprecated module: github.com/golang/protobuf Β· Γ—2
Outdated: blockwatch.cc/tzgo Β· Γ—20

What to do

  1. Resolve the 2 Deprecated module finding(s) in Dependency Hygiene. β€” One of this dimension's main actionable groups (2 warning-level).

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

D13 Β· REDACTED Scanning10.0 / 10Exemplaryβ—‹ Nothing flagged

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

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

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 10.0 / 10 Β· rule-coverage 100% Β· ceiling Prevented

REDACTED scan ran and found no leaked secrets.

βœ“ On the Gold path β€” maintain.

Detailed fixes: d13_recommendation.md.

D14 Β· License Compliance10.0 / 10Exemplaryβ—‹ Nothing flagged

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

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

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 10.0 / 10 Β· rule-coverage 100% Β· ceiling Verified

0 of 1 declared JVM dependency artifact(s) use a banned license. Licences were resolved from the POMs Maven Central publishes, over the coordinates this repository's 3 Maven/Gradle manifest(s) declare with a version resolvable from the manifest itself β€” the same declaration-site closure this analysis reads for dependency currency. The JVM has no lockfile a checkout is guaranteed to carry, so this is deliberately NOT the transitive closure. β˜… COVERAGE OF THIS VERDICT: it grades this repository's JVM dependencies and nothing else. The repository also declares a Go module (REDACTED/go.sum) and a Python pyproject.toml/requirements.txt (pip/uv/Poetry), and the licences of those dependency graphs were NOT read by this pass β€” a gap in this engine's coverage, not a statement about them. So this result says the graded closure carries no banned licence; it does NOT say this repository's licensing is clear.

βœ“ On the Gold path β€” maintain.

Detailed fixes: d14_recommendation.md.

D15 Β· Churn × Complexity Hotspots10.0 / 10Exemplaryβœ“ 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 10.0 / 10 Β· rule-coverage 100% Β· ceiling Documented

No churn × complexity hotspots in the window.

βœ“ On the Gold path β€” maintain.

Detailed fixes: d15_recommendation.md.

D16 Β· Bus Factor10.0 / 10Exemplaryβœ“ Tool-verified

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

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

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 10.0 / 10 Β· rule-coverage 100% Β· ceiling Documented

No source file's living knowledge is concentrated in a single author. Counted over 193 of the 407 production source files in this repository: 212 are under the ~2,400-byte size floor this dimension measures over, and the remaining 2 have no attributable history left to measure.

βœ“ On the Gold path β€” maintain.

Detailed fixes: d16_recommendation.md.

D17 Β· Explicit Debt9.9 / 10Stronggated by 18 serious findingsβœ“ Tool-verified

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

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

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 9.9 / 10 Β· rule-coverage 100% Β· ceiling Prevented

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

TodoComment Β· Γ—18internal/reference/generate_reference_test.go:35

What to do

  1. Resolve the 18 TodoComment finding(s) in Explicit Debt β€” start with REDACTED (9), REDACTED (2), generate_reference_test.go. β€” One of this dimension's main actionable groups (18 warning-level).

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

D19 Β· Documentation Quality10.0 / 10Exemplaryβ—‹ Nothing flagged

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

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

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 10.0 / 10 Β· rule-coverage 100% Β· ceiling Documented

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

βœ“ On the Gold path β€” maintain.

Detailed fixes: d19_recommendation.md.

D20 Β· ADR Quality0.0 / 10Criticalβœ“ Tool-verified

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

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

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 0.0 / 10 Β· rule-coverage 100% Β· ceiling Documented

No architecture decision records were found.

No ADRs foundmain.go:17

What to do

  1. Resolve the 1 No ADRs found finding(s) in ADR Quality β€” start with main.go. β€” 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.1 / 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.1 / 10 Β· rule-coverage 100% Β· ceiling Verified

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

`MsgSequenceIDDidNotParseToInt` spells `Did` where 41 names in the project spell it `DID`internal/coremsgs/en_error_messages.go:305

What to do

  1. Resolve the 1 `MsgSequenceIDDidNotParseToInt` spells `Did` where 41 names in the… finding(s) in Naming Consistency β€” start with en_error_messages.go. β€” One of this dimension's main actionable groups (1 recommendation-level).

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

D22 Β· Internal API Consistency9.4 / 10Stronggated by 1 serious findingβœ“ 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.4 / 10 Β· rule-coverage 100% Β· ceiling Verified

1 API inconsistencies among 161 exposed members measured against a convention their peers follow.

`Plugin.SetHandler` takes no context.Context; its 4 sibling operations take onepkg/events/plugin.go:41

What to do

  1. Resolve the 1 `Plugin.SetHandler` takes no context.Context; its 4 sibling operations… finding(s) in Internal API Consistency β€” start with plugin.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.

D23 Β· Boundary Type-Coupling10.0 / 10Exemplaryβœ“ Tool-verified

What it measures: Whether domain types (IDs, enums, value objects) leak across bounded-context boundaries.

Method: Cross-context domain-type leakage via Roslyn structural classification (strongly-typed IDs / value objects) over every public surface. Exhaustive, deterministic, type-level aggregate-boundary check.

Coverage: Bounded contexts derived from NAMESPACE prefix (or graph-inferred where available); cross-boundary domain-type leakage then checked exhaustively over every public member of every type.

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 10.0 / 10 Β· rule-coverage 100% Β· ceiling Verified

No domain types leak across context boundaries (2 contexts). Contexts: blockchain, events.

βœ“ On the Gold path β€” maintain.

Detailed fixes: d23_recommendation.md.

D26 Β· Project Cohesion6.7 / 10Adequateβœ“ Tool-verified

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

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

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 6.7 / 10 Β· rule-coverage 100% Β· ceiling Documented

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

Projects may be oversized for their cohesionREDACTED:1

What to do

  1. Resolve the 1 Projects may be oversized for their cohesion finding(s) in Project Cohesion β€” start with REDACTED. β€” One of this dimension's main actionable groups (1 recommendation-level).

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

D27 Β· Navigability7.1 / 10Strongβœ“ Tool-verified

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

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

Coverage: Slice locality from the first namespace segments, SAMPLED (≀400 methods) β€” not exhaustive.

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 7.1 / 10 Β· rule-coverage 100% Β· ceiling Documented

38 % of calls cross a namespace and 28 % go through an interface, but 23 % of collaborators are co-located β€” so following a call takes several hops. Baseline: small β€” navigation cost is tolerated.

Detailed fixes: d27_recommendation.md.

D28 Β· Secrets (history)0.0 / 10Criticalβœ“ 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 0.0 / 10 Β· rule-coverage 100% Β· ceiling Documented

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

REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 11 High secret finding(s) in Secrets (history) β€” start with REDACTED (4), REDACTED (2), REDACTED (2). β€” One of this dimension's main actionable groups (11 issue-level).
  2. Resolve the 8 REDACTED finding(s) in Secrets (history) β€” start with REDACTED (4), REDACTED (2), REDACTED. β€” One of this dimension's main actionable groups (8 issue-level).
  3. 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.2 / 10Criticalβœ“ Tool-verified

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

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

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

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 0.2 / 10 Β· rule-coverage 100% Β· ceiling Documented

77 finding(s): 0 critical, 51 high, 23 medium, 3 low. 36 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` β€” one pinning decision is charged once, not once per lens. semgrep hit a parse error in 3 file(s) β€” `doc-site/docs/versions.json`, `doc-site/overrides/main.html` (lines 1–4, line 8), `smart_contracts/corda/cordapp_kat/gradlew` (line 175) β€” 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

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

What to do

  1. Resolve the 9 REDACTED finding(s) in Static Analysis (SAST) β€” start with REDACTED (2), REDACTED (2), REDACTED (2). β€” One of this dimension's main actionable groups (9 issue-level).
  2. Resolve the 3 REDACTED finding(s) in Static Analysis (SAST) β€” start with REDACTED, REDACTED, REDACTED. β€” One of this dimension's main actionable groups (3 issue-level).
  3. No action in Static Analysis (SAST) β€” all 36 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 (36 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

78 finding(s): 6 critical, 42 high, 24 medium, 6 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 40 High CVE finding(s) in Dependency Vulnerabilities β€” start with REDACTED (40). β€” One of this dimension's main actionable groups (40 issue-level).
  2. Resolve the 6 Critical CVE finding(s) in Dependency Vulnerabilities β€” start with REDACTED (6). β€” One of this dimension's main actionable groups (6 issue-level).
  3. Resolve the 2 High vulnerability finding(s) in Dependency Vulnerabilities β€” start with REDACTED (2). β€” One of this dimension's main actionable groups (2 issue-level).

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

D31 Β· IaC & Container Security8.6 / 10Adequategated by 3 critical findingsβœ“ 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 8.6 / 10 Β· rule-coverage 100% Β· ceiling Documented

11 finding(s): 0 critical, 3 high, 3 medium, 5 low.

REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 3 High IaC finding(s) in IaC & Container Security β€” start with REDACTED (3). β€” One of this dimension's main actionable groups (3 issue-level).
  2. Resolve the 5 Low IaC finding(s) in IaC & Container Security β€” start with REDACTED (5). β€” One of this dimension's main actionable groups (5 recommendation-level).
  3. Resolve the 3 Medium IaC finding(s) in IaC & Container Security β€” start with REDACTED (3). β€” One of this dimension's main actionable groups (3 warning-level).

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

D35 Β· Change Coupling9.9 / 10Stronggated by 3 serious findingsβœ“ Tool-verified

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

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

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

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 9.9 / 10 Β· rule-coverage 100% Β· ceiling Documented

Strongest change-coupling: route_post_contract_api_invoke.go↔route_post_contract_invoke.go 75%; route_post_new_contract_api.go↔route_post_new_contract_interface.go 60%; route_post_new_contract_api.go↔route_put_contract_api.go 55%

Change coupling: route_post_contract_api_invoke.go ↔ route_post_contract_invoke.go Β· Γ—2internal/apiserver/route_post_contract_api_invoke.go:1
Change-coupling hub: route_post_new_contract_api.go β†’ route_post_contract_invoke.go, route_post_new_contract_interface.go, route_put_contract_api.gointernal/apiserver/route_post_new_contract_api.go

What to do

  1. Resolve the 2 Change coupling finding(s) in Change Coupling β€” start with route_post_contract_api_invoke.go, route_post_new_contract_interface.go. β€” One of this dimension's main actionable groups (2 warning-level).
  2. Resolve the 1 Change-coupling hub finding(s) in Change Coupling β€” start with route_post_new_contract_api.go. β€” 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 & Signing0.0 / 10Criticalβœ“ 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 0.0 / 10 Β· rule-coverage 100% Β· ceiling Documented

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

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

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

What to do

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

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

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-Life6.0 / 10Adequateβœ“ 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 6.0 / 10 Β· rule-coverage 100% Β· ceiling Documented

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

End-of-life runtime: Ruby 3.1.ruby-version:1

What to do

  1. Resolve the 1 End-of-life runtime finding(s) in Platform End-of-Life β€” start with .ruby-version. β€” One of this dimension's main actionable groups (1 warning-level).

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

Frontend & cross-cutting dimensions

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

AX10 Β· Code composition9.6 / 10Exemplaryβœ“ Tool-verified

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

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

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

AX2 Β· Stateful 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.4 / 10Exemplaryβœ“ Tool-verified

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

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

  • `Manager` declares 24 methods: `CreateTokenPool`, `ActivateTokenPool`, `GetTokenPools`, `GetTokenPoolByLocator`, `GetTokenPoolByNameOrID`, `GetTokenPoolByID`, `ResolvePoolMethods`, `DeleteTokenPool`, `GetTokenBalances`, `GetTokenAccounts`, `GetTokenAccountPools`, `GetTokenTransfers`, `GetTokenTransferByID`, `NewTransfer`, `MintTokens`, `BurnTokens`, `TransferTokens`, `GetTokenConnectors`, `NewApproval`, `TokenApproval`, `GetTokenApprovals`, `PrepareOperation`, `RunOperation`, `Start`. 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. β€” internal/assets/manager.go:41
  • `Manager` declares 30 methods: `GetFFI`, `GetFFIWithChildren`, `GetFFIByID`, `GetFFIByIDWithChildren`, `GetFFIMethods`, `GetFFIEvents`, `GetFFIs`, `ResolveFFI`, `ResolveFFIReference`, `DeleteFFI`, `DeployContract`, `InvokeContract`, `InvokeContractAPI`, `GetContractAPI`, `GetContractAPIInterface`, `GetContractAPIs`, `ResolveContractAPI`, `DeleteContractAPI`, `UpsertContractAPI`, `ConstructContractListenerSignature`, `AddContractListener`, `AddContractAPIListener`, `GetContractListenerByNameOrID`, `GetContractListenerByNameOrIDWithStatus`, `GetContractListeners`, `GetContractAPIListeners`, `DeleteContractListenerByNameOrID`, `GenerateFFI`, `PrepareOperation`, `RunOperation`. 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. β€” internal/contracts/manager.go:52
  • `Manager` declares 18 methods: `CheckDatatype`, `ValidateAll`, `GetMessageWithDataCached`, `GetMessageDataCached`, `PeekMessageCache`, `UpdateMessageCache`, `UpdateMessageIfCached`, `UpdateMessageStateIfCached`, `ResolveInlineData`, `WriteNewMessage`, `BlobsEnabled`, `UploadJSON`, `UploadBlob`, `DownloadBlob`, `DeleteData`, `HydrateBatch`, `Start`, `WaitStop`. 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. β€” internal/data/data_manager.go:37
  • `EventManager` declares 22 methods: `NewPins`, `NewEvents`, `NewSubscriptions`, `SubscriptionUpdates`, `DeletedSubscriptions`, `DeleteDurableSubscription`, `CreateUpdateDurableSubscription`, `EnrichEvent`, `EnrichEvents`, `FilterHistoricalEventsOnSubscription`, `QueueBatchRewind`, `ResolveTransportAndCapabilities`, `Start`, `WaitStop`, `BlockchainEventBatch`, `DXEvent`, `SharedStorageBatchDownloaded`, `SharedStorageBlobDownloaded`, `TokenPoolCreated`, `TokensTransferred`, `TokensApproved`, `GetPlugins`. 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. β€” internal/events/event_manager.go:55
  • `Manager` declares 16 methods: `ResolveInputSigningIdentity`, `ResolveInputVerifierRef`, `ResolveInputSigningKey`, `ResolveQuerySigningKey`, `ResolveIdentitySigner`, `ResolveMultipartyRootVerifier`, `FindIdentityForVerifier`, `CachedIdentityLookupByID`, `CachedIdentityLookupMustExist`, `CachedIdentityLookupNilOK`, `GetLocalNode`, `GetLocalNodeDID`, `GetRootOrgDID`, `GetRootOrg`, `VerifyIdentityChain`, `ValidateNodeOwner`. 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. β€” internal/identity/identitymanager.go:41
  • `Manager` declares 22 methods: `RegisterOrganization`, `RegisterNode`, `RegisterNodeOrganization`, `RegisterIdentity`, `UpdateIdentity`, `CheckNodeIdentityStatus`, `GetOrganizationByNameOrID`, `GetOrganizations`, `GetOrganizationsWithVerifiers`, `GetNodeByNameOrID`, `GetNodes`, `GetIdentityByID`, `GetIdentityByIDWithVerifiers`, `GetIdentityByDID`, `GetIdentityByDIDWithVerifiers`, `GetIdentities`, `GetIdentitiesWithVerifiers`, `GetIdentityVerifiers`, `GetVerifiers`, `GetVerifierByHash`, `GetDIDDocForIndentityByID`, `GetDIDDocForIndentityByDID`. 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. β€” internal/networkmap/manager.go:34
  • `Orchestrator` declares 63 methods: `PreInit`, `Init`, `Start`, `WaitStop`, `MultiParty`, `BatchManager`, `Broadcast`, `PrivateMessaging`, `Assets`, `DefinitionSender`, `Contracts`, `Data`, `Events`, `NetworkMap`, `Operations`, `Identity`, `GetStatus`, `GetMultipartyStatus`, `GetSubscriptions`, `GetSubscriptionByID`, `GetSubscriptionByIDWithStatus`, `GetSubscriptionEventsHistorical`, `CreateSubscription`, `CreateUpdateSubscription`, `DeleteSubscription`, `GetNamespace`, `GetTransactionByID`, `GetTransactionOperations`, `GetTransactionBlockchainEvents`, `GetTransactionStatus`, `GetTransactions`, `GetMessageByID`, `GetMessageByIDWithData`, `GetMessages`, `GetMessagesWithData`, `GetMessageTransaction`, `GetMessageEvents`, `GetMessageData`, `GetMessagesForData`, `GetBatchByID`, and 23 more. 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. β€” internal/orchestrator/orchestrator.go:58
  • `Plugin` declares 31 methods: `InitConfig`, `Init`, `StartNamespace`, `StopNamespace`, `SetHandler`, `SetOperationHandler`, `Capabilities`, `VerifierType`, `ResolveSigningKey`, `SubmitBatchPin`, `SubmitNetworkAction`, `DeployContract`, `ParseInterface`, `ValidateInvokeRequest`, `InvokeContract`, `QueryContract`, `AddContractListener`, `DeleteContractListener`, `GetContractListenerStatus`, `GetFFIParamValidator`, `GenerateFFI`, `NormalizeContractLocation`, `GenerateEventSignature`, `GenerateEventSignatureWithLocation`, `CheckOverlappingLocations`, `GenerateErrorSignature`, `GetNetworkVersion`, `GetAndConvertDeprecatedContractConfig`, `AddFireflySubscription`, `RemoveFireflySubscription`, `GetTransactionStatus`. 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. β€” pkg/blockchain/plugin.go:39
  • `Plugin` declares 16 methods: `InitConfig`, `Init`, `SetHandler`, `SetOperationHandler`, `StartNamespace`, `StopNamespace`, `Capabilities`, `ConnectorName`, `CreateTokenPool`, `ActivateTokenPool`, `DeactivateTokenPool`, `CheckInterface`, `MintTokens`, `BurnTokens`, `TransferTokens`, `TokensApproval`. 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. β€” pkg/tokens/plugin.go:29

What to do

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

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

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

M1 Β· Documentation (README)6.7 / 10Adequateβœ“ Tool-verified

Maturity Β· Maturity β€” Whether the repository and its projects have a README, and whether it is substantive.

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

What to do

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

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

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

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

What to do

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

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

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

M4 Β· Documentation accuracy8.0 / 10Strongβœ“ Tool-verified

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.

  • doc-site/docs/contributors/dev_environment_setup.md names Go 1.22, but REDACTED:3 requires `go 1.26.0` (the lowest of 4 declarations): the code does not build on Go 1.22. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. β€” doc-site/docs/contributors/dev_environment_setup.md:15

What to do

  • Reconcile the README with reality: doc-site/docs/contributors/dev_environment_setup.md names Go 1.22, but REDACTED:3 requires `go 1.26.0` (the lowest of 4 declarations): the code does not build on Go 1.22.
P1 Β· CI/CD gates10.0 / 10Exemplaryβ—‹ Nothing flagged

Readiness Β· Readiness β€” Whether an automated pipeline builds and tests every change.

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

P2 Β· Observability10.0 / 10Exemplaryβ—‹ Nothing flagged

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.

P3 Β· Security & performance tooling8.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 `gradle`, 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 entry to the `updates:` list. β€” REDACTED:18

What to do

  • Dependabot is configured but does not watch `gradle` β€” add that `package-ecosystem` entry 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 & Rollback7.0 / 10Strongβœ“ Tool-verified

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

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

P6 Β· Release Hygiene10.0 / 10Exemplaryβœ“ Tool-verified

Readiness Β· Readiness β€” Whether releases are traceable β€” a maintained changelog and explicit version stamping.

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

P7 Β· Outbound HTTP resilience3.0 / 10Weakβœ“ Tool-verified

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

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

  • `http.Get(` 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. β€” auditevents/main.go:42

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.

PF1 Β· Benchmark discipline8.0 / 10Strongβœ“ Tool-verified

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

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

  • A Go testing.B suite exists but nothing turns on its allocation measurement β€” allocations (the main way hot code pressures a garbage collector or allocator) aren't being measured. β€” internal/contracts/manager_bench_test.go

What to do

  • Call b.ReportAllocs() in the benchmarks, or run them with `go test -bench . -benchmem`, so allocation regressions are visible, not just time.
PF3 Β· Async & latency hygiene10.0 / 10Exemplaryβœ“ Tool-verified

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

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

X2 Β· Cancellation propagation4.0 / 10Weakβœ“ Tool-verified

Other Β· Code Health β€” Whether functions that make a cancellable request accept or pass on a context.Context (adoption curve).

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

  • Only 0/1 functions that make a cancellable request (net/http, net.Dial) accept a context.Context or pass one on, so a request keeps running after whatever wanted it has given up β€” a cancelled request, a shutdown, an expired deadline. Take `ctx context.Context` as the first parameter and build the request with it (`http.NewRequestWithContext`, `DialContext`); where nothing could ever cancel the call, omitting it is a deliberate choice β€” judge against how the function is used.
  • `get` 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, …)`. β€” auditevents/main.go:41

What to do

  • Thread a context.Context through functions that make requests, so the work stops when its caller gives up.
X26 Β· Unsynchronised callback handoff3.5 / 10Weakβœ“ Tool-verified

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

Method: Roslyn syntax: method, accessor, local-function and lambda bodies that declare BOTH a non-thread-safe generic collection (`Queue`/`Stack`/`List`/`Dictionary`/`HashSet`/`Sorted*`/`LinkedList`) and a synchronisation primitive (`SemaphoreSlim`/`TaskCompletionSource`/`ManualResetEvent(Slim)`/`AutoResetEvent`/`CountdownEvent`) as locals, then read for a `+=`-registered lambda that raises that primitive while the body outside every lambda waits on it β€” and, in that scope, a mutating call on the collection inside the lambda paired with a mention of it outside. Any `lock` in the scope abstains it. On a repository with no .NET source the same handoff is read in Java off the engine’s own token stream (test source sets, vendored and demonstration paths not): an `ArrayList`/`LinkedList`/`ArrayDeque`/`PriorityQueue`/`Hash*`/`LinkedHash*`/`Tree*` local and a `CountDownLatch`/`Semaphore`/`CompletableFuture` local, a lambda or anonymous class that raises the primitive and mutates the collection, and a wait outside it; any `synchronized` or `lock()` abstains the body. Because each of those primitives orders what the callback wrote before raising it, only a touch that provably overlaps the callback is convicted: one after the registration and before the next wait, or one in a loop registered-before, waiting on every pass and not declaring the collection. Deterministic, provable per finding. Advisory.

  • `submitBlobTransfersToDX` starts a goroutine on every pass of a loop, and each one writes `firstError`, a variable declared before the loop β€” `firstError = …` on line 270. The loop never waits on `wg` before its next pass, so the goroutines of successive passes run at the same time and each one's write races the next one's; waiting on `wg` after the loop orders only what follows the wait. A goroutine's closure captures `firstError` by reference, so every goroutine and the body use ONE variable, and a plain variable has no synchronisation of its own: by the Go memory model a write concurrent with any other access to it is a data race (the race detector reports it), a racing `++` loses updates, and a racing read sees a stale or torn value. `wg` is a `sync.WaitGroup`, which orders the handoff's signal and takes no exclusion over the variable's own state. Guard every write to `firstError` with one `sync.Mutex`, or have each goroutine send its result on a channel that this body alone receives from and writes into `firstError`. β€” internal/privatemessaging/privatemessaging.go:270

What to do

  • In Go, hand values from a goroutine to the body waiting on it over a channel the body receives from, rather than through a map or slice beside a `sync.WaitGroup` or a signal channel β€” or hold one `sync.Mutex` over every access to the shared map or slice on both sides. The wait orders the signal; it takes no exclusion over the map's or slice's own state.
X27 Β· Collection changed while being enumerated10.0 / 10Exemplaryβ—‹ Nothing flagged

Other Β· Code Health β€” Whether an enhanced `for` leaves the collection it is walking alone β€” a body that adds to or removes from the very collection the loop is iterating invalidates the fail-fast iterator it is holding, so the next `next()` throws `ConcurrentModificationException` 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.

X28 Β· Index access outside its own emptiness guard10.0 / 10Exemplaryβ—‹ Nothing flagged

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

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

X3 Β· Exception handling7.1 / 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.

  • `b, _ := json.Marshal(&bm)` writes the call's error to `_` and then uses `b` as if the call succeeded. When `json.Marshal` fails, `b` 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 `b` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line. β€” pkg/core/batch.go:102
  • `b, _ := json.Marshal(&ma)` writes the call's error to `_` and then uses `b` as if the call succeeded. When `json.Marshal` fails, `b` 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 `b` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line. β€” pkg/core/batch.go:107
  • `bytes, _ := json.Marshal(fse)` writes the call's error to `_` and then uses `bytes` as if the call succeeded. When `json.Marshal` fails, `bytes` 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 `bytes` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line. β€” REDACTED:100
  • `bytes, _ := json.Marshal(o)` writes the call's error to `_` and then uses `bytes` as if the call succeeded. When `json.Marshal` fails, `bytes` 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 `bytes` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line. β€” REDACTED:120
  • `bytes, _ := json.Marshal(lf)` writes the call's error to `_` and then uses `bytes` as if the call succeeded. When `json.Marshal` fails, `bytes` 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 `bytes` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line. β€” REDACTED:140
  • `b, _ := json.Marshal(&d)` writes the call's error to `_` and then uses `b` as if the call succeeded. When `json.Marshal` fails, `b` 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 `b` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line. β€” pkg/core/data.go:114
  • `b, _ := json.Marshal(&man)` writes the call's error to `_` and then uses `b` as if the call succeeded. When `json.Marshal` fails, `b` 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 `b` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line. β€” pkg/core/group.go:72
  • `b, _ := json.Marshal(&h)` writes the call's error to `_` and then uses `b` as if the call succeeded. When `json.Marshal` fails, `b` 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 `b` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line. β€” pkg/core/message.go:162
  • `namespace, _, _ := core.ParseNamespacedOpID(ctx, nsOpID)` writes the call's error to `_` and then uses `namespace` as if the call succeeded. When `core.ParseNamespacedOpID` fails, `namespace` 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 `namespace` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line. β€” internal/tokens/fftokens/fftokens.go:75
  • `b, _ := json.Marshal(startCmd)` writes the call's error to `_` and then uses `b` as if the call succeeded. When `json.Marshal` fails, `b` 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 `b` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line. β€” internal/tokens/fftokens/fftokens.go:339
  • `ack, _ := json.Marshal(wsAck{ WSActionBase: core.WSActionBase{ Type: core.WSClientActionAck, }, ID: msg.ID, })` writes the call's error to `_` and then uses `ack` as if the call succeeded. When `json.Marshal` fails, `ack` 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 `ack` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line. β€” internal/tokens/fftokens/fftokens.go:697
  • `data, _ := json.Marshal(tokenData)` writes the call's error to `_` and then uses `data` as if the call succeeded. When `json.Marshal` fails, `data` 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 `data` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line. β€” internal/tokens/fftokens/fftokens.go:791
  • `data, _ := json.Marshal(tokenData{ TX: mint.TX.ID, TXType: mint.TX.Type, Message: mint.Message, MessageHash: mint.MessageHash, })` writes the call's error to `_` and then uses `data` as if the call succeeded. When `json.Marshal` fails, `data` 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 `data` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line. β€” internal/tokens/fftokens/fftokens.go:930
  • `data, _ := json.Marshal(tokenData{ TX: burn.TX.ID, TXType: burn.TX.Type, Message: burn.Message, MessageHash: burn.MessageHash, })` writes the call's error to `_` and then uses `data` as if the call succeeded. When `json.Marshal` fails, `data` 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 `data` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line. β€” internal/tokens/fftokens/fftokens.go:966
  • `data, _ := json.Marshal(tokenData{ TX: transfer.TX.ID, TXType: transfer.TX.Type, Message: transfer.Message, MessageHash: transfer.MessageHash, })` writes the call's error to `_` and then uses `data` as if the call succeeded. When `json.Marshal` fails, `data` 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 `data` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line. β€” internal/tokens/fftokens/fftokens.go:1001
  • `data, _ := json.Marshal(tokenData{ TX: approval.TX.ID, TXType: approval.TX.Type, Message: approval.Message, MessageHash: approval.MessageHash, })` writes the call's error to `_` and then uses `data` as if the call succeeded. When `json.Marshal` fails, `data` 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 `data` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line. β€” internal/tokens/fftokens/fftokens.go:1037
  • `markdown, _, _ := generateObjectReferenceMarkdown(ctx, true, nil, reflect.TypeOf(simpleType), []string{}, simpleTypeNames, []string{}, outputPath)` writes the call's error to `_` and then uses `markdown` as if the call succeeded. When `generateObjectReferenceMarkdown` fails, `markdown` 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 `markdown` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line. β€” REDACTED:735
  • `subFieldMarkdown, newTableNames, _ := generateObjectReferenceMarkdown(ctx, false, nil, fieldType, rootPageNames, simpleTypeNames, generatedTableNames, outputPath)` writes the call's error to `_` and then uses `subFieldMarkdown` as if the call succeeded. When `generateObjectReferenceMarkdown` fails, `subFieldMarkdown` 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 `subFieldMarkdown` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line. β€” REDACTED:921
  • `prepOp, _ := om.PrepareOperation(ctx, nextInitializedOp)` writes the call's error to `_` and then uses `prepOp` as if the call succeeded. When `om.PrepareOperation` fails, `prepOp` 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 `prepOp` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line. β€” internal/operations/manager.go:167
  • `b, _ := json.Marshal(viperTree)` writes the call's error to `_` and then uses `b` as if the call succeeded. When `json.Marshal` fails, `b` 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 `b` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line. β€” internal/namespace/configreload.go:34
  • `ie, _ := eifactory.GetPlugin(ctx, system.SystemEventsTransport)` writes the call's error to `_` and then uses `ie` as if the call succeeded. When `eifactory.GetPlugin` fails, `ie` 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 `ie` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line. β€” internal/events/event_manager.go:163
  • `def1, _ := json.Marshal(existing)` writes the call's error to `_` and then uses `def1` as if the call succeeded. When `json.Marshal` fails, `def1` 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 `def1` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line. β€” internal/events/event_manager.go:258
  • `def2, _ := json.Marshal(subDef)` writes the call's error to `_` and then uses `def2` as if the call succeeded. When `json.Marshal` fails, `def2` 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 `def2` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line. β€” internal/events/event_manager.go:259
  • `b, _ := json.Marshal(&fftypes.RESTError{ Error: gwErr.Error(), })` writes the call's error to `_` and then uses `b` as if the call succeeded. When `json.Marshal` fails, `b` 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 `b` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line. β€” internal/events/webhooks/webhooks.go:495
  • `b, _ := json.Marshal(&res)` writes the call's error to `_` and then uses `b` as if the call succeeded. When `json.Marshal` fails, `b` 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 `b` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line. β€” internal/events/webhooks/webhooks.go:506
  • `namespace, _, _ := core.ParseNamespacedOpID(ctx, update.NamespacedOpID)` writes the call's error to `_` and then uses `namespace` as if the call succeeded. When `core.ParseNamespacedOpID` fails, `namespace` 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 `namespace` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line. β€” internal/dataexchange/ffdx/ffdx.go:80
  • `existing, _, _ := s.GetTransactions(ctx, transaction.Namespace, fb.Eq("idempotencykey", (string)(transaction.IdempotencyKey)))` writes the call's error to `_` and then uses `existing` as if the call succeeded. When `s.GetTransactions` fails, `existing` 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 `existing` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line. β€” internal/database/sqlcommon/transaction_sql.go:85
  • `b, _ := json.Marshal(&do)` writes the call's error to `_` and then uses `b` as if the call succeeded. When `json.Marshal` fails, `b` 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 `b` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line. β€” internal/data/blobstore.go:106
  • `filterJSON, _ := json.Marshal(filter)` writes the call's error to `_` and then uses `filterJSON` as if the call succeeded. When `json.Marshal` fails, `filterJSON` 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 `filterJSON` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line. β€” internal/blockchain/tezos/eventstream.go:180
  • `version, _ := t.GetNetworkVersion(ctx, contract.Location)` writes the call's error to `_` and then uses `version` as if the call succeeded. When `t.GetNetworkVersion` fails, `version` 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 `version` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line. β€” REDACTED:270
  • `eventSignature, _ := t.GenerateEventSignature(ctx, event)` writes the call's error to `_` and then uses `eventSignature` as if the call succeeded. When `t.GenerateEventSignature` fails, `eventSignature` 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 `eventSignature` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line. β€” REDACTED:515
  • `b, _ = json.Marshal(&tezosWSCommandPayload{ Type: "listenreplies", })` writes the call's error to `_` and then uses `b` as if the call succeeded. When `json.Marshal` fails, `b` 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 `b` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line. β€” REDACTED:611
  • `schemaBytes, _ := json.Marshal(payloadSchema)` writes the call's error to `_` and then uses `schemaBytes` as if the call succeeded. When `json.Marshal` fails, `schemaBytes` 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 `schemaBytes` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line. β€” REDACTED:730
  • `ack, _ := json.Marshal(&tezosWSCommandPayload{ Type: "ack", Topic: t.pluginTopic, })` writes the call's error to `_` and then uses `ack` as if the call succeeded. When `json.Marshal` fails, `ack` 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 `ack` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line. β€” REDACTED:811
  • `b, _ = json.Marshal(&fabWSCommandPayload{ Type: "listenreplies", })` writes the call's error to `_` and then uses `b` as if the call succeeded. When `json.Marshal` fails, `b` 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 `b` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line. β€” REDACTED:267
  • `ackOrNack, _ = json.Marshal(map[string]string{"type": "error", "topic": topic, "message": err.Error()})` writes the call's error to `_` and then uses `ackOrNack` as if the call succeeded. When `json.Marshal` fails, `ackOrNack` 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 `ackOrNack` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line. β€” REDACTED:537
  • `input, _ := jsonEncodeInput(pinInput)` writes the call's error to `_` and then uses `input` as if the call succeeded. When `jsonEncodeInput` fails, `input` 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 `input` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line. (×2) β€” REDACTED:698, REDACTED:737
  • `batchPinBytes, _ := json.Marshal(batchPin)` writes the call's error to `_` and then uses `batchPinBytes` as if the call succeeded. When `json.Marshal` fails, `batchPinBytes` 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 `batchPinBytes` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line. β€” REDACTED:814
  • `b, _ = json.Marshal(&ethWSCommandPayload{ Type: "listenreplies", })` writes the call's error to `_` and then uses `b` as if the call succeeded. When `json.Marshal` fails, `b` 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 `b` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line. β€” REDACTED:216

What to do

  • Discarded error (assigned to `_`, then its result used)
X4 Β· Structured logging10.0 / 10Exemplaryβ—‹ Nothing flagged

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 `package.json` 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.

X5 Β· Nullable reference types10.0 / 10Exemplaryβ—‹ Nothing flagged

Other Β· Code Health β€” Whether strict null checking is enabled and not undermined by heavy `!` assertion β€” TypeScript's `strictNullChecks` (which `strict` turns on) is what makes `string` exclude `null` and `undefined`, and the postfix `!` is the operator that silences it.

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

Reference β€” by lens

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

LensScoreRatingImpact
Code Health66.9Adequate β€” gated by D4Capped at Fair by a Critical contributor β€” resolve it before relying on this lens.
Architecture95.3ExemplaryStrongest area.
Maturity71.8StrongSolid.
Readiness68.8Adequate β€” gated by P7Capped at Fair by a Critical contributor β€” resolve it before relying on this lens.
Security41.3Weak β€” gated by D28, D29, D36Capped at Fair by a Critical contributor β€” resolve it before relying on this lens.
Performance88.6StrongSolid.
Unscored β€” 1 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 β€” 9 observation(s) recorded Β· Advisory β€” this card reports evidence and never carries a score.
Not evidenced β€” 4 control(s) we could not find positive evidence for

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

  • C3 Audit Trail β€” Not assessed: these audit controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository β€” because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks audit controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C4 Data Retention β€” Not assessed: 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.
  • P5 DR & Backup β€” not evidenced β€” repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included β€” 56 check(s) not relevant to this codebase

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

  • AC1 Text alternatives β€” Frontend below the scale floor (2 DOM element(s) < 25) β€” too little surface to assess accessibility.
  • AC2 Forms & labels β€” Frontend below the scale floor (2 DOM element(s) < 25) β€” too little surface to assess accessibility.
  • AC3 Page structure β€” Frontend below the scale floor (2 DOM element(s) < 25) β€” too little surface to assess accessibility.
  • AC4 Keyboard semantics β€” Frontend below the scale floor (2 DOM element(s) < 25) β€” too little surface to assess accessibility.
  • AC5 ARIA correctness β€” Frontend below the scale floor (2 DOM element(s) < 25) β€” too little surface to assess accessibility.
  • AC6 Visual & motion safety β€” Frontend below the scale floor (2 DOM element(s) < 25) β€” too little surface to assess accessibility.
  • AX1 Captive dependencies β€” Not applicable: this repository's Go imports no dependency-injection container and defines no container of its own β€” nothing that both registers and resolves bindings, and nothing that names two lifetimes β€” so nothing holds one lifetime's instance while handing out another's; this repository's Java imports no dependency-injection container and defines no container of its own β€” nothing that both registers and resolves bindings, and nothing that names two lifetimes β€” so nothing holds one lifetime's instance while handing out another's.
  • 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
  • AX9 CQS / query purity β€” no CQRS query handlers detected β€” query purity is not applicable to this codebase
  • AXB2 Runtime readiness β€” Advisory β€” this card reports evidence and never carries a score, so there is nothing missing here.
  • AXR1 Runtime accessibility β€” docker build failed (exit 1) β€” #1 WARN: InvalidDefaultArgInFrom: Default value for ARG $BASE_TAG results in empty or invalid base image name (line 74) #1 DONE 0.0s REDACTED:14 -------------------- 12 | 13 | # Firefly Builder 14 | >>> FROM $FIREFLY_BUILDER_TAG AS firefly-builder 15 | ARG BUILD_VERSION 16 | ARG GIT_REF -------------------- ERROR: failed to solve: base name ($FIREFLY_BUILDER_TAG) should not be blank; likely cause (not identified): the image build failed, and its output does not match a cause we recognise; 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 β€” ~89603 lines of test source are present (.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.
  • 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.
  • D24 Comment Value β€” D24 reads C#, Visual Basic, TypeScript and JavaScript comments only; comments in this repository's .go, .java source were not judged.
  • D25 ADR Conformance β€” no ADRs to check
  • 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.
  • D34 Knowledge Freshness β€” knowledge concentrated in recent work β€” freshness signal contradicted by repo activity
  • D40 Network Egress Confinement β€” No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
  • D41 Kernel & Syscall Confinement β€” No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
  • D42 Runtime Threat Enforcement β€” No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
  • D7 Architectural Integrity β€” no checkable ADRs, and no project-reference graph for the cycle pass to read β€” so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
  • DM1 Domain Modelling β€” applicable but not scored (3 signals for this style, 2 needed β€” the count is met but a required primary signal is absent): 2 aggregate root(s) (types guarding their own state behind command methods β€” this language has no AggregateRoot base to inherit); 4 value object(s); 1 domain event(s); its domain events are published by services or handlers β€” no domain entity raises one
  • ED1 Event-Driven β€” applicable but not scored (2 of 3 signals for this style β€” below the bar we score at): 1 domain event(s); 7 event-sourced shape(s) (event folds / event-recording aggregates)
  • ED5 Idempotency β€” no mutating command handlers or message consumers detected β€” idempotency check not applicable
  • ES1 Event Sourcing β€” not scored β€” this repository shows only 1 of the 3 signals this lens looks for (6 Go aggregate(s) recording domain events (own events-slice append / raise-record))
  • GD1 Unfinished & placeholder code β€” no source files were read β€” this check reads C#, F#, JavaScript/TypeScript, Dart, Ruby, Scala, Rust and Java, and none was read for this repository's product. That is a limit of the analyzer, not a finding about your code.
  • IC1 Incompleteness & stubs β€” not analysed β€” these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • P12 CI test-gate honesty β€” Reported, not scored β€” this card publishes what the CI gate does with the test inventory rather than grading it. The findings above are its output.
  • P9 Domain vs controller coverage β€” coverage data present for 405 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.
  • PF2 Allocation hygiene β€” Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
  • S1 Web-Security Posture β€” Not assessed: these web-security controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository β€” because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks web-security controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • SC1 Supply-chain hygiene β€” Advisory β€” this card reports evidence and never carries a score, so there is nothing missing here.
  • X1 Async correctness β€” X1 reached only 0% of this repository's production lines β€” go (52,673 lines), java (935 lines), solidity (97 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • X12 Unreachable branch β€” not applicable β€” the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X13 Undrained process stream β€” not applicable β€” the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X14 Bypassable address classification β€” not applicable β€” the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X15 Unvalidated length from an untrusted reader β€” not applicable β€” the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X16 Unfloored truncation loop β€” X16 reached only 2% of this repository's production lines β€” go (52,673 lines), solidity (97 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • X17 Uncapped recursion over a caller-supplied document β€” not applicable β€” the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X18 Disposal-pattern correctness β€” 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
  • X21 Side-effecting pattern guard β€” not applicable β€” the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X22 Contradicted release guard β€” not applicable β€” the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X23 Unguarded diagnostic materialisation β€” not applicable β€” the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X24 Document value interpolated into markup unescaped β€” not applicable β€” the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X25 Inert configuration knob β€” not applicable β€” the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X29 Per-element action decided by a fixed element β€” not applicable β€” the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X30 Support guard that admits what it rejects β€” not applicable β€” the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X32 Type resolved by simple name across every loaded assembly β€” This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X6 Hand-rolled structured-format parsing β€” Advisory β€” this card reports evidence and never carries a score, so there is nothing missing here.
  • X7 Silent fallback defaults β€” 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 β€” 122 finding(s)
D30 Β· Dependency Vulnerabilities Β· High CVE Β· Γ—40
  • 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
  • + 15 more in this group β€” see findings.md.
D29 Β· Static Analysis (SAST) Β· REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 11 more in this group β€” see findings.md.
D28 Β· Secrets (history) Β· High secret Β· Γ—11
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 Β· Static Analysis (SAST) Β· REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D28 Β· Secrets (history) Β· REDACTED Β· Γ—8
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D30 Β· Dependency Vulnerabilities Β· Critical CVE Β· Γ—6
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 Β· Static Analysis (SAST) Β· REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D31 Β· IaC & Container Security Β· High IaC Β· Γ—3
  • REDACTED
  • REDACTED
  • REDACTED
D29 Β· Static Analysis (SAST) Β· REDACTED
  • REDACTED
  • REDACTED
D30 Β· Dependency Vulnerabilities Β· High vulnerability Β· Γ—2
  • REDACTED
  • REDACTED
D11 Β· Test Reliability Β· Flaky test Β· Γ—1
  • Flaky test: .::github.com/hyperledger-firefly/firefly/internal/batch.TestRewindForNewMessage β€” Passed 2×, failed 1× across repeated runs.
D29 Β· Static Analysis (SAST) Β· REDACTED Β· Γ—1
  • REDACTED
Serious β€” 605 finding(s)
X3 Β· Exception handling Β· Discarded error (assigned to `_`, then its result used) Β· Γ—40
  • Discarded error (assigned to `_`, then its result used) pkg/core/batch.go:102 β€” `b, _ := json.Marshal(&bm)` writes the call's error to `_` and then uses `b` as if the call succeeded. When `json.Marshal` fails, `b` 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 `b` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line.
  • Discarded error (assigned to `_`, then its result used) pkg/core/batch.go:107 β€” `b, _ := json.Marshal(&ma)` writes the call's error to `_` and then uses `b` as if the call succeeded. When `json.Marshal` fails, `b` 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 `b` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line.
  • Discarded error (assigned to `_`, then its result used) REDACTED:100 β€” `bytes, _ := json.Marshal(fse)` writes the call's error to `_` and then uses `bytes` as if the call succeeded. When `json.Marshal` fails, `bytes` 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 `bytes` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line.
  • Discarded error (assigned to `_`, then its result used) REDACTED:120 β€” `bytes, _ := json.Marshal(o)` writes the call's error to `_` and then uses `bytes` as if the call succeeded. When `json.Marshal` fails, `bytes` 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 `bytes` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line.
  • Discarded error (assigned to `_`, then its result used) REDACTED:140 β€” `bytes, _ := json.Marshal(lf)` writes the call's error to `_` and then uses `bytes` as if the call succeeded. When `json.Marshal` fails, `bytes` 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 `bytes` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line.
  • Discarded error (assigned to `_`, then its result used) pkg/core/data.go:114 β€” `b, _ := json.Marshal(&d)` writes the call's error to `_` and then uses `b` as if the call succeeded. When `json.Marshal` fails, `b` 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 `b` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line.
  • Discarded error (assigned to `_`, then its result used) pkg/core/group.go:72 β€” `b, _ := json.Marshal(&man)` writes the call's error to `_` and then uses `b` as if the call succeeded. When `json.Marshal` fails, `b` 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 `b` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line.
  • Discarded error (assigned to `_`, then its result used) pkg/core/message.go:162 β€” `b, _ := json.Marshal(&h)` writes the call's error to `_` and then uses `b` as if the call succeeded. When `json.Marshal` fails, `b` 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 `b` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line.
  • Discarded error (assigned to `_`, then its result used) internal/tokens/fftokens/fftokens.go:75 β€” `namespace, _, _ := core.ParseNamespacedOpID(ctx, nsOpID)` writes the call's error to `_` and then uses `namespace` as if the call succeeded. When `core.ParseNamespacedOpID` fails, `namespace` 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 `namespace` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line.
  • Discarded error (assigned to `_`, then its result used) internal/tokens/fftokens/fftokens.go:339 β€” `b, _ := json.Marshal(startCmd)` writes the call's error to `_` and then uses `b` as if the call succeeded. When `json.Marshal` fails, `b` 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 `b` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line.
  • Discarded error (assigned to `_`, then its result used) internal/tokens/fftokens/fftokens.go:697 β€” `ack, _ := json.Marshal(wsAck{ WSActionBase: core.WSActionBase{ Type: core.WSClientActionAck, }, ID: msg.ID, })` writes the call's error to `_` and then uses `ack` as if the call succeeded. When `json.Marshal` fails, `ack` 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 `ack` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line.
  • Discarded error (assigned to `_`, then its result used) internal/tokens/fftokens/fftokens.go:791 β€” `data, _ := json.Marshal(tokenData)` writes the call's error to `_` and then uses `data` as if the call succeeded. When `json.Marshal` fails, `data` 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 `data` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line.
  • Discarded error (assigned to `_`, then its result used) internal/tokens/fftokens/fftokens.go:930 β€” `data, _ := json.Marshal(tokenData{ TX: mint.TX.ID, TXType: mint.TX.Type, Message: mint.Message, MessageHash: mint.MessageHash, })` writes the call's error to `_` and then uses `data` as if the call succeeded. When `json.Marshal` fails, `data` 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 `data` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line.
  • Discarded error (assigned to `_`, then its result used) internal/tokens/fftokens/fftokens.go:966 β€” `data, _ := json.Marshal(tokenData{ TX: burn.TX.ID, TXType: burn.TX.Type, Message: burn.Message, MessageHash: burn.MessageHash, })` writes the call's error to `_` and then uses `data` as if the call succeeded. When `json.Marshal` fails, `data` 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 `data` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line.
  • Discarded error (assigned to `_`, then its result used) internal/tokens/fftokens/fftokens.go:1001 β€” `data, _ := json.Marshal(tokenData{ TX: transfer.TX.ID, TXType: transfer.TX.Type, Message: transfer.Message, MessageHash: transfer.MessageHash, })` writes the call's error to `_` and then uses `data` as if the call succeeded. When `json.Marshal` fails, `data` 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 `data` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line.
  • Discarded error (assigned to `_`, then its result used) internal/tokens/fftokens/fftokens.go:1037 β€” `data, _ := json.Marshal(tokenData{ TX: approval.TX.ID, TXType: approval.TX.Type, Message: approval.Message, MessageHash: approval.MessageHash, })` writes the call's error to `_` and then uses `data` as if the call succeeded. When `json.Marshal` fails, `data` 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 `data` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line.
  • Discarded error (assigned to `_`, then its result used) REDACTED:735 β€” `markdown, _, _ := generateObjectReferenceMarkdown(ctx, true, nil, reflect.TypeOf(simpleType), []string{}, simpleTypeNames, []string{}, outputPath)` writes the call's error to `_` and then uses `markdown` as if the call succeeded. When `generateObjectReferenceMarkdown` fails, `markdown` 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 `markdown` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line.
  • Discarded error (assigned to `_`, then its result used) REDACTED:921 β€” `subFieldMarkdown, newTableNames, _ := generateObjectReferenceMarkdown(ctx, false, nil, fieldType, rootPageNames, simpleTypeNames, generatedTableNames, outputPath)` writes the call's error to `_` and then uses `subFieldMarkdown` as if the call succeeded. When `generateObjectReferenceMarkdown` fails, `subFieldMarkdown` 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 `subFieldMarkdown` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line.
  • Discarded error (assigned to `_`, then its result used) internal/operations/manager.go:167 β€” `prepOp, _ := om.PrepareOperation(ctx, nextInitializedOp)` writes the call's error to `_` and then uses `prepOp` as if the call succeeded. When `om.PrepareOperation` fails, `prepOp` 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 `prepOp` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line.
  • Discarded error (assigned to `_`, then its result used) internal/namespace/configreload.go:34 β€” `b, _ := json.Marshal(viperTree)` writes the call's error to `_` and then uses `b` as if the call succeeded. When `json.Marshal` fails, `b` 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 `b` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line.
  • Discarded error (assigned to `_`, then its result used) internal/events/event_manager.go:163 β€” `ie, _ := eifactory.GetPlugin(ctx, system.SystemEventsTransport)` writes the call's error to `_` and then uses `ie` as if the call succeeded. When `eifactory.GetPlugin` fails, `ie` 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 `ie` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line.
  • Discarded error (assigned to `_`, then its result used) internal/events/event_manager.go:258 β€” `def1, _ := json.Marshal(existing)` writes the call's error to `_` and then uses `def1` as if the call succeeded. When `json.Marshal` fails, `def1` 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 `def1` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line.
  • Discarded error (assigned to `_`, then its result used) internal/events/event_manager.go:259 β€” `def2, _ := json.Marshal(subDef)` writes the call's error to `_` and then uses `def2` as if the call succeeded. When `json.Marshal` fails, `def2` 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 `def2` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line.
  • Discarded error (assigned to `_`, then its result used) internal/events/webhooks/webhooks.go:495 β€” `b, _ := json.Marshal(&fftypes.RESTError{ Error: gwErr.Error(), })` writes the call's error to `_` and then uses `b` as if the call succeeded. When `json.Marshal` fails, `b` 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 `b` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line.
  • Discarded error (assigned to `_`, then its result used) internal/events/webhooks/webhooks.go:506 β€” `b, _ := json.Marshal(&res)` writes the call's error to `_` and then uses `b` as if the call succeeded. When `json.Marshal` fails, `b` 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 `b` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line.
  • + 15 more in this group β€” see findings.md.
D30 Β· Dependency Vulnerabilities Β· Medium CVE Β· Γ—22
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 Β· Static Analysis (SAST) Β· REDACTED Β· Γ—19
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D17 Β· Explicit Debt Β· TodoComment Β· Γ—18
  • TodoComment internal/reference/generate_reference_test.go:35 β€” // TODO: Generate multiple languages when supported in the future here β€” source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment internal/networkmap/update_identity.go:47 β€” // TODO is this right ? code below assumes this is true and errors otherwise β€” source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment internal/metrics/identity.go:50 β€” // TODO should this type live elsewhere ?? β€” source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment internal/events/blockchain_event_test.go:154 β€” // TODO: Add test case for event not existing β€” source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment REDACTED:262 β€” // TODO: define an algorithm to support any number of variants. β€” source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment REDACTED:230 β€” // TODO: Implement β€” source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment REDACTED:235 β€” // TODO: Implement β€” source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment REDACTED:308 β€” // TODO: impl β€” source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment REDACTED:313 β€” // TODO: impl β€” source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment REDACTED:531 β€” // TODO: impl β€” source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment REDACTED:366 β€” // TODO: add batch pin support β€” source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment REDACTED:542 β€” // TODO: get the network version from the batch pin contract β€” source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment REDACTED:821 β€” // TODO: should be specific to a namespace β€” source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment REDACTED:840 β€” // TODO: β€” source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment REDACTED:453 β€” // TODO: can old subscriptions be somehow cleaned up later? β€” source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment REDACTED:298 β€” // TODO: can old subscriptions be somehow cleaned up later? β€” source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment REDACTED:1128 β€” // TODO - could implement the same enhancement ethconnect has, and build a mock WS receipt if an API query β€” source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment internal/assets/token_pool.go:167 β€” // TODO: this operation should be made idempotent, but cannot inherit this from the TX per our normal semantics β€” source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
D4 Β· Code Duplication Β· Duplicated block (8 lines × 2) Β· Γ—14
  • Duplicated block (8 lines × 2) internal/apiserver/route_get_identity_by_did.go:31 β€” internal/apiserver/route_get_identity_by_did.go:31-38 | internal/apiserver/route_get_net_did.go:31-38 β€” before extracting anything, compare `internal/apiserver/route_get_identity_by_did.go` and `internal/apiserver/route_get_net_did.go` as WHOLE FILES: 92% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it β€” treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 2) REDACTED:833 β€” REDACTED:833-840 | REDACTED:372-380 β€” 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 (8 lines × 2) internal/events/subscription_manager.go:452 β€” internal/events/subscription_manager.go:452-459 | internal/events/subscription_manager.go:494-501 β€” both copies are in the same file, so extract the 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. 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 (8 lines × 2) internal/events/webhooks/webhooks.go:571 β€” internal/events/webhooks/webhooks.go:571-578 | internal/events/webhooks/webhooks.go:619-626 β€” both copies are in the same file, so extract the block into one function there and call it from each site β€” the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) REDACTED:117 β€” REDACTED:117-124 | REDACTED:133-140 β€” both copies are in the same file, so extract the block into one function there and call it from each site β€” the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) REDACTED:196 β€” REDACTED:196-203 | REDACTED:215-222 β€” both copies are in the same file, so extract the block into one function there and call it from each site β€” the copies drift 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:196` it does not close everything it opens, so those exact lines 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) internal/networkmap/data_query.go:39 β€” internal/networkmap/data_query.go:39-46 | internal/networkmap/data_query.go:71-78 β€” both copies are in the same file, so extract the block into one function there and call it from each site β€” the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `internal/networkmap/data_query.go:39` 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 (8 lines × 2) internal/networkmap/data_query.go:107 β€” internal/networkmap/data_query.go:107-114 | internal/networkmap/did.go:48-55 β€” the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach β€” a file they already depend on, or a new one alongside them β€” and call it from both call sites, so a change lands once. 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) internal/apiserver/route_post_data_blob_publish.go:37 β€” internal/apiserver/route_post_data_blob_publish.go:37-44 | internal/apiserver/route_post_data_value_publish.go:37-44 β€” before extracting anything, compare `internal/apiserver/route_post_data_blob_publish.go` and `internal/apiserver/route_post_data_value_publish.go` as WHOLE FILES: 86% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it β€” treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `internal/apiserver/route_post_data_blob_publish.go:37` it does not close everything it opens, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) internal/events/blob_receiver.go:112 β€” internal/events/blob_receiver.go:112-119 | internal/operations/operation_updater.go:174-181 β€” 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) internal/definitions/handler_contracts.go:198 β€” internal/definitions/handler_contracts.go:198-205 | internal/definitions/handler_contracts.go:235-242 β€” both copies are in the same file, so extract the block into one function there and call it from each site β€” the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `internal/definitions/handler_contracts.go:198` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) internal/blockchain/tezos/eventstream.go:79 β€” internal/blockchain/tezos/eventstream.go:79-86 | internal/blockchain/tezos/eventstream.go:144-151 β€” both copies are in the same file, so extract the block into one function there and call it from each site β€” the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `internal/blockchain/tezos/eventstream.go:79` it runs out through the closing brace of the declaration holding it β€” the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that. 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) internal/blockchain/ethereum/eventstream.go:88 β€” internal/blockchain/ethereum/eventstream.go:88-95 | internal/blockchain/ethereum/eventstream.go:175-182 β€” both copies are in the same file, so extract the block into one function there and call it from each site β€” the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `internal/blockchain/ethereum/eventstream.go:88` it runs out through the closing brace of the declaration holding it β€” the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that. 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) internal/blockchain/fabric/eventstream.go:81 β€” internal/blockchain/fabric/eventstream.go:81-88 | internal/blockchain/fabric/eventstream.go:151-158 β€” both copies are in the same file, so extract the block into one function there and call it from each site β€” the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `internal/blockchain/fabric/eventstream.go:81` 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 Β· Edited copy of a member (17 corresponding lines) Β· Γ—12
  • Edited copy of a member (17 corresponding lines) internal/apiserver/route_post_new_subscription.go:27 β€” internal/apiserver/route_post_new_subscription.go:27-43 | internal/apiserver/route_put_subscription.go:27-43 β€” 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) internal/definitions/handler_contracts.go:175 β€” internal/definitions/handler_contracts.go:175-191 | internal/definitions/handler_contracts.go:212-228 β€” 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) internal/apiserver/route_get_ops.go:28 β€” internal/apiserver/route_get_ops.go:28-44 | internal/apiserver/route_spi_get_ops.go:28-44 β€” 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) internal/apiserver/route_get_blockchain_event_by_id.go:27 β€” internal/apiserver/route_get_blockchain_event_by_id.go:27-44 | internal/apiserver/route_get_blockchain_events.go:28-44 β€” 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) internal/apiserver/route_get_batch_by_id.go:27 β€” internal/apiserver/route_get_batch_by_id.go:27-45 | internal/apiserver/route_get_batches.go:28-44 β€” 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) internal/apiserver/route_get_datatype_by_name.go:27 β€” internal/apiserver/route_get_datatype_by_name.go:27-46 | internal/apiserver/route_get_datatypes.go:28-44 β€” 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) internal/blockchain/common/common.go:176 β€” internal/blockchain/common/common.go:176-192 | internal/tokens/fftokens/fftokens.go:74-90 β€” 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) pkg/core/operation.go:114 β€” pkg/core/operation.go:114-130 | pkg/core/operation.go:132-148 β€” 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) internal/definitions/handler_contracts.go:84 β€” internal/definitions/handler_contracts.go:84-100 | internal/definitions/handler_tokenpool.go:111-132 β€” 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) REDACTED:689 β€” REDACTED:689-705 | REDACTED:685-701 β€” 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) REDACTED:1118 β€” REDACTED:1118-1134 | REDACTED:1038-1054 β€” 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) internal/database/sqlcommon/subscription_sql.go:138 β€” internal/database/sqlcommon/subscription_sql.go:138-154 | internal/database/sqlcommon/tokenbalance_sql.go:130-146 β€” These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 Β· Code Duplication Β· Duplicated block (7 lines × 2) Β· Γ—12
  • Duplicated block (7 lines × 2) ffconfig/migrate/migrations.go:114 β€” ffconfig/migrate/migrations.go:114-120 | ffconfig/migrate/migrations.go:130-136 β€” both copies are in the same file, so extract the block into one function there and call it from each site β€” the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ffconfig/migrate/migrations.go:114` 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) internal/blockchain/ethereum/eventstream.go:112 β€” internal/blockchain/ethereum/eventstream.go:112-118 | internal/blockchain/tezos/eventstream.go:100-106 β€” `internal/blockchain/ethereum/eventstream.go` and `internal/blockchain/tezos/eventstream.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 8 separate duplicated blocks between them, totalling at least 61 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 `internal/blockchain/ethereum/eventstream.go:112` it does not close everything it opens, so those exact lines 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) internal/blockchain/ethereum/eventstream.go:125 β€” internal/blockchain/ethereum/eventstream.go:125-131 | internal/blockchain/tezos/eventstream.go:113-119 β€” `internal/blockchain/ethereum/eventstream.go` and `internal/blockchain/tezos/eventstream.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 8 separate duplicated blocks between them, totalling at least 61 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 `internal/blockchain/ethereum/eventstream.go:125` it does not close everything it opens, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) internal/blockchain/ethereum/eventstream.go:161 β€” internal/blockchain/ethereum/eventstream.go:161-167 | internal/blockchain/fabric/eventstream.go:137-143 β€” `internal/blockchain/ethereum/eventstream.go` and `internal/blockchain/fabric/eventstream.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 7 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 `internal/blockchain/ethereum/eventstream.go: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. 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) internal/database/sqlcommon/tokenbalance_sql.go:227 β€” internal/database/sqlcommon/tokenbalance_sql.go:227-233 | internal/database/sqlcommon/tokenbalance_sql.go:255-261 β€” both copies are in the same file, so extract the block into one function there and call it from each site β€” the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `internal/database/sqlcommon/tokenbalance_sql.go:227` 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 (7 lines × 2) internal/dataexchange/ffdx/ffdx.go:575 β€” internal/dataexchange/ffdx/ffdx.go:575-581 | internal/tokens/fftokens/fftokens.go:742-748 β€” 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 `internal/dataexchange/ffdx/ffdx.go:575` it does not close everything it opens, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that. 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) auditevents/main.go:109 β€” auditevents/main.go:109-115 | ffconfig/main.go:70-76 β€” 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) REDACTED:836 β€” REDACTED:836-842 | REDACTED:619-625 β€” 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) smart_contracts/fabric/custompin-sample/batchpin/batchpin.go:57 β€” smart_contracts/fabric/custompin-sample/batchpin/batchpin.go:57-63 | smart_contracts/fabric/firefly-go/batchpin/batchpin.go:57-63 β€” before extracting anything, compare `smart_contracts/fabric/custompin-sample/batchpin/batchpin.go` and `smart_contracts/fabric/firefly-go/batchpin/batchpin.go` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 49 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) internal/database/sqlcommon/tokenapproval_sql.go:205 β€” internal/database/sqlcommon/tokenapproval_sql.go:205-211 | internal/database/sqlcommon/tokentransfer_sql.go:185-191 β€” 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) internal/events/aggregator.go:598 β€” internal/events/aggregator.go:598-604 | internal/events/aggregator.go:618-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 `internal/events/aggregator.go:598` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) internal/tokens/fftokens/fftokens.go:547 β€” internal/tokens/fftokens/fftokens.go:547-553 | internal/tokens/fftokens/fftokens.go:617-623 β€” both copies are in the same file, so extract the block into one function there and call it from each site β€” the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `internal/tokens/fftokens/fftokens.go:547` it does not close everything it opens, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
D3 Β· God Classes Β· TooManyMethods Β· Γ—11
  • TooManyMethods: SQLCommon internal/database/sqlcommon/sqlcommon.go:33 β€” TooManyMethods β€” 239 methods, declared across 31 files: sqlcommon/message_sql.go (19), sqlcommon/contractapis_sql.go (13), sqlcommon/ffi_sql.go (13), sqlcommon/tokenpool_sql.go (13), +27 more file(s). The bar is 30 methods; this is 209 over it, 7.97× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: orchestrator internal/orchestrator/orchestrator.go:193 β€” TooManyMethods β€” 87 methods, declared across 8 files: orchestrator/data_query.go (36), orchestrator/orchestrator.go (30), orchestrator/subscriptions.go (8), orchestrator/status.go (5), +4 more file(s). The bar is 30 methods; this is 57 over it, 2.90× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. Most of these members implement orchestrator.Orchestrator (63 of 87 members), so moving them onto a smaller type would remove them from that contract rather than reduce it. To reduce it, split the contract instead: give each cohesive group of operations its own smaller interface and its own implementing type. Where the contract has to stay whole, move the work behind these members into collaborator types, so what is left here is a forward per member rather than a responsibility per member.
  • TooManyMethods: eventManager internal/events/event_manager.go:92 β€” TooManyMethods β€” 57 methods, declared across 10 files: events/event_manager.go (16), events/blockchain_event.go (8), events/persist_batch.go (8), events/dx_callbacks.go (6), +6 more file(s). The bar is 30 methods; this is 27 over it, 1.90× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: contractManager internal/contracts/manager.go:91 β€” TooManyMethods β€” 54 methods, declared across 2 files: contracts/manager.go (51), contracts/operations.go (3). The bar is 30 methods; this is 24 over it, 1.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: namespaceManager internal/namespace/manager.go:89 β€” TooManyMethods β€” 51 methods, declared across 3 files: namespace/manager.go (40), namespace/configreload.go (7), namespace/persistence_events.go (4). The bar is 30 methods; this is 21 over it, 1.70× 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: Ethereum REDACTED:56 β€” TooManyMethods β€” 50 methods, declared across 2 files: REDACTED (49), ethereum/config.go (1). The bar is 30 methods; this is 20 over it, 1.67× 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: Fabric REDACTED:49 β€” TooManyMethods β€” 46 methods, declared across 2 files: REDACTED (45), fabric/config.go (1). The bar is 30 methods; this is 16 over it, 1.53× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Tezos REDACTED:48 β€” TooManyMethods β€” 46 methods, declared across 2 files: REDACTED (45), tezos/config.go (1). The bar is 30 methods; this is 16 over it, 1.53× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: syncAsyncBridge internal/syncasync/sync_async_bridge.go:101 β€” TooManyMethods β€” 44 methods. The bar is 30 methods; this is 14 over it, 1.47× 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: assetManager internal/assets/manager.go:79 β€” TooManyMethods β€” 33 methods, declared across 5 files: assets/token_pool.go (10), assets/manager.go (9), assets/token_transfer.go (7), assets/token_approval.go (4), +1 more file(s). The bar is 30 methods; this is 3 over it, 1.10× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: networkMap internal/networkmap/manager.go:60 β€” TooManyMethods β€” 32 methods, declared across 7 files: networkmap/data_query.go (17), networkmap/did.go (7), networkmap/register_identity.go (2), networkmap/register_org.go (2), +3 more file(s). The bar is 30 methods; this is 2 over it, 1.07× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D4 Β· Code Duplication Β· Duplicated block (10 lines × 2) Β· Γ—11
  • Duplicated block (10 lines × 2) REDACTED:640 β€” REDACTED:640-649 | REDACTED:655-665 β€” 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:640` it does not close everything it opens, so those exact lines 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) REDACTED:1213 β€” REDACTED:1213-1222 | REDACTED:569-578 β€” 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:1213` it does not close everything it opens, so those exact lines 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) internal/broadcast/operations.go:94 β€” internal/broadcast/operations.go:94-103 | internal/privatemessaging/operations.go:122-131 β€” 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, `internal/privatemessaging/operations.go:120` calls `NewError` and `internal/broadcast/operations.go:92` does not β€” after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (10 lines × 2) internal/database/sqlcommon/data_sql.go:305 β€” internal/database/sqlcommon/data_sql.go:305-314 | internal/database/sqlcommon/data_sql.go:333-342 β€” both copies are in the same file, so extract the block into one function there and call it from each site β€” the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `internal/database/sqlcommon/data_sql.go:305` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows β€” the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run β€” a one-line delegation has no helper inside it to lift β€” so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead β€” before the caller uses what it releases β€” so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
  • Duplicated block (10 lines × 2) internal/database/sqlcommon/nextpin_sql.go:121 β€” internal/database/sqlcommon/nextpin_sql.go:121-130 | internal/database/sqlcommon/pin_sql.go:180-189 β€” 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 `internal/database/sqlcommon/nextpin_sql.go:121` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows β€” the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run β€” a one-line delegation has no helper inside it to lift β€” so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. 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) internal/database/sqlcommon/tokenbalance_sql.go:184 β€” internal/database/sqlcommon/tokenbalance_sql.go:184-193 | internal/database/sqlcommon/tokenbalance_sql.go:210-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 `internal/database/sqlcommon/tokenbalance_sql.go:184` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows β€” the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run β€” a one-line delegation has no helper inside it to lift β€” so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead β€” before the caller uses what it releases β€” so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
  • Duplicated block (10 lines × 2) internal/events/system/events.go:76 β€” internal/events/system/events.go:76-85 | internal/events/webhooks/webhooks.go:105-114 β€” the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach β€” a location they all depend on today, or a new shared one if there is none β€” and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 2) internal/apiserver/route_post_contract_api_query.go:38 β€” internal/apiserver/route_post_contract_api_query.go:38-47 | internal/apiserver/route_post_contract_query.go:35-44 β€” the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach β€” a file they already depend on, or a new one alongside them β€” and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `internal/apiserver/route_post_contract_api_query.go:38` it does not close everything it opens, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) internal/blockchain/tezos/eventstream.go:88 β€” internal/blockchain/cardano/eventstream.go:78-87 | internal/blockchain/tezos/eventstream.go:88-97 β€” `internal/blockchain/cardano/eventstream.go` and `internal/blockchain/tezos/eventstream.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 5 separate duplicated blocks between them, totalling at least 49 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 (10 lines × 2) internal/dataexchange/ffdx/ffdx.go:434 β€” internal/dataexchange/ffdx/ffdx.go:434-443 | internal/dataexchange/ffdx/ffdx.go:455-464 β€” both copies are in the same file, so extract the block into one function there and call it from each site β€” the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `internal/dataexchange/ffdx/ffdx.go:434` 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) internal/broadcast/message.go:151 β€” internal/broadcast/message.go:151-160 | internal/privatemessaging/message.go:171-180 β€” 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 `internal/broadcast/message.go:151` 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 (9 lines × 2) Β· Γ—11
  • Duplicated block (9 lines × 2) internal/apiserver/route_get_contract_api_listeners.go:38 β€” internal/apiserver/route_get_contract_api_listeners.go:38-46 | internal/apiserver/route_get_contract_listeners.go:35-43 β€” before extracting anything, compare `internal/apiserver/route_get_contract_api_listeners.go` and `internal/apiserver/route_get_contract_listeners.go` as WHOLE FILES: 82% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it β€” treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `internal/apiserver/route_get_contract_api_listeners.go:38` it does not close everything it opens, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) internal/assets/operations.go:74 β€” internal/assets/operations.go:74-82 | internal/assets/operations.go:87-95 β€” both copies are in the same file, so extract the 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) internal/blockchain/ethereum/address_resolver.go:143 β€” internal/blockchain/ethereum/address_resolver.go:143-151 | internal/blockchain/tezos/address_resolver.go:140-148 β€” `internal/blockchain/ethereum/address_resolver.go` and `internal/blockchain/tezos/address_resolver.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 4 separate duplicated blocks between them, totalling at least 102 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 `internal/blockchain/ethereum/address_resolver.go:143` 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) REDACTED:403 β€” REDACTED:403-411 | REDACTED:459-467 β€” 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:403` it does not close everything it opens, so those exact lines 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) REDACTED:972 β€” REDACTED:972-980 | REDACTED:444-452 β€” 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) internal/broadcast/operations.go:91 β€” internal/broadcast/operations.go:91-99 | internal/multiparty/operations.go:82-90 β€” 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 (9 lines × 2) internal/database/sqlcommon/tokenbalance_sql.go:211 β€” internal/database/sqlcommon/tokenbalance_sql.go:211-219 | internal/database/sqlcommon/tokenbalance_sql.go:239-247 β€” both copies are in the same file, so extract the 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) internal/privatemessaging/operations.go:87 β€” internal/privatemessaging/operations.go:87-95 | internal/privatemessaging/operations.go:107-115 β€” both copies are in the same file, so extract the 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) internal/apiserver/route_get_namespaces.go:38 β€” internal/apiserver/route_get_namespaces.go:38-46 | internal/apiserver/route_spi_get_namespaces.go:37-45 β€” before extracting anything, compare `internal/apiserver/route_get_namespaces.go` and `internal/apiserver/route_spi_get_namespaces.go` as WHOLE FILES: 86% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it β€” treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `internal/apiserver/route_get_namespaces.go:38` it runs out through the closing brace of the declaration holding it β€” the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) internal/dataexchange/ffdx/ffdx.go:250 β€” internal/dataexchange/ffdx/ffdx.go:250-258 | internal/tokens/fftokens/fftokens.go:395-403 β€” the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach β€” a location they all depend on today, or a new shared one if there is none β€” and call it from each site; until then, every change has to be made twice. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead β€” before the caller uses what it releases β€” so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register. Note first that the copies are not typed on the same thing: the declarations holding them bind `string` to `h *FFDX) SetOperationHandler(namespace` in one and `ft *FFTokens) SetOperationHandler(namespace` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH β€” their common supertype where they have one, or a new abstraction over them where they do not β€” and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (9 lines × 2) internal/events/tokens_approved.go:66 β€” internal/events/tokens_approved.go:66-74 | internal/events/tokens_transferred.go:65-73 β€” before extracting anything, compare `internal/events/tokens_approved.go` and `internal/events/tokens_transferred.go` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 62 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place.
D3 Β· God Classes Β· FileTooLong Β· Γ—9
  • FileTooLong: contracts/manager.go internal/contracts/manager.go β€” FileTooLong β€” 863 significant lines (blank, comment-only and punctuation-only lines excluded), about 87% of them inside a single declaration: contractManager (52 blocks, 91-1398). The bar is 500 significant lines; this is 363 over it, 1.73× 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 β€” 803 significant lines (blank, comment-only and punctuation-only lines excluded), about 90% of them inside a single declaration: Ethereum (50 blocks, 56-1244). The bar is 500 significant lines; this is 303 over it, 1.61× 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: namespace/manager.go internal/namespace/manager.go β€” FileTooLong β€” 758 significant lines (blank, comment-only and punctuation-only lines excluded), about 85% of them inside a single declaration: namespaceManager (41 blocks, 89-1172). The bar is 500 significant lines; this is 258 over it, 1.52× 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: fftokens/fftokens.go internal/tokens/fftokens/fftokens.go β€” FileTooLong β€” 745 significant lines (blank, comment-only and punctuation-only lines excluded), about 74% of them inside a single declaration: FFTokens (30 blocks, 54-1068). The bar is 500 significant lines; this is 245 over it, 1.49× 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 β€” 715 significant lines (blank, comment-only and punctuation-only lines excluded), about 80% of them inside a single declaration: Fabric (46 blocks, 49-1132). The bar is 500 significant lines; this is 215 over it, 1.43× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body β€” the parts that share the same inputs and are named together β€” into its own unit in a sibling file, and have the original call them.
  • FileTooLong: REDACTED REDACTED β€” FileTooLong β€” 583 significant lines (blank, comment-only and punctuation-only lines excluded), about 70% of them inside a single declaration: GenerateObjectsReferenceMarkdown (51-690). The bar is 500 significant lines; this is 83 over it, 1.17× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body β€” the parts that share the same inputs and are named together β€” into its own unit in a sibling file, and have the original call them.
  • FileTooLong: database/plugin.go pkg/database/plugin.go β€” FileTooLong β€” 537 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 37 over it, 1.07× 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: coremsgs/en_struct_descriptions.go internal/coremsgs/en_struct_descriptions.go β€” FileTooLong β€” 528 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 28 over it, 1.06× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: REDACTED REDACTED β€” FileTooLong β€” 525 significant lines (blank, comment-only and punctuation-only lines excluded), about 87% of them inside a single declaration: Tezos (46 blocks, 48-842). The bar is 500 significant lines; this is 25 over it, 1.05× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body β€” the parts that share the same inputs and are named together β€” into its own unit in a sibling file, and have the original call them.
D4 Β· Code Duplication Β· Duplicated block (13 lines × 2) Β· Γ—9
  • Duplicated block (13 lines × 2) internal/apiserver/ffi2swagger.go:184 β€” internal/apiserver/ffi2swagger.go:184-196 | internal/apiserver/ffi2swagger.go:218-230 β€” both copies are in the same file, so extract the block into one function there and call it from each site β€” the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `internal/apiserver/ffi2swagger.go:184` 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. β˜… These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `internal/apiserver/ffi2swagger.go:217` calls `Expand` and `internal/apiserver/ffi2swagger.go:183` 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 × 2) internal/tokens/fftokens/fftokens.go:742 β€” REDACTED:525-537 | internal/tokens/fftokens/fftokens.go:742-754 β€” 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:525` it does not close everything it opens, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. β˜… These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `REDACTED:524` calls `close` and `internal/tokens/fftokens/fftokens.go:741` 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) internal/blockchain/tezos/eventstream.go:128 β€” internal/blockchain/cardano/eventstream.go:118-130 | internal/blockchain/tezos/eventstream.go:128-140 β€” `internal/blockchain/cardano/eventstream.go` and `internal/blockchain/tezos/eventstream.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 5 separate duplicated blocks between them, totalling at least 49 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 `internal/blockchain/cardano/eventstream.go:118` 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) internal/blockchain/ethereum/eventstream.go:238 β€” internal/blockchain/ethereum/eventstream.go:238-250 | internal/blockchain/fabric/eventstream.go:213-225 β€” `internal/blockchain/ethereum/eventstream.go` and `internal/blockchain/fabric/eventstream.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 7 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 `internal/blockchain/ethereum/eventstream.go:238` 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:787 β€” REDACTED:787-799 | internal/dataexchange/ffdx/ffdx.go:575-587 β€” 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:787` it does not close everything it opens, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. β˜… These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `REDACTED:786` calls `close` and `internal/dataexchange/ffdx/ffdx.go:574` 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 × 2) internal/database/sqlcommon/contractapis_sql.go:113 β€” internal/database/sqlcommon/contractapis_sql.go:113-125 | internal/database/sqlcommon/ffi_sql.go:105-117 β€” 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 `internal/database/sqlcommon/contractapis_sql.go:113` 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.
  • Duplicated block (13 lines × 2) internal/apiserver/route_get_namespace.go:37 β€” internal/apiserver/route_get_namespace.go:37-49 | internal/apiserver/route_spi_get_namespace_by_name.go:36-48 β€” 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 `internal/apiserver/route_get_namespace.go:37` 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) internal/blockchain/ethereum/eventstream.go:97 β€” internal/blockchain/ethereum/eventstream.go:97-109 | internal/blockchain/fabric/eventstream.go:90-102 β€” `internal/blockchain/ethereum/eventstream.go` and `internal/blockchain/fabric/eventstream.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 7 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.
  • Duplicated block (13 lines × 2) internal/broadcast/message.go:31 β€” internal/broadcast/message.go:31-43 | internal/privatemessaging/message.go:31-43 β€” the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach β€” a location they all depend on today, or a new shared one if there is none β€” and call it from each site; until then, every change has to be made twice.
D4 Β· Code Duplication Β· Duplicated block (11 lines × 2) Β· Γ—9
  • Duplicated block (11 lines × 2) REDACTED:553 β€” REDACTED:553-563 | REDACTED:295-305 β€” 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:553` 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 (11 lines × 2) REDACTED:758 β€” REDACTED:758-768 | REDACTED:331-341 β€” 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) internal/contracts/manager.go:347 β€” internal/contracts/manager.go:347-357 | internal/contracts/manager.go:388-398 β€” both copies are in the same file, so extract the block into one function there and call it from each site β€” the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `internal/contracts/manager.go:347` it does not close everything it opens, so those exact lines 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) internal/dataexchange/ffdx/dxevent.go:93 β€” internal/dataexchange/ffdx/dxevent.go:93-103 | internal/dataexchange/ffdx/dxevent.go:133-143 β€” both copies are in the same file, so extract the block into one function there and call it from each site β€” the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied β€” no decision has to be handed back and re-acted on.
  • Duplicated block (11 lines × 2) REDACTED:246 β€” REDACTED:246-256 | REDACTED:297-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.
  • Duplicated block (11 lines × 2) REDACTED:595 β€” REDACTED:595-605 | REDACTED:692-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.
  • Duplicated block (11 lines × 2) REDACTED:892 β€” REDACTED:892-902 | REDACTED:750-760 β€” 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) REDACTED:204 β€” REDACTED:204-214 | internal/tokens/fftokens/fftokens.go:305-315 β€” 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: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. 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) internal/tokens/fftokens/fftokens.go:988 β€” internal/tokens/fftokens/fftokens.go:988-998 | internal/tokens/fftokens/fftokens.go:1024-1034 β€” both copies are in the same file, so extract the block into one function there and call it from each site β€” the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `internal/tokens/fftokens/fftokens.go:988` 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.
D3 Β· God Classes Β· ClassTooLong Β· Γ—6
  • ClassTooLong: contractManager internal/contracts/manager.go:91 β€” ClassTooLong β€” 752 significant lines (blank, comment-only and punctuation-only lines excluded), 54 methods, 52 blocks, lines 91-1398. 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: Ethereum REDACTED:56 β€” ClassTooLong β€” 719 significant lines (blank, comment-only and punctuation-only lines excluded), 50 methods, 50 blocks, lines 56-1244. The bar is 400 significant lines; this is 319 over it, 1.80× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: namespaceManager internal/namespace/manager.go:89 β€” ClassTooLong β€” 641 significant lines (blank, comment-only and punctuation-only lines excluded), 51 methods, 41 blocks, lines 89-1172. The bar is 400 significant lines; this is 241 over it, 1.60× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: Fabric REDACTED:49 β€” ClassTooLong β€” 570 significant lines (blank, comment-only and punctuation-only lines excluded), 46 methods, 46 blocks, lines 49-1132. The bar is 400 significant lines; this is 170 over it, 1.43× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: FFTokens internal/tokens/fftokens/fftokens.go:54 β€” ClassTooLong β€” 553 significant lines (blank, comment-only and punctuation-only lines excluded), 30 methods, 30 blocks, lines 54-1068. The bar is 400 significant lines; this is 153 over it, 1.38× 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: Tezos REDACTED:48 β€” ClassTooLong β€” 456 significant lines (blank, comment-only and punctuation-only lines excluded), 46 methods, 46 blocks, lines 48-842. The bar is 400 significant lines; this is 56 over it, 1.14× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D4 Β· Code Duplication Β· Edited copy of a member (21 corresponding lines) Β· Γ—6
  • Edited copy of a member (21 corresponding lines) internal/apiserver/route_post_data_blob_publish.go:28 β€” internal/apiserver/route_post_data_blob_publish.go:28-48 | internal/apiserver/route_post_data_value_publish.go:28-48 β€” 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) internal/assets/token_approval.go:214 β€” internal/assets/token_approval.go:214-234 | internal/assets/token_transfer.go:91-119 β€” These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) internal/database/sqlcommon/blockchainevents_sql.go:127 β€” internal/database/sqlcommon/blockchainevents_sql.go:127-147 | internal/database/sqlcommon/tokentransfer_sql.go:105-127 β€” 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) REDACTED:540 β€” REDACTED:540-563 | REDACTED:285-305 β€” 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) internal/database/sqlcommon/contractapis_sql.go:191 β€” internal/database/sqlcommon/contractapis_sql.go:191-213 | internal/database/sqlcommon/ffi_sql.go:182-202 β€” 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) pkg/core/node.go:47 β€” pkg/core/node.go:47-67 | pkg/core/organization.go:43-64 β€” 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 (18 corresponding lines) Β· Γ—6
  • Edited copy of a member (18 corresponding lines) internal/apiserver/route_get_namespaces.go:28 β€” internal/apiserver/route_get_namespaces.go:28-46 | internal/apiserver/route_spi_get_namespaces.go:28-45 β€” 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) internal/definitions/handler_contracts.go:193 β€” internal/definitions/handler_contracts.go:193-210 | internal/definitions/handler_contracts.go:230-247 β€” 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) internal/events/websockets/websocket_connection.go:65 β€” internal/events/websockets/websocket_connection.go:65-86 | internal/spievents/websockets.go:50-67 β€” 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) internal/blockchain/common/common.go:240 β€” internal/blockchain/common/common.go:240-257 | internal/blockchain/common/common.go:259-277 β€” 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) internal/broadcast/message.go:90 β€” internal/broadcast/message.go:90-107 | internal/privatemessaging/message.go:101-120 β€” 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) internal/blockchain/ethereum/eventstream.go:137 β€” internal/blockchain/ethereum/eventstream.go:137-158 | internal/blockchain/fabric/eventstream.go:117-134 β€” 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 Β· Duplicated block (12 lines × 2) Β· Γ—6
  • Duplicated block (12 lines × 2) internal/apiserver/routes.go:181 β€” internal/apiserver/routes.go:181-192 | internal/apiserver/spi_routes.go:40-51 β€” 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 `internal/apiserver/routes.go:181` it does not close everything it opens, so those exact lines 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) REDACTED:155 β€” REDACTED:95-106 | REDACTED:155-166 β€” 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) internal/events/tokens_approved.go:158 β€” internal/events/tokens_approved.go:158-169 | internal/events/tokens_transferred.go:154-165 β€” before extracting anything, compare `internal/events/tokens_approved.go` and `internal/events/tokens_transferred.go` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 62 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `internal/events/tokens_approved.go:158` it runs out through the closing brace of the declaration holding it β€” the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12 lines × 2) pkg/core/operation.go:119 β€” pkg/core/operation.go:119-130 | pkg/core/operation.go:137-148 β€” both copies are in the same file, so extract the block into one function there and call it from each site β€” the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/core/operation.go:119` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied β€” no decision has to be handed back and re-acted on.
  • Duplicated block (12 lines × 2) internal/apiserver/route_get_identities.go:39 β€” internal/apiserver/route_get_identities.go:39-50 | internal/apiserver/route_get_net_identities.go:39-50 β€” before extracting anything, compare `internal/apiserver/route_get_identities.go` and `internal/apiserver/route_get_net_identities.go` as WHOLE FILES: 85% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it β€” treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `internal/apiserver/route_get_identities.go: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 (12 lines × 2) internal/apiserver/route_get_identity_by_did.go:39 β€” internal/apiserver/route_get_identity_by_did.go:39-50 | internal/apiserver/route_get_net_did.go:40-51 β€” before extracting anything, compare `internal/apiserver/route_get_identity_by_did.go` and `internal/apiserver/route_get_net_did.go` as WHOLE FILES: 92% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it β€” treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `internal/apiserver/route_get_identity_by_did.go:39` it runs out through the closing brace of the declaration holding it β€” the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 Β· Code Duplication Β· Duplicated block (9 lines × 3) Β· Γ—6
  • Duplicated block (9 lines × 3) internal/apiserver/route_post_contract_api_invoke.go:42 β€” internal/apiserver/route_post_contract_api_invoke.go:42-50 | internal/apiserver/route_post_contract_deploy.go:39-47 | internal/apiserver/route_post_contract_invoke.go:39-47 β€” the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach β€” a file they already depend on, or a new one alongside them β€” and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `internal/apiserver/route_post_contract_api_invoke.go:42` it does not close everything it opens, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 3) REDACTED:882 β€” REDACTED:374-382 | REDACTED:882-890 | REDACTED:740-748 β€” 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. 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 × 3) REDACTED:1198 β€” REDACTED:492-500 | REDACTED:1198-1206 | REDACTED:554-562 β€” 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 `REDACTED:492` it does not close everything it opens, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 3) internal/database/sqlcommon/ffi_errors_sql.go:59 β€” internal/database/sqlcommon/ffi_errors_sql.go:59-67 | internal/database/sqlcommon/ffi_events_sql.go:61-69 | internal/database/sqlcommon/ffi_methods_sql.go:62-70 β€” the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach β€” a file they already depend on, or a new one alongside them β€” and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `internal/database/sqlcommon/ffi_errors_sql.go:59` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows β€” the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run β€” a one-line delegation has no helper inside it to lift β€” so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (9 lines × 3) internal/definitions/handler_contracts.go:181 β€” internal/definitions/handler_contracts.go:181-189 | internal/definitions/handler_contracts.go:218-226 | internal/definitions/handler_tokenpool.go:45-53 β€” 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 (9 lines × 3) internal/data/message_writer.go:282 β€” internal/data/message_writer.go:282-290 | internal/operations/operation_updater.go:400-408 | internal/txwriter/txwriter.go:242-250 β€” the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach β€” a location they all depend on today, or a new shared one if there is none β€” and call it from each site; until then, every change has to be made 3 times.
D4 Β· Code Duplication Β· Duplicated block (7 lines × 3) Β· Γ—6
  • Duplicated block (7 lines × 3) internal/apiserver/route_get_contract_api_interface.go:37 β€” internal/apiserver/route_get_contract_api_interface.go:37-43 | internal/apiserver/route_get_contract_interface.go:40-46 | internal/apiserver/route_get_contract_interface_name_version.go:41-47 β€” the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach β€” a file they already depend on, or a new one alongside them β€” and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `internal/apiserver/route_get_contract_api_interface.go:37` it does not close everything it opens, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 3) internal/blockchain/ethereum/eventstream.go:282 β€” internal/blockchain/ethereum/eventstream.go:282-288 | internal/blockchain/fabric/eventstream.go:261-267 | internal/blockchain/tezos/eventstream.go:206-212 β€” `internal/blockchain/ethereum/eventstream.go` and `internal/blockchain/fabric/eventstream.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 7 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 `internal/blockchain/ethereum/eventstream.go:282` it does not close everything it opens, so those 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) REDACTED:873 β€” REDACTED:345-351 | REDACTED:873-879 | REDACTED:401-407 β€” 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) internal/database/difactory/factory.go:29 β€” internal/database/difactory/factory.go:29-35 | internal/dataexchange/dxfactory/factory.go:38-44 | internal/identity/iifactory/factory.go:35-41 β€” the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach β€” a location they all depend on today, or a new shared one if there is none β€” and call it from each site; until then, every change has to be made 3 times. β˜… These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `internal/identity/iifactory/factory.go:32` calls `Name` and `internal/database/difactory/factory.go:27` does not β€” after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (7 lines × 3) internal/blockchain/ethereum/eventstream.go:125 β€” internal/blockchain/cardano/eventstream.go:103-109 | internal/blockchain/ethereum/eventstream.go:125-131 | internal/blockchain/tezos/eventstream.go:113-119 β€” `internal/blockchain/cardano/eventstream.go` and `internal/blockchain/tezos/eventstream.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 5 separate duplicated blocks between them, totalling at least 49 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 `internal/blockchain/cardano/eventstream.go:103` it does not close everything it opens, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 3) internal/blockchain/ethereum/eventstream.go:112 β€” internal/blockchain/cardano/eventstream.go:90-96 | internal/blockchain/ethereum/eventstream.go:112-118 | internal/blockchain/tezos/eventstream.go:100-106 β€” `internal/blockchain/cardano/eventstream.go` and `internal/blockchain/tezos/eventstream.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 5 separate duplicated blocks between them, totalling at least 49 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 `internal/blockchain/cardano/eventstream.go:90` it does not close everything it opens, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 Β· Code Duplication Β· Duplicated block (5 lines × 2) Β· Γ—6
  • Duplicated block (5 lines × 2) internal/apiserver/route_get_data.go:36 β€” internal/apiserver/route_get_data.go:36-40 | internal/apiserver/route_get_msg_data.go:37-41 β€” 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 `internal/apiserver/route_get_data.go:36` it does not close everything it opens, so those exact lines 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) internal/apiserver/route_get_identity_did.go:36 β€” internal/apiserver/route_get_identity_did.go:36-40 | internal/apiserver/route_get_net_diddoc.go:35-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 both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `internal/apiserver/route_get_identity_did.go:36` it does not close everything it opens, so those exact lines 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) internal/apiserver/route_get_identity_verifiers.go:38 β€” internal/apiserver/route_get_identity_verifiers.go:38-42 | internal/apiserver/route_get_verifiers.go:36-40 β€” the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach β€” a file they already depend on, or a new one alongside them β€” and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `internal/apiserver/route_get_identity_verifiers.go:38` it does not close everything it opens, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) internal/apiserver/route_get_msg_txn.go:36 β€” internal/apiserver/route_get_msg_txn.go:36-40 | internal/apiserver/route_get_txn_by_id.go:38-42 β€” 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 `internal/apiserver/route_get_msg_txn.go:36` it does not close everything it opens, so those exact lines 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) internal/apiserver/route_get_net_nodes.go:36 β€” internal/apiserver/route_get_net_nodes.go:36-40 | internal/apiserver/route_get_net_orgs.go:36-40 β€” before extracting anything, compare `internal/apiserver/route_get_net_nodes.go` and `internal/apiserver/route_get_net_orgs.go` as WHOLE FILES: 86% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it β€” treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `internal/apiserver/route_get_net_nodes.go:36` it does not close everything it opens, so those exact lines 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) internal/apiserver/route_post_contract_api_publish.go:40 β€” internal/apiserver/route_post_contract_api_publish.go:40-44 | internal/apiserver/route_post_contract_interface_publish.go:41-45 β€” the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach β€” a file they already depend on, or a new one alongside them β€” and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `internal/apiserver/route_post_contract_api_publish.go:40` it does not close everything it opens, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 Β· Code Duplication Β· Edited copy of a member (7 corresponding lines) Β· Γ—5
  • Edited copy of a member (7 corresponding lines) REDACTED:1000 β€” REDACTED:431-437 | REDACTED:1000-1009 β€” 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) internal/sharedstorage/ssfactory/factory.go:34 β€” internal/sharedstorage/ssfactory/factory.go:34-40 | internal/tokens/tifactory/factory.go:34-41 β€” 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) internal/assets/token_transfer.go:36 β€” internal/assets/token_transfer.go:36-42 | internal/orchestrator/data_query.go:100-106 β€” 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) internal/events/eifactory/factory.go:51 β€” internal/events/eifactory/factory.go:51-57 | internal/events/subscription_manager.go:258-264 β€” 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) smart_contracts/corda/cordapp_kat/kat-contracts/src/main/java/io/kaleido/kat/states/AssetInstanceCreated.java:34 β€” smart_contracts/corda/cordapp_kat/kat-contracts/src/main/java/io/kaleido/kat/states/AssetInstanceCreated.java:34-40 | smart_contracts/corda/cordapp_kat/kat-contracts/src/main/java/io/kaleido/kat/states/DescribedAssetInstanceCreated.java:35-42 β€” 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) Β· Γ—5
  • Duplicated block (6 lines × 2) internal/apiserver/ffi2swagger.go:83 β€” internal/apiserver/ffi2swagger.go:83-88 | internal/apiserver/ffi2swagger.go:119-124 β€” both copies are in the same file, so extract the block into one function there and call it from each site β€” the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `internal/apiserver/ffi2swagger.go: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 (6 lines × 2) internal/apiserver/route_get_data_msgs.go:41 β€” internal/apiserver/route_get_data_msgs.go:41-46 | internal/apiserver/route_post_new_message_requestreply.go:37-42 β€” 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 `internal/apiserver/route_get_data_msgs.go:41` it does not close everything it opens, so those exact lines 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) internal/apiserver/route_get_group_by_id.go:39 β€” internal/apiserver/route_get_group_by_id.go:39-44 | internal/apiserver/route_get_groups.go:39-44 β€” the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach β€” a file they already depend on, or a new one alongside them β€” and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `internal/apiserver/route_get_group_by_id.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.
  • Duplicated block (6 lines × 2) internal/tokens/fftokens/fftokens.go:809 β€” internal/tokens/fftokens/fftokens.go:809-814 | internal/tokens/fftokens/fftokens.go:844-849 β€” both copies are in the same file, so extract the block into one function there and call it from each site β€” the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `internal/tokens/fftokens/fftokens.go:809` it does not close everything it opens, so those 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) internal/apiserver/route_patch_update_identity.go:40 β€” internal/apiserver/route_patch_update_identity.go:40-45 | internal/apiserver/route_post_new_identity.go:38-43 β€” the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach β€” a file they already depend on, or a new one alongside them β€” and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `internal/apiserver/route_patch_update_identity.go:40` it does not close everything it opens, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
D8 Β· Code Coverage Β· Low coverage Β· Γ—5
  • Low coverage: auditevents/main.go auditevents/main.go:1 β€” 0.0% line coverage (0/64).
  • Low coverage: main.go main.go:1 β€” 0.0% line coverage (0/5).
  • Low coverage: smart_contracts/fabric/custompin-sample/custompin.go smart_contracts/fabric/custompin-sample/custompin.go:1 β€” 0.0% line coverage (0/7).
  • Low coverage: smart_contracts/fabric/firefly-go/chaincode/contract.go smart_contracts/fabric/firefly-go/chaincode/contract.go:1 β€” 37.0% line coverage (10/27).
  • Low coverage: smart_contracts/fabric/firefly-go/firefly.go smart_contracts/fabric/firefly-go/firefly.go:1 β€” 0.0% line coverage (0/7).
D4 Β· Code Duplication Β· Edited copy of a member (20 corresponding lines) Β· Γ—4
  • Edited copy of a member (20 corresponding lines) internal/apiserver/route_post_network_action.go:28 β€” internal/apiserver/route_post_network_action.go:28-47 | internal/apiserver/route_post_new_message_requestreply.go:28-47 β€” 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) internal/apiserver/route_get_group_by_id.go:28 β€” internal/apiserver/route_get_group_by_id.go:28-48 | internal/apiserver/route_get_groups.go:29-48 β€” 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) REDACTED:832 β€” REDACTED:832-851 | REDACTED:371-392 β€” 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) internal/dataexchange/ffdx/ffdx.go:424 β€” internal/dataexchange/ffdx/ffdx.go:424-443 | internal/dataexchange/ffdx/ffdx.go:445-464 β€” These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 Β· Code Duplication Β· Edited copy of a member (16 corresponding lines) Β· Γ—4
  • Edited copy of a member (16 corresponding lines) internal/apiserver/routes.go:180 β€” internal/apiserver/routes.go:180-199 | internal/apiserver/spi_routes.go:39-54 β€” These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) REDACTED:264 β€” REDACTED:196-211 | REDACTED:264-279 β€” 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) internal/blockchain/tezos/eventstream.go:125 β€” internal/blockchain/cardano/eventstream.go:115-130 | internal/blockchain/tezos/eventstream.go:125-140 β€” These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) REDACTED:379 β€” REDACTED:379-395 | REDACTED:398-413 β€” These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 Β· Code Duplication Β· Edited copy of a member (11 corresponding lines) Β· Γ—4
  • Edited copy of a member (11 corresponding lines) internal/blockchain/ethereum/eventstream.go:198 β€” internal/blockchain/ethereum/eventstream.go:198-209 | internal/blockchain/fabric/eventstream.go:174-184 β€” 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) internal/events/subscription_manager.go:424 β€” internal/events/subscription_manager.go:424-434 | REDACTED:194-207 β€” 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) internal/events/event_enrich.go:47 β€” internal/events/event_enrich.go:47-57 | internal/tokens/fftokens/fftokens.go:880-890 β€” 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) internal/namespace/manager.go:1090 β€” internal/namespace/manager.go:1090-1100 | internal/namespace/manager.go:1102-1113 β€” These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 Β· Code Duplication Β· Duplicated block (14 lines × 2) Β· Γ—4
  • Duplicated block (14 lines × 2) internal/apiserver/server.go:253 β€” internal/apiserver/server.go:253-266 | internal/apiserver/server.go:275-288 β€” both copies are in the same file, so extract the block into one function there and call it from each site β€” the copies drift apart the first time only one of them is edited.
  • Duplicated block (14 lines × 2) internal/database/sqlcommon/contractapis_sql.go:142 β€” internal/database/sqlcommon/contractapis_sql.go:142-155 | internal/database/sqlcommon/tokenpool_sql.go:183-196 β€” 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 `internal/database/sqlcommon/contractapis_sql.go:142` 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) internal/dataexchange/ffdx/dxevent.go:105 β€” internal/dataexchange/ffdx/dxevent.go:105-118 | internal/dataexchange/ffdx/dxevent.go:145-158 β€” both copies are in the same file, so extract the block into one function there and call it from each site β€” the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied β€” no decision has to be handed back and re-acted on.
  • Duplicated block (14 lines × 2) internal/blockchain/ethereum/address_resolver.go:42 β€” internal/blockchain/ethereum/address_resolver.go:42-55 | internal/blockchain/tezos/address_resolver.go:42-55 β€” `internal/blockchain/ethereum/address_resolver.go` and `internal/blockchain/tezos/address_resolver.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 4 separate duplicated blocks between them, totalling at least 102 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.
D29 Β· Static Analysis (SAST) Β· REDACTED Β· Γ—3
  • REDACTED
  • REDACTED
  • REDACTED
D3 Β· God Classes Β· MethodTooLong Β· Γ—3
  • MethodTooLong: orchestrator.GetTransactionStatus internal/orchestrator/txn_status.go:65 β€” MethodTooLong β€” GetTransactionStatus runs 116 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 16 over it, 1.16× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body β€” the runs of statements that work on the same values and would earn the same name β€” into its own named unit, and have this one call them in order.
  • MethodTooLong: namespaceManager.loadNamespace internal/namespace/manager.go:801 β€” MethodTooLong β€” loadNamespace runs 111 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 11 over it, 1.11× 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: FFDX.dispatchEvent internal/dataexchange/ffdx/dxevent.go:85 β€” MethodTooLong β€” dispatchEvent runs 106 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 6 over it, 1.06× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body β€” the runs of statements that work on the same values and would earn the same name β€” into its own named unit, and have this one call them in order.
D31 Β· IaC & Container Security Β· Medium IaC Β· Γ—3
  • REDACTED
  • REDACTED
  • REDACTED
D4 Β· Code Duplication Β· Edited copy of a member (40 corresponding lines) Β· Γ—3
  • Edited copy of a member (40 corresponding lines) internal/events/tokens_approved.go:130 β€” internal/events/tokens_approved.go:130-169 | internal/events/tokens_transferred.go:126-165 β€” 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.
  • Edited copy of a member (40 corresponding lines) internal/blockchain/ethereum/eventstream.go:211 β€” internal/blockchain/ethereum/eventstream.go:211-250 | internal/blockchain/fabric/eventstream.go:186-225 β€” 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.
  • Edited copy of a member (40 corresponding lines) internal/broadcast/manager.go:219 β€” internal/broadcast/manager.go:219-268 | internal/broadcast/manager.go:270-309 β€” 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 (22 corresponding lines) Β· Γ—3
  • Edited copy of a member (22 corresponding lines) internal/apiserver/route_get_events.go:29 β€” internal/apiserver/route_get_events.go:29-51 | internal/apiserver/route_get_msgs.go:29-50 β€” 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) internal/apiserver/route_get_namespace.go:28 β€” internal/apiserver/route_get_namespace.go:28-49 | internal/apiserver/route_spi_get_namespace_by_name.go:27-48 β€” 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) internal/events/blob_receiver.go:64 β€” internal/events/blob_receiver.go:64-85 | internal/operations/operation_updater.go:65-88 β€” These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 Β· Code Duplication Β· Edited copy of a member (29 corresponding lines) Β· Γ—3
  • Edited copy of a member (29 corresponding lines) REDACTED:655 β€” REDACTED:655-687 | REDACTED:655-683 β€” These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (29 corresponding lines) internal/database/sqlcommon/contractlisteners_sql.go:264 β€” internal/database/sqlcommon/contractlisteners_sql.go:264-292 | internal/database/sqlcommon/operation_sql.go:216-249 β€” These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (29 corresponding lines) internal/database/sqlcommon/group_sql.go:250 β€” internal/database/sqlcommon/group_sql.go:250-278 | internal/database/sqlcommon/message_sql.go:476-506 β€” These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 Β· Code Duplication Β· Edited copy of a member (23 corresponding lines) Β· Γ—3
  • Edited copy of a member (23 corresponding lines) internal/events/tokens_approved.go:39 β€” internal/events/tokens_approved.go:39-61 | internal/events/tokens_transferred.go:38-60 β€” 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) REDACTED:1136 β€” REDACTED:1136-1160 | REDACTED:1056-1078 β€” 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) REDACTED:344 β€” REDACTED:344-377 | REDACTED:370-392 β€” These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 Β· Code Duplication Β· Edited copies of one member (3 members, 19+ corresponding lines) Β· Γ—3
  • Edited copies of one member (3 members, 19+ corresponding lines) internal/apiserver/route_get_net_node.go:27 β€” internal/apiserver/route_get_net_node.go:27-45 | internal/apiserver/route_get_net_org.go:27-45 | internal/apiserver/route_get_token_pool_by_name_or_id.go:27-45 β€” These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 19 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 19+ corresponding lines) internal/apiserver/route_get_data_by_id.go:27 β€” internal/apiserver/route_get_data_by_id.go:27-45 | internal/apiserver/route_get_data_msgs.go:29-50 | internal/apiserver/route_get_data_value.go:27-49 β€” These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 19 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 19+ corresponding lines) internal/apiserver/route_get_msg_data.go:27 β€” internal/apiserver/route_get_msg_data.go:27-46 | internal/apiserver/route_get_msg_events.go:28-46 | internal/apiserver/route_get_msg_txn.go:27-45 β€” These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 19 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 Β· Code Duplication Β· Edited copy of a member (26 corresponding lines) Β· Γ—3
  • Edited copy of a member (26 corresponding lines) REDACTED:969 β€” REDACTED:969-994 | REDACTED:443-473 β€” 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) internal/broadcast/message.go:139 β€” internal/broadcast/message.go:139-164 | internal/privatemessaging/message.go:156-184 β€” 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) internal/database/sqlcommon/tokenapproval_sql.go:150 β€” internal/database/sqlcommon/tokenapproval_sql.go:150-175 | internal/database/sqlcommon/tokentransfer_sql.go:129-155 β€” These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 Β· Code Duplication Β· Edited copy of a member (19 corresponding lines) Β· Γ—3
  • Edited copy of a member (19 corresponding lines) internal/apiserver/route_spi_get_op_by_id.go:27 β€” internal/apiserver/route_spi_get_op_by_id.go:27-45 | internal/apiserver/route_spi_patch_op_by_id.go:27-45 β€” 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) internal/database/sqlcommon/contractapis_sql.go:54 β€” internal/database/sqlcommon/contractapis_sql.go:54-76 | internal/database/sqlcommon/ffi_sql.go:53-71 β€” 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) internal/database/sqlcommon/nonce_sql.go:42 β€” internal/database/sqlcommon/nonce_sql.go:42-60 | internal/database/sqlcommon/nonce_sql.go:62-83 β€” These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 Β· Code Duplication Β· Edited copies of one member (3 members, 17+ corresponding lines) Β· Γ—3
  • Edited copies of one member (3 members, 17+ corresponding lines) internal/apiserver/route_get_identity_did.go:27 β€” internal/apiserver/route_get_identity_did.go:27-44 | internal/apiserver/route_get_net_diddoc.go:27-43 | internal/apiserver/route_get_verifier_by_id.go:27-44 β€” 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) internal/database/sqlcommon/tokenapproval_sql.go:263 β€” internal/database/sqlcommon/tokenapproval_sql.go:263-279 | internal/database/sqlcommon/tokenbalance_sql.go:263-279 | internal/database/sqlcommon/tokentransfer_sql.go:218-234 β€” 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) internal/assets/token_transfer.go:121 β€” internal/assets/token_transfer.go:121-137 | internal/assets/token_transfer.go:139-155 | internal/assets/token_transfer.go:157-173 β€” 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 copy of a member (24 corresponding lines) Β· Γ—3
  • Edited copy of a member (24 corresponding lines) internal/dataexchange/ffdx/ffdx.go:573 β€” internal/dataexchange/ffdx/ffdx.go:573-600 | internal/tokens/fftokens/fftokens.go:739-762 β€” 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) REDACTED:966 β€” REDACTED:966-989 | REDACTED:480-503 β€” 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) internal/syncasync/sync_async_bridge.go:264 β€” internal/syncasync/sync_async_bridge.go:264-287 | internal/syncasync/sync_async_bridge.go:289-317 β€” These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 Β· Code Duplication Β· Edited copies of one member (3 members, 16+ corresponding lines) Β· Γ—3
  • Edited copies of one member (3 members, 16+ corresponding lines) internal/database/sqlcommon/contractapis_sql.go:108 β€” internal/database/sqlcommon/contractapis_sql.go:108-125 | internal/database/sqlcommon/ffi_sql.go:99-117 | internal/database/sqlcommon/tokenpool_sql.go:152-167 β€” These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 16+ corresponding lines) internal/tokens/fftokens/fftokens.go:92 β€” internal/tokens/fftokens/fftokens.go:92-107 | internal/tokens/fftokens/fftokens.go:109-124 | internal/tokens/fftokens/fftokens.go:126-141 β€” These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 16+ corresponding lines) internal/database/sqlcommon/ffi_errors_sql.go:102 β€” internal/database/sqlcommon/ffi_errors_sql.go:102-117 | internal/database/sqlcommon/ffi_events_sql.go:105-121 | internal/database/sqlcommon/ffi_methods_sql.go:108-125 β€” These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 Β· Code Duplication Β· Edited copy of a member (15 corresponding lines) Β· Γ—3
  • Edited copy of a member (15 corresponding lines) internal/contracts/manager.go:1354 β€” internal/contracts/manager.go:1354-1368 | internal/contracts/manager.go:1370-1388 β€” 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) internal/database/sqlcommon/group_sql.go:234 β€” internal/database/sqlcommon/group_sql.go:234-248 | internal/database/sqlcommon/verifier_sql.go:130-144 β€” 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) internal/events/websockets/websocket_connection.go:479 β€” internal/events/websockets/websocket_connection.go:479-495 | internal/spievents/websockets.go:188-202 β€” 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 (12 corresponding lines) Β· Γ—3
  • Edited copy of a member (12 corresponding lines) internal/dataexchange/ffdx/ffdx.go:398 β€” internal/dataexchange/ffdx/ffdx.go:398-409 | internal/dataexchange/ffdx/ffdx.go:411-422 β€” 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) internal/txcommon/txcommon.go:111 β€” internal/txcommon/txcommon.go:111-122 | internal/txcommon/txcommon.go:303-314 β€” 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) internal/orchestrator/persistence_events.go:26 β€” internal/orchestrator/persistence_events.go:26-37 | internal/orchestrator/persistence_events.go:49-62 β€” These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 Β· Code Duplication Β· Edited copies of one member (3 members, 10+ corresponding lines) Β· Γ—3
  • Edited copies of one member (3 members, 10+ corresponding lines) internal/blockchain/ethereum/eventstream.go:86 β€” internal/blockchain/ethereum/eventstream.go:86-95 | internal/blockchain/fabric/eventstream.go:79-88 | internal/blockchain/tezos/eventstream.go:77-86 β€” 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) internal/blockchain/ethereum/eventstream.go:173 β€” internal/blockchain/ethereum/eventstream.go:173-182 | internal/blockchain/fabric/eventstream.go:149-158 | internal/blockchain/tezos/eventstream.go:142-151 β€” 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) pkg/core/namespace.go:100 β€” pkg/core/namespace.go:100-112 | pkg/core/subscription.go:189-198 | pkg/core/subscription.go:209-226 β€” These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 Β· Code Duplication Β· Edited copy of a member (10 corresponding lines) Β· Γ—3
  • Edited copy of a member (10 corresponding lines) internal/broadcast/operations.go:143 β€” internal/broadcast/operations.go:143-154 | internal/shareddownload/operations.go:99-108 β€” 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) smart_contracts/fabric/custompin-sample/custompin.go:14 β€” smart_contracts/fabric/custompin-sample/custompin.go:14-23 | smart_contracts/fabric/firefly-go/firefly.go:14-23 β€” 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) internal/database/sqlcommon/event_sql.go:81 β€” internal/database/sqlcommon/event_sql.go:81-92 | internal/database/sqlcommon/transaction_sql.go:61-70 β€” These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 Β· Code Duplication Β· Duplicated block (33 lines × 2) Β· Γ—3
  • Duplicated block (33 lines × 2) REDACTED:310 β€” REDACTED:650-682 | REDACTED:310-342 β€” the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach β€” a location they all depend on today, or a new shared one if there is none β€” and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (33 lines × 2) internal/blockchain/common/common.go:421 β€” internal/blockchain/common/common.go:421-453 | internal/blockchain/common/common.go:463-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.
  • Duplicated block (33 lines × 2) internal/database/sqlcommon/contractapis_sql.go:157 β€” internal/database/sqlcommon/contractapis_sql.go:157-189 | internal/database/sqlcommon/ffi_sql.go:148-180 β€” 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `error` to `optimization database.UpsertOptimization) (err` in one and `err` 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 (15–16 lines × 2) Β· Γ—3
  • Duplicated block (15–16 lines × 2) REDACTED:613 β€” REDACTED:613-627 | REDACTED:759-774 β€” both copies are in the same file, so extract the block into one function there and call it from each site β€” the copies drift 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:613` it does not close everything it opens, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. β˜… These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `REDACTED:775` calls `Contains`, `Body`, `NewError` and `REDACTED:629` 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) REDACTED:1230 β€” REDACTED:1230-1244 | REDACTED:586-601 β€” 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:1230` 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 (15–16 lines × 2) REDACTED:332 β€” REDACTED:332-347 | REDACTED:633-647 β€” both copies are in the same file, so extract the block into one function there and call it from each site β€” the copies drift 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:332` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 Β· Code Duplication Β· Duplicated block (5 lines × 3) Β· Γ—3
  • Duplicated block (5 lines × 3) internal/apiserver/route_get_events.go:40 β€” internal/apiserver/route_get_events.go:40-44 | internal/apiserver/route_get_msg_events.go:38-42 | internal/apiserver/route_get_subscription_events_filtered.go:44-48 β€” the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach β€” a file they already depend on, or a new one alongside them β€” and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `internal/apiserver/route_get_events.go:40` it does not close everything it opens, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 3) internal/apiserver/route_get_identity_by_id.go:39 β€” internal/apiserver/route_get_identity_by_id.go:39-43 | internal/apiserver/route_get_net_node.go:36-40 | internal/apiserver/route_get_net_org.go:36-40 β€” the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach β€” a file they already depend on, or a new one alongside them β€” and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `internal/apiserver/route_get_identity_by_id.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.
  • Duplicated block (5 lines × 3) internal/apiserver/route_post_token_burn.go:37 β€” internal/apiserver/route_post_token_burn.go:37-41 | internal/apiserver/route_post_token_mint.go:37-41 | internal/apiserver/route_post_token_transfer.go:37-41 β€” before extracting anything, compare `internal/apiserver/route_post_token_burn.go` and `internal/apiserver/route_post_token_mint.go` as WHOLE FILES: 86% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it β€” treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `internal/apiserver/route_post_token_burn.go:37` it does not close everything it opens, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
D6 Β· Cohesion (LCOM4) Β· Low cohesion Β· Γ—3
  • Low cohesion: SQLCommon (LCOM4 50) internal/database/sqlcommon/sqlcommon.go:33 β€” SQLCommon's methods fall into 50 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 50 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: Ethereum (LCOM4 4) REDACTED:56 β€” Ethereum's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable β€” your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected β€” and which would otherwise dominate this list β€” are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: Fabric (LCOM4 4) REDACTED:49 β€” Fabric's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable β€” your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected β€” and which would otherwise dominate this list β€” are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
D12 Β· Dependency Hygiene Β· Deprecated module Β· Γ—2
  • Deprecated module: github.com/golang/protobuf β€” `github.com/golang/protobuf` is required at v1.5.4 in REDACTED, and its author has DEPRECATED the module: "Use the "google.golang.org/protobuf" module instead." A deprecation is declared by the author in the module's own REDACTED and applies to the whole module, not to one release, so moving to a newer version of it does not clear this. Follow the replacement the notice names.
  • Deprecated module: github.com/golang/protobuf β€” `github.com/golang/protobuf` is required at v1.5.4 in REDACTED, and its author has DEPRECATED the module: "Use the "google.golang.org/protobuf" module instead." A deprecation is declared by the author in the module's own REDACTED and applies to the whole module, not to one release, so moving to a newer version of it does not clear this. Follow the replacement the notice names.
D3 Β· God Classes Β· FunctionTooLong Β· Γ—2
  • FunctionTooLong: reference.GenerateObjectsReferenceMarkdown REDACTED:51 β€” FunctionTooLong β€” GenerateObjectsReferenceMarkdown runs 409 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 309 over it, 4.09× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body β€” the runs of statements that work on the same values and would earn the same name β€” into its own named unit, and have this one call them in order.
  • FunctionTooLong: coreconfig.setDefaults internal/coreconfig/coreconfig.go:367 β€” FunctionTooLong β€” setDefaults runs 119 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 19 over it, 1.19× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body β€” the runs of statements that work on the same values and would earn the same name β€” into its own named unit, and have this one call them in order.
D30 Β· Dependency Vulnerabilities Β· Medium vulnerability Β· Γ—2
  • REDACTED
  • REDACTED
D35 Β· Change Coupling Β· Change coupling Β· Γ—2
  • Change coupling: route_post_contract_api_invoke.go ↔ route_post_contract_invoke.go internal/apiserver/route_post_contract_api_invoke.go:1 β€” `internal/apiserver/route_post_contract_api_invoke.go` and `internal/apiserver/route_post_contract_invoke.go` 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). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package β€” so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `56d344c4` Document the confirm option on the generated invoke APIs; `a4972b7f` disable contract routes when missing blockchain; `adc2e48c` Add namespace to contract API database queries β€” run `git show` on any of them.
  • Change coupling: route_post_new_contract_interface.go ↔ route_put_contract_api.go internal/apiserver/route_post_new_contract_interface.go:1 β€” `internal/apiserver/route_post_new_contract_interface.go` and `internal/apiserver/route_put_contract_api.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). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package β€” so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `18ea8703` -update: custom topics; `56d344c4` Document the confirm option on the generated invoke APIs; `a4972b7f` disable contract routes when missing blockchain β€” run `git show` on any of them.
D4 Β· Code Duplication Β· Members sharing a duplicated core (4 members, 50+ identical tokens) Β· Γ—2
  • Members sharing a duplicated core (4 members, 50+ identical tokens) REDACTED:607 β€” REDACTED:607-632 | REDACTED:742-783 | REDACTED:317-347 | REDACTED:627-647 β€” 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) internal/tokens/fftokens/fftokens.go:929 β€” internal/tokens/fftokens/fftokens.go:929-963 | internal/tokens/fftokens/fftokens.go:965-998 | internal/tokens/fftokens/fftokens.go:1000-1034 | internal/tokens/fftokens/fftokens.go:1036-1068 β€” 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 (59 corresponding lines) Β· Γ—2
  • Edited copy of a member (59 corresponding lines) REDACTED:135 β€” REDACTED:135-198 | REDACTED:191-249 β€” These two members are one piece of code written twice and then edited apart: 59 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (59 corresponding lines) internal/tokens/fftokens/fftokens.go:525 β€” internal/tokens/fftokens/fftokens.go:525-595 | internal/tokens/fftokens/fftokens.go:597-655 β€” These two members are one piece of code written twice and then edited apart: 59 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 Β· Code Duplication Β· Edited copy of a member (54 corresponding lines) Β· Γ—2
  • Edited copy of a member (54 corresponding lines) REDACTED:504 β€” REDACTED:504-560 | REDACTED:784-837 β€” 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.
  • Edited copy of a member (54 corresponding lines) internal/database/sqlcommon/namespace_sql.go:42 β€” internal/database/sqlcommon/namespace_sql.go:42-95 | internal/database/sqlcommon/offset_sql.go:44-104 β€” 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 Β· Edited copy of a member (28 corresponding lines) Β· Γ—2
  • Edited copy of a member (28 corresponding lines) internal/database/sqlcommon/group_sql.go:280 β€” internal/database/sqlcommon/group_sql.go:280-310 | internal/database/sqlcommon/message_sql.go:508-535 β€” 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) internal/blockchain/ethereum/eventstream.go:252 β€” internal/blockchain/ethereum/eventstream.go:252-279 | internal/blockchain/fabric/eventstream.go:227-258 β€” These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 Β· Code Duplication Β· Edited copies of one member (4 members, 17+ corresponding lines) Β· Γ—2
  • Edited copies of one member (4 members, 17+ corresponding lines) internal/apiserver/route_get_identity_verifiers.go:28 β€” internal/apiserver/route_get_identity_verifiers.go:28-46 | internal/apiserver/route_get_net_nodes.go:28-44 | internal/apiserver/route_get_net_orgs.go:28-44 | internal/apiserver/route_get_verifiers.go:28-44 β€” These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 17+ corresponding lines) internal/apiserver/route_get_token_account_pools.go:28 β€” internal/apiserver/route_get_token_account_pools.go:28-46 | internal/apiserver/route_get_token_accounts.go:28-44 | internal/apiserver/route_get_token_balances.go:28-44 | internal/apiserver/route_get_token_pools.go:28-44 β€” These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 Β· Code Duplication Β· Edited copies of one member (3 members, 18+ corresponding lines) Β· Γ—2
  • Edited copies of one member (3 members, 18+ corresponding lines) internal/contracts/manager.go:1218 β€” internal/contracts/manager.go:1218-1235 | internal/networkmap/data_query.go:32-52 | internal/networkmap/data_query.go:64-84 β€” 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) internal/database/sqlcommon/contractapis_sql.go:278 β€” internal/database/sqlcommon/contractapis_sql.go:278-295 | internal/database/sqlcommon/ffi_sql.go:275-292 | internal/database/sqlcommon/tokenpool_sql.go:331-348 β€” 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 copy of a member (14 corresponding lines) Β· Γ—2
  • Edited copy of a member (14 corresponding lines) internal/broadcast/message.go:109 β€” internal/broadcast/message.go:109-122 | internal/privatemessaging/message.go:122-136 β€” 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) internal/contracts/manager.go:528 β€” internal/contracts/manager.go:528-541 | internal/contracts/manager.go:1177-1193 β€” 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 (13 corresponding lines) Β· Γ—2
  • Edited copy of a member (13 corresponding lines) internal/orchestrator/data_query.go:319 β€” internal/orchestrator/data_query.go:319-331 | internal/orchestrator/data_query.go:333-345 β€” 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) internal/broadcast/message.go:45 β€” internal/broadcast/message.go:45-57 | internal/privatemessaging/message.go:45-57 β€” These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 Β· Code Duplication Β· Duplicated block (25 lines × 2) Β· Γ—2
  • Duplicated block (25 lines × 2) internal/database/sqlcommon/contractlisteners_sql.go:70 β€” internal/database/sqlcommon/contractlisteners_sql.go:70-94 | internal/database/sqlcommon/subscription_sql.go:63-87 β€” the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach β€” a file they already depend on, or a new one alongside them β€” and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `internal/database/sqlcommon/contractlisteners_sql.go:70` 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 (25 lines × 2) internal/assets/token_approval.go:236 β€” internal/assets/token_approval.go:236-260 | internal/assets/token_transfer.go:310-334 β€” 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 (21 lines × 2) Β· Γ—2
  • Duplicated block (21 lines × 2) internal/blockchain/ethereum/abi_definitions.go:31 β€” internal/blockchain/ethereum/abi_definitions.go:31-51 | internal/blockchain/ethereum/abi_definitions.go:58-78 β€” both copies are in the same file, so extract the block into one function there and call it from each site β€” the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `internal/blockchain/ethereum/abi_definitions.go:31` 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 (21 lines × 2) internal/blockchain/ethereum/eventstream.go:213 β€” internal/blockchain/ethereum/eventstream.go:213-233 | internal/blockchain/fabric/eventstream.go:188-208 β€” `internal/blockchain/ethereum/eventstream.go` and `internal/blockchain/fabric/eventstream.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 7 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 `internal/blockchain/ethereum/eventstream.go:213` it does not close everything it opens, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that. 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) Β· Γ—2
  • Duplicated block (20 lines × 2) REDACTED:175 β€” REDACTED:175-194 | REDACTED:226-245 β€” 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 (20 lines × 2) internal/events/tokens_approved.go:136 β€” internal/events/tokens_approved.go:136-155 | internal/events/tokens_transferred.go:132-151 β€” before extracting anything, compare `internal/events/tokens_approved.go` and `internal/events/tokens_transferred.go` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 62 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `internal/events/tokens_approved.go:136` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 Β· Code Duplication Β· Duplicated block (19 lines × 2) Β· Γ—2
  • Duplicated block (19 lines × 2) REDACTED:452 β€” REDACTED:452-470 | REDACTED:505-523 β€” 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:452` it does not close everything it opens, so those 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 (19 lines × 2) internal/definitions/handler_identity_claim.go:247 β€” internal/definitions/handler_identity_claim.go:247-265 | internal/definitions/handler_identity_update.go:88-106 β€” 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 `internal/definitions/handler_identity_claim.go:247` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows β€” the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run β€” a one-line delegation has no helper inside it to lift β€” so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 Β· Code Duplication Β· Duplicated block (15 lines × 2) Β· Γ—2
  • Duplicated block (15 lines × 2) REDACTED:1195 β€” REDACTED:1195-1209 | REDACTED:551-565 β€” 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:1195` it does not close everything it opens, so those 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) REDACTED:435 β€” REDACTED:435-449 | REDACTED:488-502 β€” 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:435` 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 (13–14 lines × 2) Β· Γ—2
  • Duplicated block (13–14 lines × 2) REDACTED:495 β€” REDACTED:562-574 | REDACTED:495-508 β€” 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:562` 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–14 lines × 2) REDACTED:382 β€” REDACTED:382-395 | REDACTED:401-413 β€” 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:382` 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 (12 lines × 3) Β· Γ—2
  • Duplicated block (12 lines × 3) internal/blockchain/ethereum/eventstream.go:138 β€” internal/blockchain/cardano/eventstream.go:116-127 | internal/blockchain/ethereum/eventstream.go:138-149 | internal/blockchain/tezos/eventstream.go:126-137 β€” `internal/blockchain/cardano/eventstream.go` and `internal/blockchain/tezos/eventstream.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 5 separate duplicated blocks between them, totalling at least 49 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 `internal/blockchain/cardano/eventstream.go:116` it does not close everything it opens, so those 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) REDACTED:86 β€” REDACTED:86-97 | REDACTED:106-117 | REDACTED:126-137 β€” all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites β€” resolving only two of them leaves the rest to drift apart the first time one is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 Β· Code Duplication Β· Duplicated block (7 lines × 6) Β· Γ—2
  • Duplicated block (7 lines × 6) internal/apiserver/route_post_contract_api_invoke.go:44 β€” internal/apiserver/route_post_contract_api_invoke.go:44-50 | internal/apiserver/route_post_contract_deploy.go:41-47 | internal/apiserver/route_post_contract_invoke.go:41-47 | internal/apiserver/route_post_new_contract_api.go:42-48 | internal/apiserver/route_post_new_contract_interface.go:43-49 | internal/apiserver/route_put_contract_api.go:44-50 β€” the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach β€” a file they already depend on, or a new one alongside them β€” and call it from all 6 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `internal/apiserver/route_post_contract_api_invoke.go:44` it does not close everything it opens, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 6) internal/blockchain/bifactory/factory.go:48 β€” internal/blockchain/bifactory/factory.go:48-54 | internal/database/difactory/factory.go:37-43 | internal/dataexchange/dxfactory/factory.go:46-52 | internal/identity/iifactory/factory.go:43-49 | internal/sharedstorage/ssfactory/factory.go:42-48 | internal/tokens/tifactory/factory.go:43-49 β€” the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 6 call sites can already reach β€” a location they all depend on today, or a new shared one if there is none β€” and call it from each site; until then, every change has to be made 6 times.
D1 Β· Cyclomatic Complexity Β· subscriptionManager.parseSubscriptionDef (cyclomatic 37) Β· Γ—1
  • subscriptionManager.parseSubscriptionDef (cyclomatic 37) internal/events/subscription_manager.go:267 β€” subscriptionManager.parseSubscriptionDef has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 Β· Cyclomatic Complexity Β· namespaceManager.loadNamespace (cyclomatic 30) Β· Γ—1
  • namespaceManager.loadNamespace (cyclomatic 30) internal/namespace/manager.go:801 β€” namespaceManager.loadNamespace has cyclomatic complexity 30 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 Β· Cyclomatic Complexity Β· definitionHandler.handleIdentityClaim (cyclomatic 29) Β· Γ—1
  • definitionHandler.handleIdentityClaim (cyclomatic 29) internal/definitions/handler_identity_claim.go:154 β€” definitionHandler.handleIdentityClaim has cyclomatic complexity 29 (threshold 15). Of this number, 28 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 Β· orchestrator.initManagers (cyclomatic 29) Β· Γ—1
  • orchestrator.initManagers (cyclomatic 29) internal/orchestrator/orchestrator.go:485 β€” orchestrator.initManagers 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 Β· orchestrator.GetTransactionStatus (cyclomatic 29) Β· Γ—1
  • orchestrator.GetTransactionStatus (cyclomatic 29) internal/orchestrator/txn_status.go:65 β€” orchestrator.GetTransactionStatus has cyclomatic complexity 29 (threshold 15). Of this number, 27 points are the body's own statements and 2 belong to one function literal inside it that branches. 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 Β· contractManager.verifyContractListener (cyclomatic 28) Β· Γ—1
  • contractManager.verifyContractListener (cyclomatic 28) internal/contracts/manager.go:1031 β€” contractManager.verifyContractListener has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 13 of the 28 points are its own statements and the rest belongs to one function literal inside it that branches (line 1067). 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 Β· aggregator.processMessage (cyclomatic 27) Β· Γ—1
  • aggregator.processMessage (cyclomatic 27) internal/events/aggregator.go:462 β€” aggregator.processMessage 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 Β· subscription.MatchesEvent (cyclomatic 25) Β· Γ—1
  • subscription.MatchesEvent (cyclomatic 25) internal/events/subscription_manager.go:577 β€” subscription.MatchesEvent 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 Β· tezos.processSchemaEntry (cyclomatic 24) Β· Γ—1
  • tezos.processSchemaEntry (cyclomatic 24) REDACTED:152 β€” tezos.processSchemaEntry 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 Β· eventEnricher.enrichEvent (cyclomatic 23) Β· Γ—1
  • eventEnricher.enrichEvent (cyclomatic 23) internal/events/event_enrich.go:59 β€” eventEnricher.enrichEvent 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 Β· WebHooks.ValidateOptions (cyclomatic 23) Β· Γ—1
  • WebHooks.ValidateOptions (cyclomatic 23) internal/events/webhooks/webhooks.go:304 β€” WebHooks.ValidateOptions 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 Β· contractManager.parseContractListenerFilters (cyclomatic 22) Β· Γ—1
  • contractManager.parseContractListenerFilters (cyclomatic 22) internal/contracts/manager.go:903 β€” contractManager.parseContractListenerFilters 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 Β· assetManager.OnOperationUpdate (cyclomatic 20) Β· Γ—1
  • assetManager.OnOperationUpdate (cyclomatic 20) internal/assets/operations.go:150 β€” assetManager.OnOperationUpdate 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 Β· eventManager.persistBatchContent (cyclomatic 20) Β· Γ—1
  • eventManager.persistBatchContent (cyclomatic 20) internal/events/persist_batch.go:255 β€” eventManager.persistBatchContent has cyclomatic complexity 20 (threshold 15). Of this number, 16 points are the body's own statements and 4 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 Β· reference.writeStructFields (cyclomatic 20) Β· Γ—1
  • reference.writeStructFields (cyclomatic 20) REDACTED:848 β€” reference.writeStructFields 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 Β· WebHooks.buildRequest (cyclomatic 19) Β· Γ—1
  • WebHooks.buildRequest (cyclomatic 19) internal/events/webhooks/webhooks.go:186 β€” WebHooks.buildRequest 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 Β· broadcastManager.PrepareOperation (cyclomatic 18) Β· Γ—1
  • broadcastManager.PrepareOperation (cyclomatic 18) internal/broadcast/operations.go:87 β€” broadcastManager.PrepareOperation 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 Β· contractManager.InvokeContract (cyclomatic 17) Β· Γ—1
  • contractManager.InvokeContract (cyclomatic 17) internal/contracts/manager.go:435 β€” contractManager.InvokeContract 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 Β· batchState.flushPins (cyclomatic 17) Β· Γ—1
  • batchState.flushPins (cyclomatic 17) internal/events/aggregator_batch_state.go:237 β€” batchState.flushPins 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 Β· eventDispatcher.bufferedDelivery (cyclomatic 17) Β· Γ—1
  • eventDispatcher.bufferedDelivery (cyclomatic 17) internal/events/event_dispatcher.go:219 β€” eventDispatcher.bufferedDelivery 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 Β· eventDispatcher.deliverEvents (cyclomatic 17) Β· Γ—1
  • eventDispatcher.deliverEvents (cyclomatic 17) internal/events/event_dispatcher.go:333 β€” eventDispatcher.deliverEvents 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 Β· identityManager.ResolveInputSigningIdentity (cyclomatic 17) Β· Γ—1
  • identityManager.ResolveInputSigningIdentity (cyclomatic 17) internal/identity/identitymanager.go:217 β€” identityManager.ResolveInputSigningIdentity 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 Β· namespaceManager.initPlugins (cyclomatic 17) Β· Γ—1
  • namespaceManager.initPlugins (cyclomatic 17) internal/namespace/manager.go:697 β€” namespaceManager.initPlugins 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 Β· operationUpdater.doUpdate (cyclomatic 17) Β· Γ—1
  • operationUpdater.doUpdate (cyclomatic 17) internal/operations/operation_updater.go:290 β€” operationUpdater.doUpdate 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 Β· privateMessaging.PrepareOperation (cyclomatic 17) Β· Γ—1
  • privateMessaging.PrepareOperation (cyclomatic 17) internal/privatemessaging/operations.go:83 β€” privateMessaging.PrepareOperation 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 Β· batchProcessor.assemblyLoop (cyclomatic 16) Β· Γ—1
  • batchProcessor.assemblyLoop (cyclomatic 16) internal/batch/batch_processor.go:338 β€” batchProcessor.assemblyLoop 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 Β· SQLCommon.UpsertMessage (cyclomatic 16) Β· Γ—1
  • SQLCommon.UpsertMessage (cyclomatic 16) internal/database/sqlcommon/message_sql.go:162 β€” SQLCommon.UpsertMessage 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 Β· definitionHandler.handleIdentityVerificationBroadcast (cyclomatic 16) Β· Γ—1
  • definitionHandler.handleIdentityVerificationBroadcast (cyclomatic 16) internal/definitions/handler_identity_verification.go:27 β€” definitionHandler.handleIdentityVerificationBroadcast 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 Β· aggregator.readyForDispatch (cyclomatic 16) Β· Γ—1
  • aggregator.readyForDispatch (cyclomatic 16) internal/events/aggregator.go:582 β€” aggregator.readyForDispatch 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 Β· namespaceManager.validateNSPlugins (cyclomatic 16) Β· Γ—1
  • namespaceManager.validateNSPlugins (cyclomatic 16) internal/namespace/manager.go:961 β€” namespaceManager.validateNSPlugins 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.GetMultipartyStatus (cyclomatic 16) Β· Γ—1
  • orchestrator.GetMultipartyStatus (cyclomatic 16) internal/orchestrator/status.go:178 β€” orchestrator.GetMultipartyStatus 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 Β· reference.generateObjectReferenceMarkdown (cyclomatic 16) Β· Γ—1
  • reference.generateObjectReferenceMarkdown (cyclomatic 16) REDACTED:741 β€” reference.generateObjectReferenceMarkdown 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 Β· FFTokens.handleMessage (cyclomatic 16) Β· Γ—1
  • FFTokens.handleMessage (cyclomatic 16) internal/tokens/fftokens/fftokens.go:657 β€” FFTokens.handleMessage has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform β€” the same kind of value, with no behaviour of its own β€” a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 Β· Cyclomatic Complexity Β· transactionHelper.SubmitNewTransactionBatch (cyclomatic 16) Β· Γ—1
  • transactionHelper.SubmitNewTransactionBatch (cyclomatic 16) internal/txcommon/txcommon.go:151 β€” transactionHelper.SubmitNewTransactionBatch 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 Β· Data.Seal (cyclomatic 16) Β· Γ—1
  • Data.Seal (cyclomatic 16) pkg/core/data.go:177 β€” Data.Seal has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D2 Β· Cognitive Complexity Β· tezos.processSchemaEntry (cognitive 61) Β· Γ—1
  • tezos.processSchemaEntry (cognitive 61) REDACTED:152 β€” tezos.processSchemaEntry has cognitive complexity 61 (threshold 15). Drivers by points: if/else 11 (42 pts), loops 7 (17 pts), boolean chains 1, match/switch 1 (nesting depth added 41). 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 Β· subscriptionManager.parseSubscriptionDef (cognitive 56) Β· Γ—1
  • subscriptionManager.parseSubscriptionDef (cognitive 56) internal/events/subscription_manager.go:267 β€” subscriptionManager.parseSubscriptionDef has cognitive complexity 56 (threshold 15). Drivers by points: if/else 32 (52 pts), boolean chains 4 (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 Β· eventManager.persistBatchContent (cognitive 55) Β· Γ—1
  • eventManager.persistBatchContent (cognitive 55) internal/events/persist_batch.go:255 β€” eventManager.persistBatchContent has cognitive complexity 55 (threshold 15). Drivers by points: if/else 13 (36 pts), loops 6 (19 pts) (nesting depth added 36). Of this number, 39 points are the body's own statements and 16 belong to 2 function literals inside it that branch. 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 Β· eventDispatcher.deliverEvents (cognitive 50) Β· Γ—1
  • eventDispatcher.deliverEvents (cognitive 50) internal/events/event_dispatcher.go:333 β€” eventDispatcher.deliverEvents has cognitive complexity 50 (threshold 15). Drivers by points: if/else 9 (37 pts), loops 3 (9 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· orchestrator.initManagers (cognitive 48) Β· Γ—1
  • orchestrator.initManagers (cognitive 48) internal/orchestrator/orchestrator.go:485 β€” orchestrator.initManagers has cognitive complexity 48 (threshold 15). Drivers by points: if/else 27 (47 pts), boolean chains 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 Β· aggregator.processMessage (cognitive 47) Β· Γ—1
  • aggregator.processMessage (cognitive 47) internal/events/aggregator.go:462 β€” aggregator.processMessage has cognitive complexity 47 (threshold 15). Drivers by points: if/else 15 (32 pts), loops 4 (9 pts), boolean chains 5, match/switch 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· Ethereum.eventLoop (cognitive 44) Β· Γ—1
  • Ethereum.eventLoop (cognitive 44) REDACTED:451 β€” Ethereum.eventLoop has cognitive complexity 44 (threshold 15). Drivers by points: if/else 10 (38 pts), match/switch 2 (5 pts), loops 1 (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 Β· contractManager.parseContractListenerFilters (cognitive 42) Β· Γ—1
  • contractManager.parseContractListenerFilters (cognitive 42) internal/contracts/manager.go:903 β€” contractManager.parseContractListenerFilters has cognitive complexity 42 (threshold 15). Drivers by points: if/else 17 (37 pts), boolean chains 3, loops 2 (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 Β· definitionHandler.handleIdentityClaim (cognitive 39) Β· Γ—1
  • definitionHandler.handleIdentityClaim (cognitive 39) internal/definitions/handler_identity_claim.go:154 β€” definitionHandler.handleIdentityClaim has cognitive complexity 39 (threshold 15). Drivers by points: if/else 22 (34 pts), boolean chains 5 (nesting depth added 12). Of this number, 36 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 Β· WebHooks.buildRequest (cognitive 38) Β· Γ—1
  • WebHooks.buildRequest (cognitive 38) internal/events/webhooks/webhooks.go:186 β€” WebHooks.buildRequest has cognitive complexity 38 (threshold 15). Drivers by points: if/else 13 (26 pts), loops 5 (12 pts) (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 Β· contractManager.verifyContractListener (cognitive 37) Β· Γ—1
  • contractManager.verifyContractListener (cognitive 37) internal/contracts/manager.go:1031 β€” contractManager.verifyContractListener has cognitive complexity 37 (threshold 15). Drivers by points: if/else 22 (30 pts), boolean chains 4, loops 1 (3 pts) (nesting depth added 10). Most of this is not in the body itself: 14 of the 37 points are its own statements and the rest belongs to one function literal inside it that branches (line 1067). 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 Β· orchestrator.GetMultipartyStatus (cognitive 37) Β· Γ—1
  • orchestrator.GetMultipartyStatus (cognitive 37) internal/orchestrator/status.go:178 β€” orchestrator.GetMultipartyStatus has cognitive complexity 37 (threshold 15). Drivers by points: if/else 18 (36 pts), boolean chains 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· namespaceManager.loadNamespace (cognitive 36) Β· Γ—1
  • namespaceManager.loadNamespace (cognitive 36) internal/namespace/manager.go:801 β€” namespaceManager.loadNamespace has cognitive complexity 36 (threshold 15). Drivers by points: if/else 22 (25 pts), loops 3 (5 pts), boolean chains 3, match/switch 1 (3 pts) (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth β€” checks laid out side by side rather than stacked β€” so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 Β· Cognitive Complexity Β· transactionHelper.SubmitNewTransactionBatch (cognitive 36) Β· Γ—1
  • transactionHelper.SubmitNewTransactionBatch (cognitive 36) internal/txcommon/txcommon.go:151 β€” transactionHelper.SubmitNewTransactionBatch has cognitive complexity 36 (threshold 15). Drivers by points: if/else 13 (28 pts), loops 4 (8 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 Β· batchState.flushPins (cognitive 34) Β· Γ—1
  • batchState.flushPins (cognitive 34) internal/events/aggregator_batch_state.go:237 β€” batchState.flushPins has cognitive complexity 34 (threshold 15). Drivers by points: if/else 11 (25 pts), loops 6 (9 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 Β· WebHooks.ValidateOptions (cognitive 34) Β· Γ—1
  • WebHooks.ValidateOptions (cognitive 34) internal/events/webhooks/webhooks.go:304 β€” WebHooks.ValidateOptions has cognitive complexity 34 (threshold 15). Drivers by points: if/else 22 (34 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 Β· websocketConnection.checkAck (cognitive 34) Β· Γ—1
  • websocketConnection.checkAck (cognitive 34) internal/events/websockets/websocket_connection.go:410 β€” websocketConnection.checkAck has cognitive complexity 34 (threshold 15). Drivers by points: if/else 13 (29 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 17). 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 Β· subscription.MatchesEvent (cognitive 33) Β· Γ—1
  • subscription.MatchesEvent (cognitive 33) internal/events/subscription_manager.go:577 β€” subscription.MatchesEvent has cognitive complexity 33 (threshold 15). Drivers by points: if/else 17 (26 pts), boolean chains 7 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· identityManager.cachedIdentityLookup (cognitive 32) Β· Γ—1
  • identityManager.cachedIdentityLookup (cognitive 32) internal/identity/identitymanager.go:474 β€” identityManager.cachedIdentityLookup has cognitive complexity 32 (threshold 15). Drivers by points: if/else 13 (30 pts), boolean chains 2 (nesting depth added 17). 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, 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 Β· assetManager.OnOperationUpdate (cognitive 30) Β· Γ—1
  • assetManager.OnOperationUpdate (cognitive 30) internal/assets/operations.go:150 β€” assetManager.OnOperationUpdate has cognitive complexity 30 (threshold 15). Drivers by points: if/else 15 (24 pts), boolean chains 6 (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 Β· websocketConnection.receiveLoop (cognitive 30) Β· Γ—1
  • websocketConnection.receiveLoop (cognitive 30) internal/events/websockets/websocket_connection.go:187 β€” websocketConnection.receiveLoop has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (27 pts), match/switch 1 (2 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 Β· batchProcessor.assemblyLoop (cognitive 29) Β· Γ—1
  • batchProcessor.assemblyLoop (cognitive 29) internal/batch/batch_processor.go:338 β€” batchProcessor.assemblyLoop has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (23 pts), boolean chains 3, match/switch 1 (2 pts), loops 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.GetTransactionStatus (cognitive 29) Β· Γ—1
  • orchestrator.GetTransactionStatus (cognitive 29) internal/orchestrator/txn_status.go:65 β€” orchestrator.GetTransactionStatus has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (17 pts), match/switch 6 (10 pts), loops 2 (nesting depth added 11). Of this number, 28 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 Β· contractManager.verifyListeners (cognitive 28) Β· Γ—1
  • contractManager.verifyListeners (cognitive 28) internal/contracts/manager.go:277 β€” contractManager.verifyListeners has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (22 pts), loops 3 (6 pts) (nesting depth added 17). Of this number, 21 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 Β· contractManager.PrepareOperation (cognitive 27) Β· Γ—1
  • contractManager.PrepareOperation (cognitive 27) internal/contracts/operations.go:58 β€” contractManager.PrepareOperation has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (25 pts), boolean chains 1, match/switch 1 (nesting depth added 14). 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 Β· SQLCommon.UpsertMessage (cognitive 26) Β· Γ—1
  • SQLCommon.UpsertMessage (cognitive 26) internal/database/sqlcommon/message_sql.go:162 β€” SQLCommon.UpsertMessage has cognitive complexity 26 (threshold 15). Drivers by points: if/else 13 (23 pts), boolean chains 2, 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 Β· SQLCommon.InsertMessages (cognitive 26) Β· Γ—1
  • SQLCommon.InsertMessages (cognitive 26) internal/database/sqlcommon/message_sql.go:236 β€” SQLCommon.InsertMessages has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 5 (10 pts) (nesting depth added 13). Of this number, 24 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 Β· namespaceManager.initPlugins (cognitive 26) Β· Γ—1
  • namespaceManager.initPlugins (cognitive 26) internal/namespace/manager.go:697 β€” namespaceManager.initPlugins has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (23 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· messageWriter.removeIdempotencyDuplicates (cognitive 25) Β· Γ—1
  • messageWriter.removeIdempotencyDuplicates (cognitive 25) internal/data/message_writer.go:226 β€” messageWriter.removeIdempotencyDuplicates has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (17 pts), loops 3 (8 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 Β· definitionHandler.persistFFI (cognitive 25) Β· Γ—1
  • definitionHandler.persistFFI (cognitive 25) internal/definitions/handler_contracts.go:31 β€” definitionHandler.persistFFI has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (20 pts), loops 4, 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 Β· operationUpdater.doUpdate (cognitive 25) Β· Γ—1
  • operationUpdater.doUpdate (cognitive 25) internal/operations/operation_updater.go:290 β€” operationUpdater.doUpdate has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (21 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 Β· batchProcessor.markPayloadDispatched (cognitive 24) Β· Γ—1
  • batchProcessor.markPayloadDispatched (cognitive 24) internal/batch/batch_processor.go:705 β€” batchProcessor.markPayloadDispatched has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 4 (10 pts) (nesting depth added 15). None of this is in the body itself: all 24 points belong to one function literal inside it that branches (line 706). 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 Β· Fabric.eventLoop (cognitive 24) Β· Γ—1
  • Fabric.eventLoop (cognitive 24) REDACTED:504 β€” Fabric.eventLoop has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (18 pts), match/switch 2 (5 pts), loops 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 Β· eventDispatcher.bufferedDelivery (cognitive 24) Β· Γ—1
  • eventDispatcher.bufferedDelivery (cognitive 24) internal/events/event_dispatcher.go:219 β€” eventDispatcher.bufferedDelivery has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (17 pts), loops 2 (3 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· reference.writeStructFields (cognitive 24) Β· Γ—1
  • reference.writeStructFields (cognitive 24) REDACTED:848 β€” reference.writeStructFields has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 2, 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 Β· Tezos.eventLoop (cognitive 23) Β· Γ—1
  • Tezos.eventLoop (cognitive 23) REDACTED:784 β€” Tezos.eventLoop has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (17 pts), match/switch 2 (5 pts), loops 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 Β· broadcastManager.PrepareOperation (cognitive 23) Β· Γ—1
  • broadcastManager.PrepareOperation (cognitive 23) internal/broadcast/operations.go:87 β€” broadcastManager.PrepareOperation has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (20 pts), boolean chains 2, match/switch 1 (nesting depth added 8). The drivers above price the dispatch low by construction β€” a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full β€” so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 Β· Cognitive Complexity Β· contractManager.InvokeContract (cognitive 23) Β· Γ—1
  • contractManager.InvokeContract (cognitive 23) internal/contracts/manager.go:435 β€” contractManager.InvokeContract has cognitive complexity 23 (threshold 15). Drivers by points: if/else 14 (22 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 Β· SQLCommon.UpsertContractListener (cognitive 23) Β· Γ—1
  • SQLCommon.UpsertContractListener (cognitive 23) internal/database/sqlcommon/contractlisteners_sql.go:57 β€” SQLCommon.UpsertContractListener has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (23 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 Β· eventEnricher.enrichEvent (cognitive 23) Β· Γ—1
  • eventEnricher.enrichEvent (cognitive 23) internal/events/event_enrich.go:59 β€” eventEnricher.enrichEvent has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (22 pts), match/switch 1 (nesting depth added 11). The drivers above price the dispatch low by construction β€” a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full β€” so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 Β· Cognitive Complexity Β· identityManager.ResolveInputSigningIdentity (cognitive 23) Β· Γ—1
  • identityManager.ResolveInputSigningIdentity (cognitive 23) internal/identity/identitymanager.go:217 β€” identityManager.ResolveInputSigningIdentity has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (18 pts), match/switch 2 (3 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 Β· namespaceManager.validateNSPlugins (cognitive 23) Β· Γ—1
  • namespaceManager.validateNSPlugins (cognitive 23) internal/namespace/manager.go:961 β€” namespaceManager.validateNSPlugins has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (20 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 Β· privateMessaging.PrepareOperation (cognitive 23) Β· Γ—1
  • privateMessaging.PrepareOperation (cognitive 23) internal/privatemessaging/operations.go:83 β€” privateMessaging.PrepareOperation has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (21 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 Β· Data.Seal (cognitive 23) Β· Γ—1
  • Data.Seal (cognitive 23) pkg/core/data.go:177 β€” Data.Seal has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (20 pts), boolean chains 3 (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 Β· SQLCommon.UpsertGroup (cognitive 22) Β· Γ—1
  • SQLCommon.UpsertGroup (cognitive 22) internal/database/sqlcommon/group_sql.go:50 β€” SQLCommon.UpsertGroup has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 4 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· networkMap.RegisterIdentity (cognitive 22) Β· Γ—1
  • networkMap.RegisterIdentity (cognitive 22) internal/networkmap/register_identity.go:28 β€” networkMap.RegisterIdentity has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (22 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.GetSubscriptionEventsHistorical (cognitive 22) Β· Γ—1
  • orchestrator.GetSubscriptionEventsHistorical (cognitive 22) internal/orchestrator/subscriptions.go:141 β€” orchestrator.GetSubscriptionEventsHistorical has cognitive complexity 22 (threshold 15). Drivers by points: if/else 14 (20 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 Β· batchManager.messageSequencer (cognitive 21) Β· Γ—1
  • batchManager.messageSequencer (cognitive 21) internal/batch/batch_manager.go:305 β€” batchManager.messageSequencer has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (17 pts), loops 2 (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 Β· streamManager.ensureFireFlySubscription (cognitive 21) Β· Γ—1
  • streamManager.ensureFireFlySubscription (cognitive 21) internal/blockchain/ethereum/eventstream.go:294 β€” streamManager.ensureFireFlySubscription has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (19 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 Β· contractManager.OnOperationUpdate (cognitive 21) Β· Γ—1
  • contractManager.OnOperationUpdate (cognitive 21) internal/contracts/operations.go:159 β€” contractManager.OnOperationUpdate has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (20 pts), match/switch 1 (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 Β· SQLCommon.UpsertData (cognitive 21) Β· Γ—1
  • SQLCommon.UpsertData (cognitive 21) internal/database/sqlcommon/data_sql.go:139 β€” SQLCommon.UpsertData has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (20 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 Β· SQLCommon.UpsertSubscription (cognitive 21) Β· Γ—1
  • SQLCommon.UpsertSubscription (cognitive 21) internal/database/sqlcommon/subscription_sql.go:50 β€” SQLCommon.UpsertSubscription has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (21 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 Β· SQLCommon.InsertTransactions (cognitive 21) Β· Γ—1
  • SQLCommon.InsertTransactions (cognitive 21) internal/database/sqlcommon/transaction_sql.go:113 β€” SQLCommon.InsertTransactions has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 3 (6 pts) (nesting depth added 10). 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 Β· eventManager.TokenPoolCreated (cognitive 21) Β· Γ—1
  • eventManager.TokenPoolCreated (cognitive 21) internal/events/token_pool_created.go:155 β€” eventManager.TokenPoolCreated has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (20 pts), boolean chains 1 (nesting depth added 8). Of this number, 13 points are the body's own statements and 8 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 Β· namespaceManager.stopDefunctNamespaces (cognitive 21) Β· Γ—1
  • namespaceManager.stopDefunctNamespaces (cognitive 21) internal/namespace/configreload.go:130 β€” namespaceManager.stopDefunctNamespaces has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 3 (5 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 Β· orchestrator.GetStatus (cognitive 21) Β· Γ—1
  • orchestrator.GetStatus (cognitive 21) internal/orchestrator/status.go:84 β€” orchestrator.GetStatus has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 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 Β· batchProcessor.sealBatch (cognitive 20) Β· Γ—1
  • batchProcessor.sealBatch (cognitive 20) internal/batch/batch_processor.go:550 β€” batchProcessor.sealBatch has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 7). Most of this is not in the body itself: 8 of the 20 points are its own statements and the rest belongs to one function literal inside it that branches (line 554). 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 Β· definitionHandler.handleIdentityUpdate (cognitive 20) Β· Γ—1
  • definitionHandler.handleIdentityUpdate (cognitive 20) internal/definitions/handler_identity_update.go:46 β€” definitionHandler.handleIdentityUpdate has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 2 (nesting depth added 6). 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, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· aggregator.readyForDispatch (cognitive 20) Β· Γ—1
  • aggregator.readyForDispatch (cognitive 20) internal/events/aggregator.go:582 β€” aggregator.readyForDispatch has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (19 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 Β· blobReceiver.insertNewBlobs (cognitive 20) Β· Γ—1
  • blobReceiver.insertNewBlobs (cognitive 20) internal/events/blob_receiver.go:193 β€” blobReceiver.insertNewBlobs has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 4 (6 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 Β· reference.generateObjectReferenceMarkdown (cognitive 20) Β· Γ—1
  • reference.generateObjectReferenceMarkdown (cognitive 20) REDACTED:741 β€” reference.generateObjectReferenceMarkdown has cognitive complexity 20 (threshold 15). Drivers by points: if/else 16 (20 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth β€” checks laid out side by side rather than stacked β€” so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 Β· Cognitive Complexity Β· streamManager.ensureFireFlySubscription (cognitive 19) Β· Γ—1
  • streamManager.ensureFireFlySubscription (cognitive 19) internal/blockchain/fabric/eventstream.go:273 β€” streamManager.ensureFireFlySubscription has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (18 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 Β· contractManager.validateInvokeContractRequest (cognitive 19) Β· Γ—1
  • contractManager.validateInvokeContractRequest (cognitive 19) internal/contracts/manager.go:793 β€” contractManager.validateInvokeContractRequest has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (16 pts), loops 2, 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 Β· WebHooks.doDelivery (cognitive 19) Β· Γ—1
  • WebHooks.doDelivery (cognitive 19) internal/events/webhooks/webhooks.go:489 β€” WebHooks.doDelivery has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 4, 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 Β· groupManager.groupInit (cognitive 19) Β· Γ—1
  • groupManager.groupInit (cognitive 19) internal/privatemessaging/groupmanager.go:80 β€” groupManager.groupInit has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (18 pts), loops 1 (nesting depth added 7). Of this number, 15 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 Β· assetManager.PrepareOperation (cognitive 18) Β· Γ—1
  • assetManager.PrepareOperation (cognitive 18) internal/assets/operations.go:50 β€” assetManager.PrepareOperation has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (17 pts), match/switch 1 (nesting depth added 7). The drivers above price the dispatch low by construction β€” a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full β€” so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 Β· Cognitive Complexity Β· Ethereum.handleMessageBatch (cognitive 18) Β· Γ—1
  • Ethereum.handleMessageBatch (cognitive 18) REDACTED:401 β€” Ethereum.handleMessageBatch has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (14 pts), match/switch 1 (3 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 Β· dataManager.queryMessageCache (cognitive 18) Β· Γ—1
  • dataManager.queryMessageCache (cognitive 18) internal/data/data_manager.go:235 β€” dataManager.queryMessageCache has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 2 (4 pts), match/switch 1 (2 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 Β· dataManager.checkValidation (cognitive 18) Β· Γ—1
  • dataManager.checkValidation (cognitive 18) internal/data/data_manager.go:374 β€” dataManager.checkValidation has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (16 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 Β· dataManager.DeleteData (cognitive 18) Β· Γ—1
  • dataManager.DeleteData (cognitive 18) internal/data/data_manager.go:546 β€” dataManager.DeleteData has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (14 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 Β· eventManager.BlockchainEventBatch (cognitive 18) Β· Γ—1
  • eventManager.BlockchainEventBatch (cognitive 18) internal/events/blockchain_event.go:140 β€” eventManager.BlockchainEventBatch has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 2, match/switch 1 (2 pts) (nesting depth added 9). None of this is in the body itself: all 18 points belong to one function literal inside it that branches (line 141). 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 Β· eventManager.privateBatchReceived (cognitive 18) Β· Γ—1
  • eventManager.privateBatchReceived (cognitive 18) internal/events/dx_callbacks.go:67 β€” eventManager.privateBatchReceived has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 1 (nesting depth added 4). Most of this is not in the body itself: 4 of the 18 points are its own statements and the rest belongs to one function literal inside it that branches (line 84). 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 Β· eventPoller.eventLoop (cognitive 18) Β· Γ—1
  • eventPoller.eventLoop (cognitive 18) internal/events/event_poller.go:191 β€” eventPoller.eventLoop has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (16 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 Β· WebHooks.BatchDeliveryRequest (cognitive 18) Β· Γ—1
  • WebHooks.BatchDeliveryRequest (cognitive 18) internal/events/webhooks/webhooks.go:608 β€” WebHooks.BatchDeliveryRequest has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (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 Β· assetManager.createTokenPoolInternal (cognitive 17) Β· Γ—1
  • assetManager.createTokenPoolInternal (cognitive 17) internal/assets/token_pool.go:68 β€” assetManager.createTokenPoolInternal has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (17 pts) (nesting depth added 6). 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 84). 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 Β· approveSender.resolve (cognitive 17) Β· Γ—1
  • approveSender.resolve (cognitive 17) internal/assets/token_approval.go:109 β€” approveSender.resolve has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (17 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 Β· transferSender.resolve (cognitive 17) Β· Γ—1
  • transferSender.resolve (cognitive 17) internal/assets/token_transfer.go:201 β€” transferSender.resolve has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (17 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 Β· batchProcessor.addWork (cognitive 17) Β· Γ—1
  • batchProcessor.addWork (cognitive 17) internal/batch/batch_processor.go:193 β€” batchProcessor.addWork has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 5, loops 1 (2 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 Β· batchProcessor.calculateContexts (cognitive 17) Β· Γ—1
  • batchProcessor.calculateContexts (cognitive 17) internal/batch/batch_processor.go:475 β€” batchProcessor.calculateContexts has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (13 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 Β· batchProcessor.dispatchBatch (cognitive 17) Β· Γ—1
  • batchProcessor.dispatchBatch (cognitive 17) internal/batch/batch_processor.go:619 β€” batchProcessor.dispatchBatch has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 1 (nesting depth added 8). None of this is in the body itself: all 17 points belong to one function literal inside it that branches (line 621). 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 Β· dataManager.ResolveInlineData (cognitive 17) Β· Γ—1
  • dataManager.ResolveInlineData (cognitive 17) internal/data/data_manager.go:449 β€” dataManager.ResolveInlineData has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (13 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 Β· eventsPCA.PreCommit (cognitive 17) Β· Γ—1
  • eventsPCA.PreCommit (cognitive 17) internal/database/sqlcommon/event_sql.go:106 β€” eventsPCA.PreCommit has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 5 (8 pts) (nesting depth added 7). 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 into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· definitionHandler.confirmVerificationForClaim (cognitive 17) Β· Γ—1
  • definitionHandler.confirmVerificationForClaim (cognitive 17) internal/definitions/handler_identity_claim.go:104 β€” definitionHandler.confirmVerificationForClaim has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (13 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 Β· eventManager.validateAndPersistBatchContent (cognitive 17) Β· Γ—1
  • eventManager.validateAndPersistBatchContent (cognitive 17) internal/events/persist_batch.go:96 β€” eventManager.validateAndPersistBatchContent has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 4 (5 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 Β· WebHooks.attemptRequest (cognitive 17) Β· Γ—1
  • WebHooks.attemptRequest (cognitive 17) internal/events/webhooks/webhooks.go:403 β€” WebHooks.attemptRequest has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth β€” many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 Β· Cognitive Complexity Β· identityManager.VerifyIdentityChain (cognitive 17) Β· Γ—1
  • identityManager.VerifyIdentityChain (cognitive 17) internal/identity/identitymanager.go:374 β€” identityManager.VerifyIdentityChain has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (15 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 Β· operationUpdater.doBatchUpdate (cognitive 17) Β· Γ—1
  • operationUpdater.doBatchUpdate (cognitive 17) internal/operations/operation_updater.go:247 β€” operationUpdater.doBatchUpdate has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 3 (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.createUpdateSubscription (cognitive 17) Β· Γ—1
  • orchestrator.createUpdateSubscription (cognitive 17) internal/orchestrator/subscriptions.go:42 β€” orchestrator.createUpdateSubscription has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (14 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 Β· privateMessaging.prepareBlobTransfers (cognitive 17) Β· Γ—1
  • privateMessaging.prepareBlobTransfers (cognitive 17) internal/privatemessaging/privatemessaging.go:212 β€” privateMessaging.prepareBlobTransfers has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (15 pts), boolean chains 1, loops 1 (nesting depth added 9). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to one function literal inside it that branches (line 217). 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 Β· privateMessaging.sendData (cognitive 17) Β· Γ—1
  • privateMessaging.sendData (cognitive 17) internal/privatemessaging/privatemessaging.go:279 β€” privateMessaging.sendData has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 1 (nesting depth added 8). Of this number, 13 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 Β· Group.Validate (cognitive 17) Β· Γ—1
  • Group.Validate (cognitive 17) pkg/core/group.go:77 β€” Group.Validate has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (16 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 Β· Ethereum.GetTransactionStatus (cognitive 16) Β· Γ—1
  • Ethereum.GetTransactionStatus (cognitive 16) REDACTED:1194 β€” Ethereum.GetTransactionStatus has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (13 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 Β· Tezos.GetTransactionStatus (cognitive 16) Β· Γ—1
  • Tezos.GetTransactionStatus (cognitive 16) REDACTED:550 β€” Tezos.GetTransactionStatus has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (13 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 Β· messageWriter.writerLoop (cognitive 16) Β· Γ—1
  • messageWriter.writerLoop (cognitive 16) internal/data/message_writer.go:153 β€” messageWriter.writerLoop has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 2, 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 Β· SQLCommon.UpsertIdentity (cognitive 16) Β· Γ—1
  • SQLCommon.UpsertIdentity (cognitive 16) internal/database/sqlcommon/identity_sql.go:111 β€” SQLCommon.UpsertIdentity has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (15 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 Β· SQLCommon.UpsertVerifier (cognitive 16) Β· Γ—1
  • SQLCommon.UpsertVerifier (cognitive 16) internal/database/sqlcommon/verifier_sql.go:83 β€” SQLCommon.UpsertVerifier has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (15 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 Β· FFDX.CheckNodeIdentityStatus (cognitive 16) Β· Γ—1
  • FFDX.CheckNodeIdentityStatus (cognitive 16) internal/dataexchange/ffdx/ffdx.go:466 β€” FFDX.CheckNodeIdentityStatus has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 2 (nesting depth added 3). Of this number, 14 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, 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 Β· definitionHandler.handleIdentityVerificationBroadcast (cognitive 16) Β· Γ—1
  • definitionHandler.handleIdentityVerificationBroadcast (cognitive 16) internal/definitions/handler_identity_verification.go:27 β€” definitionHandler.handleIdentityVerificationBroadcast has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth β€” checks laid out side by side rather than stacked β€” so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 Β· Cognitive Complexity Β· definitionHandler.handleTokenPoolDefinition (cognitive 16) Β· Γ—1
  • definitionHandler.handleTokenPoolDefinition (cognitive 16) internal/definitions/handler_tokenpool.go:57 β€” definitionHandler.handleTokenPoolDefinition has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 1 (nesting depth added 8). Of this number, 15 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 Β· rewinder.rewindProcessLoop (cognitive 16) Β· Γ—1
  • rewinder.rewindProcessLoop (cognitive 16) internal/events/aggregator_rewind.go:118 β€” rewinder.rewindProcessLoop has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (12 pts), match/switch 1 (2 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 Β· blobReceiver.blobReceiverLoop (cognitive 16) Β· Γ—1
  • blobReceiver.blobReceiverLoop (cognitive 16) internal/events/blob_receiver.go:129 β€” blobReceiver.blobReceiverLoop has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 2, 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 Β· eventManager.loadExisting (cognitive 16) Β· Γ—1
  • eventManager.loadExisting (cognitive 16) internal/events/token_pool_created.go:92 β€” eventManager.loadExisting has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (14 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 Β· operationUpdater.updaterLoop (cognitive 16) Β· Γ—1
  • operationUpdater.updaterLoop (cognitive 16) internal/operations/operation_updater.go:183 β€” operationUpdater.updaterLoop has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 2, 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 Β· operationUpdater.verifyManifest (cognitive 16) Β· Γ—1
  • operationUpdater.verifyManifest (cognitive 16) internal/operations/operation_updater.go:363 β€” operationUpdater.verifyManifest has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D22 Β· Internal API Consistency Β· `Plugin.SetHandler` takes no context.Context; its 4 sibling operations take one Β· Γ—1
  • `Plugin.SetHandler` takes no context.Context; its 4 sibling operations take one pkg/events/plugin.go:41 β€” 4 of 5 fallible operations of `Plugin` take a `ctx context.Context` (4 of 5). Siblings: Plugin.Init (pkg/events/plugin.go:37); Plugin.ValidateOptions (pkg/events/plugin.go:48); Plugin.DeliveryRequest (pkg/events/plugin.go:52); Plugin.BatchDeliveryRequest (pkg/events/plugin.go:56). Take `ctx context.Context` as the first parameter, like its siblings, and pass it on. [rule A1]
D29 Β· Static Analysis (SAST) Β· REDACTED Β· Γ—1
  • REDACTED
D35 Β· Change Coupling Β· Change-coupling hub Β· Γ—1
  • Change-coupling hub: route_post_new_contract_api.go β†’ route_post_contract_invoke.go, route_post_new_contract_interface.go, route_put_contract_api.go internal/apiserver/route_post_new_contract_api.go β€” `internal/apiserver/route_post_new_contract_api.go` changes together with 3 other files β€” `internal/apiserver/route_post_contract_invoke.go`, `internal/apiserver/route_post_new_contract_interface.go`, `internal/apiserver/route_put_contract_api.go` β€” none of which declares a dependency on it: one file is the hub of 3 separate couplings, not 3 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 3.
D36 Β· Supply-chain Provenance & Signing Β· REDACTED Β· Γ—1
  • REDACTED
D36 Β· Supply-chain Provenance & Signing Β· REDACTED Β· Γ—1
  • REDACTED
D36 Β· Supply-chain Provenance & Signing Β· REDACTED Β· Γ—1
  • REDACTED
D4 Β· Code Duplication Β· Near-duplicate member pair (40 shared lines) Β· Γ—1
  • Near-duplicate member pair (40 shared lines) REDACTED:1194 β€” REDACTED:1194-1244 | REDACTED:550-601 β€” These two members are variants of one another: 40 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain β€” factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 Β· Code Duplication Β· Members sharing a duplicated core (21 members, 50+ identical tokens) Β· Γ—1
  • Members sharing a duplicated core (21 members, 50+ identical tokens) internal/apiserver/route_get_contract_api_by_name.go:28 β€” internal/apiserver/route_get_contract_api_by_name.go:28-48 | internal/apiserver/route_get_contract_api_interface.go:28-48 | internal/apiserver/route_get_contract_api_listeners.go:29-51 | internal/apiserver/route_get_contract_apis.go:29-48 | internal/apiserver/route_get_contract_interface.go:29-58 | internal/apiserver/route_get_contract_interface_name_version.go:29-55 | internal/apiserver/route_get_contract_interfaces.go:29-48 | internal/apiserver/route_get_contract_listener_by_name_or_id.go:29-54 | internal/apiserver/route_get_contract_listeners.go:29-48 | internal/apiserver/route_post_contract_api_invoke.go:29-56 | internal/apiserver/route_post_contract_api_listeners.go:28-49 | internal/apiserver/route_post_contract_api_query.go:28-51 | internal/apiserver/route_post_contract_deploy.go:29-52 | internal/apiserver/route_post_contract_interface_generate.go:28-47 | internal/apiserver/route_post_contract_invoke.go:29-53 | internal/apiserver/route_post_contract_listeners_hash.go:35-53 | internal/apiserver/route_post_contract_query.go:28-48 | internal/apiserver/route_post_new_contract_api.go:29-57 | internal/apiserver/route_post_new_contract_interface.go:30-57 | internal/apiserver/route_post_new_contract_listener.go:28-46 | internal/apiserver/route_put_contract_api.go:30-60 β€” These 21 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 21 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 21 times.
D4 Β· Code Duplication Β· Members sharing a duplicated core (5 members, 50+ identical tokens) Β· Γ—1
  • Members sharing a duplicated core (5 members, 50+ identical tokens) internal/apiserver/route_post_new_message_broadcast.go:29 β€” internal/apiserver/route_post_new_message_broadcast.go:29-52 | internal/apiserver/route_post_new_message_private.go:29-51 | internal/apiserver/route_post_new_node_self.go:29-52 | internal/apiserver/route_post_new_organization.go:29-52 | internal/apiserver/route_post_new_organization_self.go:29-52 β€” 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 (73 corresponding lines) Β· Γ—1
  • Edited copy of a member (73 corresponding lines) REDACTED:451 β€” REDACTED:518-590 | REDACTED:451-529 β€” These two members are one piece of code written twice and then edited apart: 73 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 Β· Code Duplication Β· Edited copy of a member (63 corresponding lines) Β· Γ—1
  • Edited copy of a member (63 corresponding lines) internal/events/tokens_approved.go:63 β€” internal/events/tokens_approved.go:63-128 | internal/events/tokens_transferred.go:62-124 β€” These two members are one piece of code written twice and then edited apart: 63 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 Β· Code Duplication Β· Edited copy of a member (77 corresponding lines) Β· Γ—1
  • Edited copy of a member (77 corresponding lines) internal/database/sqlcommon/contractlisteners_sql.go:57 β€” internal/database/sqlcommon/contractlisteners_sql.go:57-133 | internal/database/sqlcommon/subscription_sql.go:50-136 β€” These two members are one piece of code written twice and then edited apart: 77 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 Β· Code Duplication Β· Edited copy of a member (49 corresponding lines) Β· Γ—1
  • Edited copy of a member (49 corresponding lines) internal/blockchain/ethereum/address_resolver.go:102 β€” internal/blockchain/ethereum/address_resolver.go:102-151 | internal/blockchain/tezos/address_resolver.go:100-148 β€” 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 copies of one member (4 members, 52+ corresponding lines) Β· Γ—1
  • Edited copies of one member (4 members, 52+ corresponding lines) internal/database/sqlcommon/datatype_sql.go:53 β€” internal/database/sqlcommon/datatype_sql.go:53-121 | internal/database/sqlcommon/ffi_errors_sql.go:49-100 | internal/database/sqlcommon/ffi_events_sql.go:51-103 | internal/database/sqlcommon/ffi_methods_sql.go:52-106 β€” These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 52 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 (53 corresponding lines) Β· Γ—1
  • Edited copy of a member (53 corresponding lines) internal/assets/token_approval.go:160 β€” internal/assets/token_approval.go:160-212 | internal/assets/token_transfer.go:253-308 β€” These two members are one piece of code written twice and then edited apart: 53 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 Β· Code Duplication Β· Edited copy of a member (50 corresponding lines) Β· Γ—1
  • Edited copy of a member (50 corresponding lines) internal/assets/token_approval.go:109 β€” internal/assets/token_approval.go:109-158 | internal/assets/token_transfer.go:201-251 β€” 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 (42 corresponding lines) Β· Γ—1
  • Edited copy of a member (42 corresponding lines) internal/definitions/sender_contracts.go:144 β€” internal/definitions/sender_contracts.go:144-185 | internal/definitions/sender_tokenpool.go:57-109 β€” 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 (43 corresponding lines) Β· Γ—1
  • Edited copy of a member (43 corresponding lines) internal/events/webhooks/webhooks.go:564 β€” internal/events/webhooks/webhooks.go:564-606 | internal/events/webhooks/webhooks.go:608-661 β€” These two members are one piece of code written twice and then edited apart: 43 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 Β· Code Duplication Β· Edited copy of a member (46 corresponding lines) Β· Γ—1
  • Edited copy of a member (46 corresponding lines) REDACTED:401 β€” REDACTED:401-449 | REDACTED:457-502 β€” These two members are one piece of code written twice and then edited apart: 46 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 Β· Code Duplication Β· Edited copies of one member (4 members, 43+ corresponding lines) Β· Γ—1
  • Edited copies of one member (4 members, 43+ corresponding lines) internal/database/sqlcommon/data_sql.go:139 β€” internal/database/sqlcommon/data_sql.go:139-195 | internal/database/sqlcommon/group_sql.go:50-103 | internal/database/sqlcommon/identity_sql.go:111-153 | internal/database/sqlcommon/verifier_sql.go:83-128 β€” These 4 members are one piece of code written 4 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 4 times and the copies will drift further apart.
D4 Β· Code Duplication Β· Edited copies of one member (3 members, 41+ corresponding lines) Β· Γ—1
  • Edited copies of one member (3 members, 41+ corresponding lines) REDACTED:204 β€” REDACTED:129-170 | REDACTED:204-244 | REDACTED:255-295 β€” These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 41 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) internal/blockchain/common/common.go:420 β€” internal/blockchain/common/common.go:420-457 | internal/blockchain/common/common.go:462-506 β€” 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 (47 corresponding lines) Β· Γ—1
  • Edited copy of a member (47 corresponding lines) internal/database/sqlcommon/group_sql.go:186 β€” internal/database/sqlcommon/group_sql.go:186-232 | internal/database/sqlcommon/message_sql.go:385-435 β€” 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 (4 members, 23+ corresponding lines) Β· Γ—1
  • Edited copies of one member (4 members, 23+ corresponding lines) internal/apiserver/route_patch_update_identity.go:28 β€” internal/apiserver/route_patch_update_identity.go:28-50 | internal/apiserver/route_post_contract_api_publish.go:29-51 | internal/apiserver/route_post_contract_interface_publish.go:29-52 | internal/apiserver/route_post_token_pool_publish.go:28-50 β€” These 4 members are one piece of code written 4 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 4 times and the copies will drift further apart.
D4 Β· Code Duplication Β· Edited copies of one member (4 members, 20+ corresponding lines) Β· Γ—1
  • Edited copies of one member (4 members, 20+ corresponding lines) internal/apiserver/route_post_token_approval.go:28 β€” internal/apiserver/route_post_token_approval.go:28-53 | internal/apiserver/route_post_token_burn.go:28-47 | internal/apiserver/route_post_token_mint.go:28-47 | internal/apiserver/route_post_token_transfer.go:28-47 β€” These 4 members are one piece of code written 4 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 4 times and the copies will drift further apart.
D4 Β· Code Duplication Β· Edited copies of one member (4 members, 27+ corresponding lines) Β· Γ—1
  • Edited copies of one member (4 members, 27+ corresponding lines) internal/database/sqlcommon/blob_sql.go:136 β€” internal/database/sqlcommon/blob_sql.go:136-167 | internal/database/sqlcommon/nextpin_sql.go:114-143 | internal/database/sqlcommon/offset_sql.go:150-176 | internal/database/sqlcommon/pin_sql.go:174-202 β€” These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 27 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 Β· Code Duplication Β· Edited copy of a member (27 corresponding lines) Β· Γ—1
  • Edited copy of a member (27 corresponding lines) internal/database/sqlcommon/data_sql.go:329 β€” internal/database/sqlcommon/data_sql.go:329-359 | internal/database/sqlcommon/tokenbalance_sql.go:235-261 β€” These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 Β· Code Duplication Β· Edited copies of one member (5 members, 22+ corresponding lines) Β· Γ—1
  • Edited copies of one member (5 members, 22+ corresponding lines) internal/apiserver/route_get_identities.go:29 β€” internal/apiserver/route_get_identities.go:29-50 | internal/apiserver/route_get_identity_by_did.go:28-50 | internal/apiserver/route_get_identity_by_id.go:28-50 | internal/apiserver/route_get_net_did.go:28-51 | internal/apiserver/route_get_net_identities.go:29-50 β€” These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 22 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 Β· Code Duplication Β· Edited copies of one member (3 members, 28+ corresponding lines) Β· Γ—1
  • Edited copies of one member (3 members, 28+ corresponding lines) internal/database/sqlcommon/contractapis_sql.go:127 β€” internal/database/sqlcommon/contractapis_sql.go:127-155 | internal/database/sqlcommon/ffi_sql.go:119-146 | internal/database/sqlcommon/tokenpool_sql.go:169-196 β€” These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 28 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 Β· Code Duplication Β· Edited copy of a member (45 corresponding lines) Β· Γ—1
  • Edited copy of a member (45 corresponding lines) internal/database/sqlcommon/group_sql.go:140 β€” internal/database/sqlcommon/group_sql.go:140-184 | internal/database/sqlcommon/message_sql.go:331-378 β€” 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 (3 members, 34+ corresponding lines) Β· Γ—1
  • Edited copies of one member (3 members, 34+ corresponding lines) internal/events/blob_receiver.go:129 β€” internal/events/blob_receiver.go:129-164 | internal/operations/operation_updater.go:183-219 | internal/txwriter/txwriter.go:140-173 β€” These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 34 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, 24+ corresponding lines) Β· Γ—1
  • Edited copies of one member (5 members, 24+ corresponding lines) internal/database/sqlcommon/tokenapproval_sql.go:213 β€” internal/database/sqlcommon/tokenapproval_sql.go:213-236 | internal/database/sqlcommon/tokenbalance_sql.go:182-205 | internal/database/sqlcommon/tokenbalance_sql.go:207-233 | internal/database/sqlcommon/tokenpool_sql.go:306-329 | internal/database/sqlcommon/tokentransfer_sql.go:193-216 β€” These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 24 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 Β· Code Duplication Β· Edited copies of one member (5 members, 33+ corresponding lines) Β· Γ—1
  • Edited copies of one member (5 members, 33+ corresponding lines) internal/database/sqlcommon/blob_sql.go:83 β€” internal/database/sqlcommon/blob_sql.go:83-116 | internal/database/sqlcommon/blockchainevents_sql.go:86-125 | internal/database/sqlcommon/data_sql.go:197-231 | internal/database/sqlcommon/operation_sql.go:104-142 | internal/database/sqlcommon/pin_sql.go:120-152 β€” These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 33 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, 27+ corresponding lines) Β· Γ—1
  • Edited copies of one member (3 members, 27+ corresponding lines) internal/definitions/sender_contracts.go:95 β€” internal/definitions/sender_contracts.go:95-121 | internal/definitions/sender_contracts.go:187-213 | internal/definitions/sender_tokenpool.go:29-55 β€” These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 27 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 Β· Code Duplication Β· Edited copies of one member (4 members, 18+ corresponding lines) Β· Γ—1
  • Edited copies of one member (4 members, 18+ corresponding lines) internal/apiserver/route_get_txn_blockchainevents.go:27 β€” internal/apiserver/route_get_txn_blockchainevents.go:27-44 | internal/apiserver/route_get_txn_by_id.go:28-47 | internal/apiserver/route_get_txn_ops.go:27-44 | internal/apiserver/route_get_txn_status.go:27-44 β€” These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 18 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 Β· Code Duplication Β· Edited copy of a member (34 corresponding lines) Β· Γ—1
  • Edited copy of a member (34 corresponding lines) REDACTED:707 β€” REDACTED:707-740 | REDACTED:703-740 β€” These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 Β· Code Duplication Β· Edited copies of one member (6 members, 20+ corresponding lines) Β· Γ—1
  • Edited copies of one member (6 members, 20+ corresponding lines) internal/namespace/manager.go:555 β€” internal/namespace/manager.go:555-576 | internal/namespace/manager.go:613-632 | internal/namespace/manager.go:634-653 | internal/namespace/manager.go:655-674 | internal/namespace/manager.go:676-695 | internal/namespace/manager.go:1144-1164 β€” These 6 members are one piece of code written 6 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 6 times and the copies will drift further apart.
D4 Β· Code Duplication Β· Edited copies of one member (7 members, 18+ corresponding lines) Β· Γ—1
  • Edited copies of one member (7 members, 18+ corresponding lines) internal/apiserver/route_delete_contract_api.go:26 β€” internal/apiserver/route_delete_contract_api.go:26-43 | internal/apiserver/route_delete_contract_interface.go:27-48 | internal/apiserver/route_delete_contract_listener.go:26-44 | internal/apiserver/route_delete_data.go:26-44 | internal/apiserver/route_delete_subscription.go:26-44 | internal/apiserver/route_delete_token_pool.go:26-43 | internal/apiserver/route_post_batch_cancel.go:26-43 β€” These 7 members are one piece of code written 7 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 7 times and the copies will drift further apart.
D4 Β· Code Duplication Β· Edited copy of a member (25 corresponding lines) Β· Γ—1
  • Edited copy of a member (25 corresponding lines) internal/assets/token_approval.go:83 β€” internal/assets/token_approval.go:83-107 | internal/assets/token_transfer.go:175-199 β€” These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 Β· Code Duplication Β· Edited copies of one member (3 members, 21+ corresponding lines) Β· Γ—1
  • Edited copies of one member (3 members, 21+ corresponding lines) internal/database/sqlcommon/contractlisteners_sql.go:294 β€” internal/database/sqlcommon/contractlisteners_sql.go:294-314 | internal/database/sqlcommon/offset_sql.go:200-222 | internal/database/sqlcommon/subscription_sql.go:250-272 β€” 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 (8 members, 21+ corresponding lines) Β· Γ—1
  • Edited copies of one member (8 members, 21+ corresponding lines) internal/database/sqlcommon/batch_sql.go:179 β€” internal/database/sqlcommon/batch_sql.go:179-199 | internal/database/sqlcommon/data_sql.go:403-423 | internal/database/sqlcommon/message_sql.go:634-658 | internal/database/sqlcommon/nextpin_sql.go:145-166 | internal/database/sqlcommon/offset_sql.go:178-198 | internal/database/sqlcommon/pin_sql.go:204-228 | internal/database/sqlcommon/tokenapproval_sql.go:238-261 | internal/database/sqlcommon/transaction_sql.go:233-253 β€” These 8 members are one piece of code written 8 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 8 times and the copies will drift further apart.
D4 Β· Code Duplication Β· Edited copies of one member (4 members, 16+ corresponding lines) Β· Γ—1
  • Edited copies of one member (4 members, 16+ corresponding lines) REDACTED:634 β€” REDACTED:634-653 | REDACTED:601-617 | REDACTED:619-634 | REDACTED:649-669 β€” These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 Β· Code Duplication Β· Edited copies of one member (6 members, 24+ corresponding lines) Β· Γ—1
  • Edited copies of one member (6 members, 24+ corresponding lines) internal/database/sqlcommon/batch_sql.go:128 β€” internal/database/sqlcommon/batch_sql.go:128-151 | internal/database/sqlcommon/data_sql.go:270-299 | internal/database/sqlcommon/event_sql.go:172-197 | internal/database/sqlcommon/nonce_sql.go:97-120 | internal/database/sqlcommon/operation_sql.go:166-189 | internal/database/sqlcommon/transaction_sql.go:182-205 β€” These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 24 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 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) internal/database/sqlcommon/blob_sql.go:169 β€” internal/database/sqlcommon/blob_sql.go:169-185 | internal/database/sqlcommon/data_sql.go:425-439 | internal/database/sqlcommon/nonce_sql.go:148-164 β€” 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 copy of a member (55 corresponding lines) Β· Γ—1
  • Edited copy of a member (55 corresponding lines) internal/blockchain/ethereum/config.go:25 β€” internal/blockchain/ethereum/config.go:25-84 | internal/blockchain/tezos/config.go:25-79 β€” These two members are one piece of code written twice and then edited apart: 55 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 Β· Code Duplication Β· Edited copies of one member (7 members, 12+ corresponding lines) Β· Γ—1
  • Edited copies of one member (7 members, 12+ corresponding lines) internal/blockchain/ethereum/eventstream.go:111 β€” internal/blockchain/cardano/eventstream.go:89-100 | internal/blockchain/cardano/eventstream.go:102-113 | internal/blockchain/ethereum/eventstream.go:111-122 | internal/blockchain/ethereum/eventstream.go:124-135 | internal/blockchain/fabric/eventstream.go:104-115 | internal/blockchain/tezos/eventstream.go:99-110 | internal/blockchain/tezos/eventstream.go:112-123 β€” These 7 members are one piece of code written 7 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 7 times and the copies will drift further apart.
D4 Β· Code Duplication Β· Edited copy of a member (31 corresponding lines) Β· Γ—1
  • Edited copy of a member (31 corresponding lines) internal/blockchain/fabric/eventstream.go:35 β€” internal/blockchain/fabric/eventstream.go:35-67 | internal/blockchain/tezos/eventstream.go:36-66 β€” 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 (9 corresponding lines) Β· Γ—1
  • Edited copy of a member (9 corresponding lines) internal/events/aggregator.go:264 β€” internal/events/aggregator.go:264-272 | internal/events/event_dispatcher.go:183-191 β€” 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 Β· Edited copies of one member (3 members, 13+ corresponding lines) Β· Γ—1
  • Edited copies of one member (3 members, 13+ corresponding lines) REDACTED:116 β€” REDACTED:116-129 | REDACTED:131-148 | REDACTED:70-82 β€” These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 Β· Code Duplication Β· Edited copies of one member (8 members, 12+ corresponding lines) Β· Γ—1
  • Edited copies of one member (8 members, 12+ corresponding lines) internal/blockchain/ethereum/eventstream.go:160 β€” internal/blockchain/ethereum/eventstream.go:160-171 | internal/blockchain/ethereum/eventstream.go:184-196 | internal/blockchain/ethereum/eventstream.go:281-292 | internal/blockchain/fabric/eventstream.go:136-147 | internal/blockchain/fabric/eventstream.go:160-172 | internal/blockchain/fabric/eventstream.go:260-271 | internal/blockchain/tezos/eventstream.go:153-165 | internal/blockchain/tezos/eventstream.go:205-216 β€” These 8 members are one piece of code written 8 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 8 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) internal/database/sqlcommon/blob_sql.go:118 β€” internal/database/sqlcommon/blob_sql.go:118-134 | internal/database/sqlcommon/event_sql.go:152-170 | internal/database/sqlcommon/nextpin_sql.go:70-84 | internal/database/sqlcommon/pin_sql.go:154-172 β€” 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 (6 members, 10+ corresponding lines) Β· Γ—1
  • Edited copies of one member (6 members, 10+ corresponding lines) internal/syncasync/sync_async_bridge.go:183 β€” internal/syncasync/sync_async_bridge.go:183-192 | internal/syncasync/sync_async_bridge.go:194-203 | internal/syncasync/sync_async_bridge.go:205-214 | internal/syncasync/sync_async_bridge.go:230-239 | internal/syncasync/sync_async_bridge.go:241-251 | internal/syncasync/sync_async_bridge.go:253-262 β€” These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
D4 Β· Code Duplication Β· Edited copies of one member (3 members, 8+ corresponding lines) Β· Γ—1
  • Edited copies of one member (3 members, 8+ corresponding lines) internal/database/sqlcommon/blockchainevents_sql.go:77 β€” internal/database/sqlcommon/blockchainevents_sql.go:77-84 | internal/database/sqlcommon/contractapis_sql.go:99-106 | internal/database/sqlcommon/ffi_sql.go:90-97 β€” These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 Β· Code Duplication Β· Edited copy of a member (8 corresponding lines) Β· Γ—1
  • Edited copy of a member (8 corresponding lines) internal/operations/manager.go:82 β€” internal/operations/manager.go:82-91 | internal/operations/manager.go:304-311 β€” These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β€” the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β€” factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 Β· Code Duplication Β· Edited copies of one member (3 members, 11+ corresponding lines) Β· Γ—1
  • Edited copies of one member (3 members, 11+ corresponding lines) smart_contracts/fabric/custompin-sample/chaincode/contract.go:19 β€” smart_contracts/fabric/custompin-sample/chaincode/contract.go:19-29 | smart_contracts/fabric/firefly-go/chaincode/contract.go:15-30 | smart_contracts/fabric/firefly-go/chaincode/contract.go:32-44 β€” 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, 7+ corresponding lines) Β· Γ—1
  • Edited copies of one member (3 members, 7+ corresponding lines) internal/data/message_writer.go:142 β€” internal/data/message_writer.go:142-151 | internal/events/blob_receiver.go:104-110 | internal/txwriter/txwriter.go:129-138 β€” These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 Β· Code Duplication Β· Edited copies of one member (7 members, 16+ corresponding lines) Β· Γ—1
  • Edited copies of one member (7 members, 16+ corresponding lines) internal/syncasync/sync_async_bridge.go:353 β€” internal/syncasync/sync_async_bridge.go:353-368 | internal/syncasync/sync_async_bridge.go:387-402 | internal/syncasync/sync_async_bridge.go:422-437 | internal/syncasync/sync_async_bridge.go:439-454 | internal/syncasync/sync_async_bridge.go:456-471 | internal/syncasync/sync_async_bridge.go:473-488 | internal/syncasync/sync_async_bridge.go:490-505 β€” These 7 members are one piece of code written 7 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 7 times and the copies will drift further apart.
D4 Β· Code Duplication Β· Edited copies of one member (5 members, 11+ corresponding lines) Β· Γ—1
  • Edited copies of one member (5 members, 11+ corresponding lines) internal/broadcast/manager.go:175 β€” internal/broadcast/manager.go:175-190 | internal/networkmap/data_query.go:91-104 | internal/networkmap/data_query.go:210-223 | internal/orchestrator/data_query.go:55-65 | internal/orchestrator/data_query.go:179-189 β€” These 5 members are one piece of code written 5 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 5 times and the copies will drift further apart.
D4 Β· Code Duplication Β· Edited copies of one member (5 members, 8+ corresponding lines) Β· Γ—1
  • Edited copies of one member (5 members, 8+ corresponding lines) internal/contracts/operations.go:49 β€” internal/contracts/operations.go:49-56 | internal/txcommon/contract_inputs.go:40-49 | internal/txcommon/token_inputs.go:36-43 | internal/txcommon/token_inputs.go:64-71 | internal/txcommon/token_inputs.go:81-88 β€” 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, 9+ corresponding lines) Β· Γ—1
  • Edited copies of one member (3 members, 9+ corresponding lines) internal/dataexchange/ffdx/ffdx.go:239 β€” internal/dataexchange/ffdx/ffdx.go:239-248 | REDACTED:81-90 | internal/tokens/fftokens/fftokens.go:385-393 β€” 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, 5+ corresponding lines) Β· Γ—1
  • Edited copies of one member (3 members, 5+ corresponding lines) smart_contracts/corda/cordapp_kat/kat-flows/src/main/java/io/kaleido/kat/flows/CreateAssetInstanceBatchFlow.java:37 β€” smart_contracts/corda/cordapp_kat/kat-flows/src/main/java/io/kaleido/kat/flows/CreateAssetInstanceBatchFlow.java:37-41 | smart_contracts/corda/cordapp_kat/kat-flows/src/main/java/io/kaleido/kat/flows/CreateAssetInstanceFlow.java:41-45 | smart_contracts/corda/cordapp_kat/kat-flows/src/main/java/io/kaleido/kat/flows/CreateDescribedAssetInstanceFlow.java:44-48 β€” 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 copy of a member (3 corresponding lines) Β· Γ—1
  • Edited copy of a member (3 corresponding lines) internal/database/sqlcommon/ffi_events_sql.go:172 β€” internal/database/sqlcommon/ffi_events_sql.go:172-174 | internal/database/sqlcommon/ffi_methods_sql.go:176-178 β€” 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 (41–42 lines × 2) Β· Γ—1
  • Duplicated block (41–42 lines × 2) internal/blockchain/ethereum/address_resolver.go:59 β€” internal/blockchain/ethereum/address_resolver.go:59-100 | internal/blockchain/tezos/address_resolver.go:58-98 β€” `internal/blockchain/ethereum/address_resolver.go` and `internal/blockchain/tezos/address_resolver.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 4 separate duplicated blocks between them, totalling at least 102 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 (37 lines × 2) Β· Γ—1
  • Duplicated block (37 lines × 2) internal/blockchain/ethereum/address_resolver.go:104 β€” internal/blockchain/ethereum/address_resolver.go:104-140 | internal/blockchain/tezos/address_resolver.go:101-137 β€” `internal/blockchain/ethereum/address_resolver.go` and `internal/blockchain/tezos/address_resolver.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 4 separate duplicated blocks between them, totalling at least 102 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 (31 lines × 2) Β· Γ—1
  • Duplicated block (31 lines × 2) internal/broadcast/manager.go:221 β€” internal/broadcast/manager.go:221-251 | internal/broadcast/manager.go:272-302 β€” both copies are in the same file, so extract the 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 (27 lines × 2) Β· Γ—1
  • Duplicated block (27 lines × 2) REDACTED:218 β€” REDACTED:218-244 | REDACTED:269-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 `REDACTED:218` 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 (26 lines × 2) Β· Γ—1
  • Duplicated block (26 lines × 2) smart_contracts/fabric/custompin-sample/batchpin/batchpin.go:30 β€” smart_contracts/fabric/custompin-sample/batchpin/batchpin.go:30-55 | smart_contracts/fabric/firefly-go/batchpin/batchpin.go:30-55 β€” before extracting anything, compare `smart_contracts/fabric/custompin-sample/batchpin/batchpin.go` and `smart_contracts/fabric/firefly-go/batchpin/batchpin.go` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 49 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 Β· Code Duplication Β· Duplicated block (22 lines × 2) Β· Γ—1
  • Duplicated block (22 lines × 2) internal/definitions/sender_contracts.go:154 β€” internal/definitions/sender_contracts.go:154-175 | internal/definitions/sender_tokenpool.go:75-96 β€” 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 (20–21 lines × 2) Β· Γ—1
  • Duplicated block (20–21 lines × 2) internal/events/tokens_approved.go:88 β€” internal/events/tokens_approved.go:88-107 | internal/events/tokens_transferred.go:79-99 β€” before extracting anything, compare `internal/events/tokens_approved.go` and `internal/events/tokens_transferred.go` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 62 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `internal/events/tokens_approved.go:88` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 Β· Code Duplication Β· Duplicated block (18 lines × 3) Β· Γ—1
  • Duplicated block (18 lines × 3) REDACTED:458 β€” REDACTED:527-544 | REDACTED:458-475 | REDACTED:511-528 β€” 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 `REDACTED:527` it does not close everything it opens, so those 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 `string` to `c *Cardano) eventLoop(namespace` in one and `subID` 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 (18 lines × 2) Β· Γ—1
  • Duplicated block (18 lines × 2) REDACTED:854 β€” REDACTED:354-371 | REDACTED:854-871 β€” 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 (17 lines × 2) Β· Γ—1
  • Duplicated block (17 lines × 2) REDACTED:141 β€” REDACTED:141-157 | REDACTED:148-164 β€” the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach β€” a location they all depend on today, or a new shared one if there is none β€” and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 Β· Code Duplication Β· Duplicated block (15 lines × 3) Β· Γ—1
  • Duplicated block (15 lines × 3) internal/assets/token_transfer.go:123 β€” internal/assets/token_transfer.go:123-137 | internal/assets/token_transfer.go:141-155 | internal/assets/token_transfer.go:159-173 β€” 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 `internal/assets/token_transfer.go:123` it runs out through the closing brace of the declaration holding it β€” the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied β€” no decision has to be handed back and re-acted on.
D4 Β· Code Duplication Β· Duplicated block (14 lines × 4) Β· Γ—1
  • Duplicated block (14 lines × 4) REDACTED:464 β€” REDACTED:533-546 | REDACTED:464-477 | REDACTED:517-530 | REDACTED:795-808 β€” 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 `REDACTED:533` it does not close everything it opens, so those 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 `string` to `c *Cardano) eventLoop(namespace` in one and `subID` 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 (14 lines × 3) Β· Γ—1
  • Duplicated block (14 lines × 3) REDACTED:854 β€” REDACTED:354-367 | REDACTED:854-867 | REDACTED:410-424 β€” 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 (12–14 lines × 2) Β· Γ—1
  • Duplicated block (12–14 lines × 2) REDACTED:515 β€” REDACTED:453-464 | REDACTED:515-528 β€” 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 (10 lines × 4) Β· Γ—1
  • Duplicated block (10 lines × 4) REDACTED:613 β€” REDACTED:613-622 | REDACTED:759-769 | REDACTED:332-342 | REDACTED:633-643 β€” 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 `REDACTED:613` it does not close everything it opens, so those 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, `REDACTED:625` calls `StatusCode` and `REDACTED:343` 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 × 5) Β· Γ—1
  • Duplicated block (8 lines × 5) internal/apiserver/route_post_new_message_broadcast.go:40 β€” internal/apiserver/route_post_new_message_broadcast.go:40-47 | internal/apiserver/route_post_new_message_private.go:40-47 | internal/apiserver/route_post_new_node_self.go:40-47 | internal/apiserver/route_post_new_organization.go:40-47 | internal/apiserver/route_post_new_organization_self.go:40-47 β€” before extracting anything, compare `internal/apiserver/route_post_new_message_broadcast.go` and `internal/apiserver/route_post_new_message_private.go` as WHOLE FILES: 87% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it β€” treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `internal/apiserver/route_post_new_message_broadcast.go:40` it does not close everything it opens, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 Β· Code Duplication Β· Duplicated block (8 lines × 3) Β· Γ—1
  • Duplicated block (8 lines × 3) internal/blockchain/ethereum/eventstream.go:185 β€” internal/blockchain/ethereum/eventstream.go:185-192 | internal/blockchain/fabric/eventstream.go:161-168 | internal/blockchain/tezos/eventstream.go:154-161 β€” `internal/blockchain/ethereum/eventstream.go` and `internal/blockchain/fabric/eventstream.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 7 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 `internal/blockchain/ethereum/eventstream.go:185` it does not close everything it opens, so those 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 × 16) Β· Γ—1
  • Duplicated block (6 lines × 16) internal/apiserver/route_get_contract_api_by_name.go:39 β€” internal/apiserver/route_get_contract_api_by_name.go:39-44 | internal/apiserver/route_get_contract_api_interface.go:39-44 | internal/apiserver/route_get_contract_api_listeners.go:42-47 | internal/apiserver/route_get_contract_apis.go:39-44 | internal/apiserver/route_get_contract_interface.go:42-47 | internal/apiserver/route_get_contract_interface_name_version.go:43-48 | internal/apiserver/route_get_contract_interfaces.go:39-44 | internal/apiserver/route_get_contract_listener_by_name_or_id.go:42-47 | internal/apiserver/route_get_contract_listeners.go:39-44 | internal/apiserver/route_post_contract_api_listeners.go:40-45 | internal/apiserver/route_post_contract_api_query.go:40-45 | internal/apiserver/route_post_contract_interface_generate.go:37-42 | internal/apiserver/route_post_contract_listeners_hash.go:44-49 | internal/apiserver/route_post_contract_query.go:37-42 | internal/apiserver/route_post_new_contract_interface.go:42-47 | internal/apiserver/route_post_new_contract_listener.go:37-42 β€” before extracting anything, compare `internal/apiserver/route_get_contract_api_listeners.go` and `internal/apiserver/route_get_contract_listeners.go` as WHOLE FILES: 82% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it β€” treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `internal/apiserver/route_get_contract_api_by_name.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.
D4 Β· Code Duplication Β· Duplicated block (6 lines × 3) Β· Γ—1
  • Duplicated block (6 lines × 3) internal/blockchain/ethereum/eventstream.go:270 β€” internal/blockchain/ethereum/eventstream.go:270-275 | internal/blockchain/fabric/eventstream.go:249-254 | internal/blockchain/tezos/eventstream.go:194-199 β€” `internal/blockchain/ethereum/eventstream.go` and `internal/blockchain/fabric/eventstream.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 7 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 `internal/blockchain/ethereum/eventstream.go:270` it does not close everything it opens, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 Β· Code Duplication Β· Duplicated block (24 lines × 8) Β· Γ—1
  • Duplicated block (24 lines × 8) internal/database/sqlcommon/batch_sql.go:153 β€” internal/database/sqlcommon/batch_sql.go:153-177 | internal/database/sqlcommon/blockchainevents_sql.go:207-232 | internal/database/sqlcommon/contractapis_sql.go:239-264 | internal/database/sqlcommon/contractlisteners_sql.go:238-262 | internal/database/sqlcommon/datatype_sql.go:175-201 | internal/database/sqlcommon/operation_sql.go:191-214 | internal/database/sqlcommon/subscription_sql.go:189-215 | internal/database/sqlcommon/transaction_sql.go:207-231 β€” 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 8 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.
D4 Β· Code Duplication Β· Duplicated block (24 lines × 3) Β· Γ—1
  • Duplicated block (24 lines × 3) internal/database/sqlcommon/ffi_errors_sql.go:119 β€” internal/database/sqlcommon/ffi_errors_sql.go:119-142 | internal/database/sqlcommon/ffi_events_sql.go:147-170 | internal/database/sqlcommon/ffi_methods_sql.go:151-174 β€” the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach β€” a file they already depend on, or a new one alongside them β€” and call it from all 3 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.
D4 Β· Code Duplication Β· Duplicated block (25 lines × 3) Β· Γ—1
  • Duplicated block (25 lines × 3) internal/database/sqlcommon/ffi_sql.go:228 β€” internal/database/sqlcommon/ffi_sql.go:228-253 | internal/database/sqlcommon/identity_sql.go:210-234 | internal/database/sqlcommon/verifier_sql.go:174-198 β€” 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 register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead β€” before the caller uses what it releases β€” so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
D4 Β· Code Duplication Β· Duplicated block (16 lines × 2) Β· Γ—1
  • Duplicated block (16 lines × 2) smart_contracts/fabric/custompin-sample/batchpin/batchpin.go:12 β€” smart_contracts/fabric/custompin-sample/batchpin/batchpin.go:12-27 | smart_contracts/fabric/firefly-go/batchpin/batchpin.go:12-27 β€” before extracting anything, compare `smart_contracts/fabric/custompin-sample/batchpin/batchpin.go` and `smart_contracts/fabric/firefly-go/batchpin/batchpin.go` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 49 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 (9 lines × 4) Β· Γ—1
  • Duplicated block (9 lines × 4) internal/assets/operations.go:208 β€” internal/assets/operations.go:208-216 | internal/assets/operations.go:218-226 | internal/broadcast/operations.go:223-231 | internal/contracts/operations.go:192-200 β€” there are 4 copies across 3 file(s) β€” more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart.
D4 Β· Code Duplication Β· Duplicated block (7 lines × 4) Β· Γ—1
  • Duplicated block (7 lines × 4) internal/orchestrator/data_query.go:92 β€” internal/orchestrator/data_query.go:92-98 | internal/orchestrator/data_query.go:108-114 | internal/orchestrator/data_query.go:171-177 | internal/orchestrator/subscriptions.go:106-112 β€” 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.
D4 Β· Code Duplication Β· Duplicated block (12 lines × 4) Β· Γ—1
  • Duplicated block (12 lines × 4) internal/tokens/fftokens/fftokens.go:931 β€” internal/tokens/fftokens/fftokens.go:931-942 | internal/tokens/fftokens/fftokens.go:967-978 | internal/tokens/fftokens/fftokens.go:1002-1013 | internal/tokens/fftokens/fftokens.go:1038-1049 β€” 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 `internal/tokens/fftokens/fftokens.go:931` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows β€” the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run β€” a one-line delegation has no helper inside it to lift β€” so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 Β· Code Duplication Β· Duplicated block (10 lines × 3) Β· Γ—1
  • Duplicated block (10 lines × 3) REDACTED:640 β€” REDACTED:640-649 | REDACTED:621-630 | REDACTED:655-665 β€” 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 `REDACTED:640` it does not close everything it opens, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
D44 Β· Platform End-of-Life Β· End-of-life runtime Β· Γ—1
  • End-of-life runtime: Ruby 3.1 .ruby-version:1 β€” .ruby-version declares Ruby 3.1 as this project's version file, and Ruby 3.1, support ended 2025-03-26. An unsupported runtime receives no security patches, so every vulnerability disclosed in it since 2025-03-26 is present and unfixable without moving off it. This is a migration rather than an upgrade: there is no newer release of a runtime that has ended.
P7 Β· Outbound HTTP resilience Β· Outbound HTTP without resilience Β· Γ—1
  • Outbound HTTP without resilience auditevents/main.go:42 β€” `http.Get(` 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.
X2 Β· Cancellation propagation Β· Function without context.Context Β· Γ—1
  • Function without context.Context: get auditevents/main.go:41 β€” `get` 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, …)`.
X26 Β· Unsynchronised callback handoff Β· Collection crosses a callback boundary unsynchronised Β· Γ—1
  • Collection crosses a callback boundary unsynchronised internal/privatemessaging/privatemessaging.go:270 β€” `submitBlobTransfersToDX` starts a goroutine on every pass of a loop, and each one writes `firstError`, a variable declared before the loop β€” `firstError = …` on line 270. The loop never waits on `wg` before its next pass, so the goroutines of successive passes run at the same time and each one's write races the next one's; waiting on `wg` after the loop orders only what follows the wait. A goroutine's closure captures `firstError` by reference, so every goroutine and the body use ONE variable, and a plain variable has no synchronisation of its own: by the Go memory model a write concurrent with any other access to it is a data race (the race detector reports it), a racing `++` loses updates, and a racing read sees a stale or torn value. `wg` is a `sync.WaitGroup`, which orders the handoff's signal and takes no exclusion over the variable's own state. Guard every write to `firstError` with one `sync.Mutex`, or have each goroutine send its result on a channel that this body alone receives from and writes into `firstError`.
Minor β€” 45 finding(s)
AX6 Β· Interface segregation Β· Fat interface Β· Γ—9
  • Fat interface: Manager (24 methods) internal/assets/manager.go:41 β€” `Manager` declares 24 methods: `CreateTokenPool`, `ActivateTokenPool`, `GetTokenPools`, `GetTokenPoolByLocator`, `GetTokenPoolByNameOrID`, `GetTokenPoolByID`, `ResolvePoolMethods`, `DeleteTokenPool`, `GetTokenBalances`, `GetTokenAccounts`, `GetTokenAccountPools`, `GetTokenTransfers`, `GetTokenTransferByID`, `NewTransfer`, `MintTokens`, `BurnTokens`, `TransferTokens`, `GetTokenConnectors`, `NewApproval`, `TokenApproval`, `GetTokenApprovals`, `PrepareOperation`, `RunOperation`, `Start`. 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: Manager (30 methods) internal/contracts/manager.go:52 β€” `Manager` declares 30 methods: `GetFFI`, `GetFFIWithChildren`, `GetFFIByID`, `GetFFIByIDWithChildren`, `GetFFIMethods`, `GetFFIEvents`, `GetFFIs`, `ResolveFFI`, `ResolveFFIReference`, `DeleteFFI`, `DeployContract`, `InvokeContract`, `InvokeContractAPI`, `GetContractAPI`, `GetContractAPIInterface`, `GetContractAPIs`, `ResolveContractAPI`, `DeleteContractAPI`, `UpsertContractAPI`, `ConstructContractListenerSignature`, `AddContractListener`, `AddContractAPIListener`, `GetContractListenerByNameOrID`, `GetContractListenerByNameOrIDWithStatus`, `GetContractListeners`, `GetContractAPIListeners`, `DeleteContractListenerByNameOrID`, `GenerateFFI`, `PrepareOperation`, `RunOperation`. 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: Manager (18 methods) internal/data/data_manager.go:37 β€” `Manager` declares 18 methods: `CheckDatatype`, `ValidateAll`, `GetMessageWithDataCached`, `GetMessageDataCached`, `PeekMessageCache`, `UpdateMessageCache`, `UpdateMessageIfCached`, `UpdateMessageStateIfCached`, `ResolveInlineData`, `WriteNewMessage`, `BlobsEnabled`, `UploadJSON`, `UploadBlob`, `DownloadBlob`, `DeleteData`, `HydrateBatch`, `Start`, `WaitStop`. 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: EventManager (22 methods) internal/events/event_manager.go:55 β€” `EventManager` declares 22 methods: `NewPins`, `NewEvents`, `NewSubscriptions`, `SubscriptionUpdates`, `DeletedSubscriptions`, `DeleteDurableSubscription`, `CreateUpdateDurableSubscription`, `EnrichEvent`, `EnrichEvents`, `FilterHistoricalEventsOnSubscription`, `QueueBatchRewind`, `ResolveTransportAndCapabilities`, `Start`, `WaitStop`, `BlockchainEventBatch`, `DXEvent`, `SharedStorageBatchDownloaded`, `SharedStorageBlobDownloaded`, `TokenPoolCreated`, `TokensTransferred`, `TokensApproved`, `GetPlugins`. 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: Manager (16 methods) internal/identity/identitymanager.go:41 β€” `Manager` declares 16 methods: `ResolveInputSigningIdentity`, `ResolveInputVerifierRef`, `ResolveInputSigningKey`, `ResolveQuerySigningKey`, `ResolveIdentitySigner`, `ResolveMultipartyRootVerifier`, `FindIdentityForVerifier`, `CachedIdentityLookupByID`, `CachedIdentityLookupMustExist`, `CachedIdentityLookupNilOK`, `GetLocalNode`, `GetLocalNodeDID`, `GetRootOrgDID`, `GetRootOrg`, `VerifyIdentityChain`, `ValidateNodeOwner`. 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: Manager (22 methods) internal/networkmap/manager.go:34 β€” `Manager` declares 22 methods: `RegisterOrganization`, `RegisterNode`, `RegisterNodeOrganization`, `RegisterIdentity`, `UpdateIdentity`, `CheckNodeIdentityStatus`, `GetOrganizationByNameOrID`, `GetOrganizations`, `GetOrganizationsWithVerifiers`, `GetNodeByNameOrID`, `GetNodes`, `GetIdentityByID`, `GetIdentityByIDWithVerifiers`, `GetIdentityByDID`, `GetIdentityByDIDWithVerifiers`, `GetIdentities`, `GetIdentitiesWithVerifiers`, `GetIdentityVerifiers`, `GetVerifiers`, `GetVerifierByHash`, `GetDIDDocForIndentityByID`, `GetDIDDocForIndentityByDID`. 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: Orchestrator (63 methods) internal/orchestrator/orchestrator.go:58 β€” `Orchestrator` declares 63 methods: `PreInit`, `Init`, `Start`, `WaitStop`, `MultiParty`, `BatchManager`, `Broadcast`, `PrivateMessaging`, `Assets`, `DefinitionSender`, `Contracts`, `Data`, `Events`, `NetworkMap`, `Operations`, `Identity`, `GetStatus`, `GetMultipartyStatus`, `GetSubscriptions`, `GetSubscriptionByID`, `GetSubscriptionByIDWithStatus`, `GetSubscriptionEventsHistorical`, `CreateSubscription`, `CreateUpdateSubscription`, `DeleteSubscription`, `GetNamespace`, `GetTransactionByID`, `GetTransactionOperations`, `GetTransactionBlockchainEvents`, `GetTransactionStatus`, `GetTransactions`, `GetMessageByID`, `GetMessageByIDWithData`, `GetMessages`, `GetMessagesWithData`, `GetMessageTransaction`, `GetMessageEvents`, `GetMessageData`, `GetMessagesForData`, `GetBatchByID`, and 23 more. 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: Plugin (31 methods) pkg/blockchain/plugin.go:39 β€” `Plugin` declares 31 methods: `InitConfig`, `Init`, `StartNamespace`, `StopNamespace`, `SetHandler`, `SetOperationHandler`, `Capabilities`, `VerifierType`, `ResolveSigningKey`, `SubmitBatchPin`, `SubmitNetworkAction`, `DeployContract`, `ParseInterface`, `ValidateInvokeRequest`, `InvokeContract`, `QueryContract`, `AddContractListener`, `DeleteContractListener`, `GetContractListenerStatus`, `GetFFIParamValidator`, `GenerateFFI`, `NormalizeContractLocation`, `GenerateEventSignature`, `GenerateEventSignatureWithLocation`, `CheckOverlappingLocations`, `GenerateErrorSignature`, `GetNetworkVersion`, `GetAndConvertDeprecatedContractConfig`, `AddFireflySubscription`, `RemoveFireflySubscription`, `GetTransactionStatus`. 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: Plugin (16 methods) pkg/tokens/plugin.go:29 β€” `Plugin` declares 16 methods: `InitConfig`, `Init`, `SetHandler`, `SetOperationHandler`, `StartNamespace`, `StopNamespace`, `Capabilities`, `ConnectorName`, `CreateTokenPool`, `ActivateTokenPool`, `DeactivateTokenPool`, `CheckInterface`, `MintTokens`, `BurnTokens`, `TransferTokens`, `TokensApproval`. 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.
X10 Β· Duplicated predicate Β· Duplicated predicate Β· Γ—9
  • Duplicated predicate internal/metrics/metrics.go:61 β€” `config.GetBool(coreconfig.DeprecatedMetricsEnabled) || config.GetBool(coreconfig.MonitoringEnabled)` appears character-identically in 2 files β€” internal/metrics/metrics.go, internal/namespace/manager.go. 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 internal/batch/batch_processor.go:637 β€” `conflictTestOk && conflictErr.IsConflictError()` appears character-identically in 2 files β€” internal/batch/batch_processor.go, internal/operations/manager.go. 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 internal/definitions/handler_identity_claim.go:250 β€” `dh.multiparty && identity.Type == core.IdentityTypeNode` appears character-identically in 2 files β€” internal/definitions/handler_identity_claim.go, internal/definitions/handler_identity_update.go. 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 internal/database/sqlcommon/tokenapproval_sql.go:274 β€” `err != nil && err != fftypes.DeleteRecordNotFound` appears character-identically in 3 files β€” internal/database/sqlcommon/tokenapproval_sql.go, internal/database/sqlcommon/tokenbalance_sql.go, internal/database/sqlcommon/tokentransfer_sql.go. 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 internal/blockchain/ethereum/eventstream.go:230 β€” `firstEvent == "" || firstEvent == string(core.SubOptsFirstEventNewest) || firstEvent == "latest"` appears character-identically in 2 files β€” internal/blockchain/ethereum/eventstream.go, internal/blockchain/fabric/eventstream.go. 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 internal/events/tokens_approved.go:144 β€” `msg != nil && msg.State == core.MessageStateStaged` appears character-identically in 2 files β€” internal/events/tokens_approved.go, internal/events/tokens_transferred.go. 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 internal/blockchain/ethereum/eventstream.go:165 β€” `okNotFound && res.StatusCode() == http.StatusNotFound` appears character-identically in 3 files β€” internal/blockchain/ethereum/eventstream.go, internal/blockchain/fabric/eventstream.go, internal/blockchain/tezos/eventstream.go. 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 internal/blockchain/common/common.go:510 β€” `res != nil && res.StatusCode() == http.StatusConflict` appears character-identically in 2 files β€” internal/blockchain/common/common.go, internal/tokens/fftokens/fftokens.go. 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 REDACTED:665 β€” `sBlockNumber == "" || sTransactionHash == ""` appears character-identically in 2 files β€” REDACTED, 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.
D30 Β· Dependency Vulnerabilities Β· Low CVE Β· Γ—6
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D31 Β· IaC & Container Security Β· Low IaC Β· Γ—5
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 Β· Static Analysis (SAST) Β· REDACTED Β· Γ—3
  • REDACTED
  • REDACTED
  • REDACTED
D20 Β· ADR Quality Β· No ADRs found Β· Γ—1
  • No ADRs found main.go:17 β€” 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 `main.go` makes this repository a deployable product (line 17).
D21 Β· Naming Consistency Β· `MsgSequenceIDDidNotParseToInt` spells `Did` where 41 names in the project spell it `DID` Β· Γ—1
  • `MsgSequenceIDDidNotParseToInt` spells `Did` where 41 names in the project spell it `DID` internal/coremsgs/en_error_messages.go:305 β€” 41 of 42 names in project github.com/hyperledger-firefly/firefly spell the token `DID` (41 of 42; unit: names in project github.com/hyperledger-firefly/firefly containing `DID`). Peers: apiserver.getIdentityByDID (internal/apiserver/route_get_identity_by_did.go:28); apiserver.getIdentityDID (internal/apiserver/route_get_identity_did.go:27); apiserver.getNetworkIdentityByDID (internal/apiserver/route_get_net_did.go:28); apiserver.getNetworkDIDDocByDID (internal/apiserver/route_get_net_diddoc.go:27); coremsgs.APIParamsDID (internal/coremsgs/en_api_translations.go:52). Rename to `MsgSequenceIDDIDNotParseToInt`. [rule N6]
D26 Β· Project Cohesion Β· Projects may be oversized for their cohesion Β· Γ—1
  • Projects may be oversized for their cohesion REDACTED:1 β€” `(repository root)` (52456 LoC, 375 module-visible types across 61 directories) overshoots its size bounds. 1 of 6 build unit(s) (Go, Gradle, npm) overshoot their size bounds, lowering Project Cohesion to 6.7/10. Review these for cohesion β€” draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
D28 Β· Secrets (history) Β· Rotate the exposed credentials Β· Γ—1
  • REDACTED
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
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.
M4 Β· Documentation accuracy Β· README/code drift Β· Γ—1
  • README/code drift doc-site/docs/contributors/dev_environment_setup.md:15 β€” doc-site/docs/contributors/dev_environment_setup.md names Go 1.22, but REDACTED:3 requires `go 1.26.0` (the lowest of 4 declarations): the code does not build on Go 1.22. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
P3 Β· Security & performance tooling Β· Dependabot does not watch gradle Β· Γ—1
  • Dependabot does not watch gradle REDACTED:18 β€” `REDACTED` schedules updates, but no `package-ecosystem` entry covers `gradle`, 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 entry to the `updates:` list.
PF1 Β· Benchmark discipline Β· Benchmarks don't track allocations Β· Γ—1
  • Benchmarks don't track allocations internal/contracts/manager_bench_test.go β€” A Go testing.B suite exists but nothing turns on its allocation measurement β€” allocations (the main way hot code pressures a garbage collector or allocator) aren't being measured.
X2 Β· Cancellation propagation Β· Not all functions that make a request accept a context.Context Β· Γ—1
  • Not all functions that make a request accept a context.Context β€” Only 0/1 functions that make a cancellable request (net/http, net.Dial) accept a context.Context or pass one on, so a request keeps running after whatever wanted it has given up β€” a cancelled request, a shutdown, an expired deadline. Take `ctx context.Context` as the first parameter and build the request with it (`http.NewRequestWithContext`, `DialContext`); where nothing could ever cancel the call, omitting it is a deliberate choice β€” judge against how the function is used.
Minor β€” 21 finding(s)
D12 Β· Dependency Hygiene Β· Outdated Β· Γ—20
  • Outdated: blockwatch.cc/tzgo β€” `blockwatch.cc/tzgo` is required at v1.17.1 in REDACTED, but v1.18.4 is the module's current release β€” so this build is missing every fix published since, including any security fix. Run `go get blockwatch.cc/tzgo@v1.18.4 && go mod tidy` and commit the updated REDACTED and go.sum.
  • Outdated: github.com/getkin/kin-openapi β€” `github.com/getkin/kin-openapi` is required at v0.149.0 in REDACTED, but v0.153.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/getkin/kin-openapi@v0.153.0 && go mod tidy` and commit the updated REDACTED and go.sum.
  • Outdated: github.com/go-resty/resty/v2 β€” `github.com/go-resty/resty/v2` is required at v2.11.0 in REDACTED, but v2.17.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/go-resty/resty/v2@v2.17.2 && go mod tidy` and commit the updated REDACTED and go.sum.
  • Outdated: github.com/golang-migrate/migrate/v4 β€” `github.com/golang-migrate/migrate/v4` is required at v4.17.0 in REDACTED, but v4.20.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/golang-migrate/migrate/v4@v4.20.1 && go mod tidy` and commit the updated REDACTED and go.sum.
  • Outdated: github.com/gorilla/websocket β€” `github.com/gorilla/websocket` is required at v1.5.1 in REDACTED, but v1.5.3 is the module's current release β€” so this build is missing every fix published since, including any security fix. Run `go get github.com/gorilla/websocket@v1.5.3 && go mod tidy` and commit the updated REDACTED and go.sum.
  • Outdated: github.com/hyperledger-firefly/common β€” `github.com/hyperledger-firefly/common` is required at v1.6.3 in REDACTED, but v1.6.7 is the module's current release β€” so this build is missing every fix published since, including any security fix. Run `go get github.com/hyperledger-firefly/common@v1.6.7 && go mod tidy` and commit the updated REDACTED and go.sum.
  • Outdated: github.com/hyperledger/fabric-protos-go β€” `github.com/hyperledger/fabric-protos-go` is required at v0.3.3 in REDACTED, but v0.3.7 is the module's current release β€” so this build is missing every fix published since, including any security fix. Run `go get github.com/hyperledger/fabric-protos-go@v0.3.7 && go mod tidy` and commit the updated REDACTED and go.sum.
  • Outdated: github.com/hyperledger/fabric-protos-go β€” `github.com/hyperledger/fabric-protos-go` is required at v0.3.3 in REDACTED, but v0.3.7 is the module's current release β€” so this build is missing every fix published since, including any security fix. Run `go get github.com/hyperledger/fabric-protos-go@v0.3.7 && go mod tidy` and commit the updated REDACTED and go.sum.
  • Outdated: github.com/jarcoal/httpmock β€” `github.com/jarcoal/httpmock` is required at v1.2.0 in REDACTED, but v1.4.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/jarcoal/httpmock@v1.4.2 && go mod tidy` and commit the updated REDACTED and go.sum.
  • Outdated: github.com/lib/pq β€” `github.com/lib/pq` is required at v1.10.9 in REDACTED, but v1.12.3 is the module's current release β€” so this build is missing every fix published since, including any security fix. Run `go get github.com/lib/pq@v1.12.3 && 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.19 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/prometheus/client_golang β€” `github.com/prometheus/client_golang` is required at v1.18.0 in REDACTED, but v1.25.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/prometheus/client_golang@v1.25.0 && go mod tidy` and commit the updated REDACTED and go.sum.
  • Outdated: github.com/sirupsen/logrus β€” `github.com/sirupsen/logrus` is required at v1.9.3 in REDACTED, but v1.10.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/sirupsen/logrus@v1.10.2 && go mod tidy` and commit the updated REDACTED and go.sum.
  • Outdated: github.com/spf13/cobra β€” `github.com/spf13/cobra` is required at v1.8.0 in REDACTED, but v1.10.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/spf13/cobra@v1.10.2 && go mod tidy` and commit the updated REDACTED and go.sum.
  • Outdated: github.com/spf13/viper β€” `github.com/spf13/viper` is required at v1.18.2 in REDACTED, but v1.21.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/spf13/viper@v1.21.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.9.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.8.4 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.8.4 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: golang.org/x/net β€” `golang.org/x/net` is required at v0.60.0 in REDACTED, but v0.62.0 is the module's current release β€” so this build is missing every fix published since, including any security fix. Run `go get golang.org/x/net@v0.62.0 && go mod tidy` and commit the updated REDACTED and go.sum.
  • Outdated: golang.org/x/text β€” `golang.org/x/text` is required at v0.42.0 in REDACTED, but v0.44.0 is the module's current release β€” so this build is missing every fix published since, including any security fix. Run `go get golang.org/x/text@v0.44.0 && go mod tidy` and commit the updated REDACTED and go.sum.
D5 Β· Coupling Β· Off the main sequence Β· Γ—1
  • Off the main sequence: @hyperledger/firefly-contracts β€” @hyperledger/firefly-contracts: abstractness 0.00, instability 0.00, distance 1.00 β€” the shape a shared-kernel / building-block library has BY DESIGN β€” concrete and widely depended-on is what makes it useful, and this dimension does not penalise it (the distance is reported for completeness, not as a defect). Worth a look only if it has grown past one coherent kernel into an everything-bucket.

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-37bed8812e8c41b7a14eb4e8cb58c08b/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-37bed8812e8c41b7a14eb4e8cb58c08b/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-37bed8812e8c41b7a14eb4e8cb58c08b/history-2.json --exit-code 0 --source .7artifacts/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=1440" --report-format json --report-path /tmp/watchdog-gitleaks-37bed8812e8c41b7a14eb4e8cb58c08b/history-3.json --exit-code 0 --source .10artifacts/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-37bed8812e8c41b7a14eb4e8cb58c08b/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 mocks --exclude smart_contracts/fabric/custompin-sample/chaincode/mocks --exclude smart_contracts/fabric/firefly-go/chaincode/mocks .77artifacts/raw/semgrep.json
D30 Β· Dependency Vulnerabilitiestrivyβ€”trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** .78artifacts/raw/trivy-fs.json
D31 Β· IaC & Container Securitytrivyβ€”trivy config --format json --quiet .11artifacts/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 01a1e871-aea4-7cf1-b0e1-12a80eefe27b Β· 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