Public report of OpenRiak/riak_kv, published 15 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, 15 November 2026, 07:56 UTC · Survey ID cd_0674cb7190b44bd1823eb8d7ba9c0230

OpenRiak/riak_kv

Measured 15 November 2026, 07:56 UTC, at code version f2bd75c

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

CAI score 53out of 100 Adequate
CriticalWeakAdequateStrongExemplary
Down 4 since the last survey

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: 70,577 lines of product code in 2 projects, tests not counted · Estimated rebuild effort: about 0.5 person-years · Weakest lens: Event-Driven, 48

Findings by how serious they are

19 critical 388 serious 104 minor

17 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
15 November 2026, 07:56 UTC

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

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

38of 38 dimensions measured by tools.
502of 511 findings point to an exact file and line, so you can open each one in the code. The other 9 concern the repository as a whole, such as missing documentation.
38dimensions across 7 lenses, read from 70,577 lines of product code in 2 projects.
Chapters

Executive summary

OpenRiak/riak_kv falls short of our standard for production, held back most by its Event-Driven lens, the way the code's parts exchange events. It scores 53 out of 100 and is rated Adequate, and 17 of its 19 critical findings are security problems.

Event-Driven, at 48, is the weakest lens and counts most in the score. The best first steps are stopping the event handlers from waiting on other services and making event replay repeatable, each worth about 5 points. Raising Event-Driven to 70 would lift the score to about 58.

Sixteen pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with. One password or key is open to anyone who can read the repository. Pinning each tool to an exact version and replacing the exposed password or key would close both risks. Rebuilding state only from the recorded events would take care of the two history replays that read the clock or random values.

The product code is 70,577 lines, about €70,000 to rebuild.

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

How the score is built: what each lens counts for The lenses don't count equally. The weakest lens counts most, the next weakest a little less, and so on, so a weak area pulls the score down instead of being averaged away. In the bar below, each part's width shows how much that lens counts and its colour shows its rating. Improving the widest part moves the score most, and as that lens improves, it counts for less, because another lens becomes the weakest.
Event-Driven 48 · counts for 46%Event Sourcing 49 · counts for 25%Production Readiness 55 · counts for 14%Code Health 69 · counts for 8%Maturity 77 · counts for 4%Architecture 90 · counts for 2%Security and Compliance 95 · counts for 1%

If Event-Driven rose from 48 to 70, the lowest score rated Strong, the score would rise from 53 to about 58.

Code composition: what the lines of code are
Product code 99%Tests 1%
New since the last survey: 100 findings

These 100 critical or serious findings weren't in the previous survey, on 30 October 2026.

  • Code Duplication · Edited copy of a member (73 corresponding lines) src/riak_kv_wm_counter.erl
  • Code Duplication · Edited copy of a member (23 corresponding lines) src/riak_kv_wm_json.erl
  • Code Duplication · Edited copy of a member (23 corresponding lines) src/riak_kv_pb_csbucket.erl
  • Code Duplication · Edited copy of a member (52 corresponding lines) src/riak_kv_pipe_index.erl
  • Code Duplication · Edited copy of a member (22 corresponding lines) src/riak_kv_wm_json.erl
  • Code Duplication · Edited copy of a member (39 corresponding lines) src/riak_kv_delete.erl
  • Code Duplication · Edited copy of a member (25 corresponding lines) src/riak_kv_wm_json.erl
  • Code Duplication · Edited copy of a member (17 corresponding lines) src/riak_kv_wm_json.erl
  • Code Duplication · Edited copies of one member (3 members, 20+ corresponding lines) src/riak_kv_crdt_json.erl
  • Code Duplication · Edited copy of a member (37 corresponding lines) src/riak_kv_multi_backend.erl
  • Code Duplication · Edited copy of a member (16 corresponding lines) src/riak_kv_wm_json.erl
  • Code Duplication · Edited copies of one member (3 members, 32+ corresponding lines) src/riak_kv_bitcask_backend.erl
  • Code Duplication · Edited copies of one member (3 members, 25+ corresponding lines) src/riak_kv_wm_bucket_type.erl
  • Code Duplication · Edited copies of one member (3 members, 22+ corresponding lines) src/riak_kv_tictacaae_cli.erl
  • Code Duplication · Edited copies of one member (3 members, 13+ corresponding lines) src/riak_kv_mrc_sink.erl
  • Code Duplication · Edited copy of a member (16 corresponding lines) src/riak_kv_wm_crdt.erl
  • Code Duplication · Edited copy of a member (10 corresponding lines) src/riak_kv_wm_buckets.erl
  • Code Duplication · Edited copies of one member (3 members, 9+ corresponding lines) src/riak_kv_wm_json.erl
  • Code Duplication · Edited copy of a member (10 corresponding lines) src/riak_kv_wm_crdt.erl
  • Code Duplication · Edited copy of a member (8 corresponding lines) src/riak_kv_w1c_worker.erl
  • Code Duplication · Edited copy of a member (31 corresponding lines) src/riak_kv_multi_backend.erl
  • Code Duplication · Edited copy of a member (17 corresponding lines) src/riak_kv_yessir_backend.erl
  • Code Duplication · Edited copies of one member (4 members, 6+ corresponding lines) src/riak_kv_wm_json.erl
  • Code Duplication · Edited copies of one member (3 members, 19+ corresponding lines) src/riak_kv_wm_object.erl
  • Code Duplication · Edited copy of a member (9 corresponding lines) src/riak_kv_util.erl
  • Code Duplication · Edited copies of one member (4 members, 12+ corresponding lines) src/riak_kv_wm_bucket_type.erl
  • Code Duplication · Edited copy of a member (8 corresponding lines) src/riak_client.erl
  • Code Duplication · Edited copy of a member (22 corresponding lines) src/riak_kv_pipe_index.erl
  • Code Duplication · Edited copy of a member (12 corresponding lines) src/riak_kv_token_manager.erl
  • Code Duplication · Edited copy of a member (13 corresponding lines) src/riak_kv_index_hashtree.erl
  • Code Duplication · Edited copy of a member (8 corresponding lines) src/riak_kv_vnode.erl
  • Code Duplication · Edited copy of a member (19 corresponding lines) src/riak_kv_util.erl
  • Code Duplication · Edited copies of one member (4 members, 11+ corresponding lines) src/riak_client.erl
  • Code Duplication · Edited copy of a member (14 corresponding lines) src/riak_kv_multi_backend.erl
  • Code Duplication · Edited copies of one member (3 members, 25+ corresponding lines) src/riak_kv_wm_aaefold.erl
  • Code Duplication · Edited copy of a member (15 corresponding lines) src/riak_client.erl
  • Code Duplication · Edited copy of a member (20 corresponding lines) src/riak_kv_console.erl
  • Code Duplication · Edited copy of a member (19 corresponding lines) src/riak_kv_wm_buckets.erl
  • Code Duplication · Edited copy of a member (11 corresponding lines) src/riak_kv_console.erl
  • Code Duplication · Edited copy of a member (10 corresponding lines) src/riak_kv_wm_bucket_type.erl
  • Code Duplication · Edited copy of a member (14 corresponding lines) src/riak_kv_leveled_backend.erl
  • Code Duplication · Edited copy of a member (6 corresponding lines) src/riak_kv_wm_json.erl
  • Code Duplication · Edited copy of a member (23 corresponding lines) src/riak_kv_wm_object.erl
  • Code Duplication · Edited copy of a member (8 corresponding lines) eqc/replrtq_eqc.erl
  • Code Duplication · Edited copies of one member (4 members, 7+ corresponding lines) src/riak_kv_wm_json.erl
  • Code Duplication · Edited copy of a member (10 corresponding lines) src/riak_client.erl
  • Code Duplication · Edited copy of a member (12 corresponding lines) src/riak_kv_wm_bucket_type.erl
  • Code Duplication · Edited copy of a member (13 corresponding lines) src/riak_kv_tictacaae_cli.erl
  • Code Duplication · Edited copy of a member (14 corresponding lines) src/riak_kv_vnode.erl
  • Code Duplication · Edited copies of one member (4 members, 16+ corresponding lines) src/riak_kv_wm_aaefold.erl
  • Code Duplication · Edited copy of a member (15 corresponding lines) src/riak_kv_bitcask_backend.erl
  • Code Duplication · Edited copy of a member (8 corresponding lines) src/riak_kv_entropy_info.erl
  • Code Duplication · Edited copy of a member (7 corresponding lines) src/riak_client.erl
  • Code Duplication · Edited copy of a member (11 corresponding lines) src/riak_client.erl
  • Code Duplication · Edited copy of a member (11 corresponding lines) src/riak_kv_index_fsm.erl
  • Code Duplication · Edited copy of a member (10 corresponding lines) src/riak_kv_util.erl
  • Code Duplication · Edited copies of one member (3 members, 11+ corresponding lines) src/riak_kv_wm_aaefold.erl
  • Code Duplication · Edited copy of a member (11 corresponding lines) src/riak_kv_get_fsm.erl
  • Code Duplication · Edited copies of one member (3 members, 4+ corresponding lines) src/riak_kv_wm_json.erl
  • Code Duplication · Edited copy of a member (9 corresponding lines) src/riak_kv_multi_backend.erl
  • Code Duplication · Edited copies of one member (3 members, 4+ corresponding lines) src/riak_client.erl
  • Code Duplication · Edited copies of one member (3 members, 7+ corresponding lines) src/riak_object.erl
  • Code Duplication · Edited copy of a member (7 corresponding lines) src/riak_kv_wm_keylist.erl
  • Code Duplication · Edited copy of a member (7 corresponding lines) eqc/eraser_eqc.erl
  • Code Duplication · Edited copy of a member (6 corresponding lines) src/riak_kv_mapred_json.erl
  • Code Duplication · Edited copy of a member (4 corresponding lines) src/riak_object.erl
  • Code Duplication · Edited copy of a member (10 corresponding lines) src/riak_kv_wm_object.erl
  • Code Duplication · Edited copy of a member (7 corresponding lines) src/riak_kv_index_fsm.erl
  • Code Duplication · Edited copy of a member (8 corresponding lines) src/riak_client.erl
  • Code Duplication · Edited copy of a member (11 corresponding lines) src/riak_kv_index_hashtree.erl
  • Code Duplication · Edited copy of a member (10 corresponding lines) src/riak_kv_bitcask_backend.erl
  • Code Duplication · Edited copies of one member (3 members, 4+ corresponding lines) src/riak_kv_wm_json.erl
  • Code Duplication · Edited copies of one member (5 members, 9+ corresponding lines) src/riak_kv_buckets_fsm_sup.erl
  • Code Duplication · Edited copy of a member (6 corresponding lines) src/riak_kv_crdt.erl
  • Code Duplication · Edited copy of a member (5 corresponding lines) src/riak_kv_stat.erl
  • Code Duplication · Edited copies of one member (3 members, 7+ corresponding lines) eqc/replrtq_eqc.erl
  • Code Duplication · Edited copy of a member (7 corresponding lines) src/riak_kv_multi_backend.erl
  • Code Duplication · Edited copy of a member (7 corresponding lines) src/riak_kv_multi_backend.erl
  • Code Duplication · Edited copy of a member (4 corresponding lines) src/riak_kv_multi_backend.erl
  • Code Duplication · Edited copy of a member (8 corresponding lines) src/riak_kv_token_session.erl
  • Code Duplication · Edited copy of a member (3 corresponding lines) src/riak_kv_ttaaefs_manager.erl
  • Code Duplication · Edited copy of a member (6 corresponding lines) src/riak_kv_util.erl
  • Code Duplication · Edited copies of one member (4 members, 6+ corresponding lines) src/riak_kv_buckets_fsm_sup.erl
  • Code Duplication · Edited copy of a member (4 corresponding lines) src/riak_kv_get_fsm.erl
  • Code Duplication · Edited copy of a member (2 corresponding lines) src/riak_kv_get_fsm.erl
  • Code Duplication · Edited copy of a member (3 corresponding lines) src/riak_kv_multi_backend.erl
  • Code Duplication · Edited copy of a member (2 corresponding lines) eqc/eraser_eqc.erl
  • Code Duplication · Edited copy of a member (4 corresponding lines) src/riak_kv_wm_bucket_type.erl
  • Code Duplication · Edited copy of a member (5 corresponding lines) src/riak_kv_get_core.erl
  • Code Duplication · Edited copy of a member (3 corresponding lines) src/riak_kv_multi_backend.erl
  • Code Duplication · Edited copy of a member (7 corresponding lines) src/riak_kv_wm_crdt.erl
  • Code Duplication · Edited copy of a member (3 corresponding lines) eqc/eraser_eqc.erl
  • Code Duplication · Edited copy of a member (2 corresponding lines) src/riak_kv_get_fsm.erl
  • Code Duplication · Edited copy of a member (5 corresponding lines) src/riak_kv_wm_bucket_type.erl
  • Code Duplication · Edited copy of a member (5 corresponding lines) src/riak_kv_crdt.erl
  • Code Duplication · Duplicated block (19 lines × 2) src/riak_kv_multi_backend.erl
  • Code Duplication · Duplicated block (2–14 lines × 3) src/riak_kv_pb_aaefold.erl
  • Code Duplication · Duplicated block (12 lines × 2) src/riak_kv_multi_backend.erl
  • Code Duplication · Duplicated block (13 lines × 2) src/riak_kv_pb_aaefold.erl
  • Churn × Complexity Hotspots · Hotspot: src/riak_kv_pb_object.erl src/riak_kv_pb_object.erl

We compare every finding with the previous survey's. A finding that has only moved to another line in the same file counts as the same finding, so only new findings appear here. Advisory notes from the AI model are left out, because the model words them afresh in every survey.

Fixed since the last survey: 5 findings

These 5 critical or serious findings were in the previous survey, on 30 October 2026, and are gone from this one.

  • Code Duplication · Duplicated block (19 lines × 2) src/riak_kv_multi_backend.erl
  • Code Duplication · Duplicated block (2–14 lines × 3) src/riak_kv_pb_aaefold.erl
  • Code Duplication · Duplicated block (12 lines × 2) src/riak_kv_pb_aaefold.erl
  • Code Duplication · Duplicated block (12 lines × 2) src/riak_kv_multi_backend.erl
  • Supply-chain Provenance & Signing · Unpinned build actions
Rebuild cost: about €70,000 · Estimate
Cost to rebuild€23,000 to €120,000, for 387 to 1,228 hours of work, about 0.5 person-years for one engineer
Difficulty of the problemStandard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor×0.7 at a score of 53. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
SizeMedium: 70,577 lines of product code
What it is notNot a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.

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

Top priorities

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

1
Remove synchronous peer round-trips (gen_server:call / hand-rolled receive) and blocking sleeps from OTP message handlers — cast a follow-up or resolve state locally, so processes stay temporally decoupled and deadlock-free.
Raises the score by about 5 points · Medium effort · Handler temporal coupling
2
Keep the event-replay reducer pure — move every clock/UUID/random into the event at raise-time and read it back in the fold.
Raises the score by about 5 points · Medium effort · Fold determinism
3
Document RTO/RPO and a tested restore procedure (a backup config alone isn't disaster recovery).
Raises the score by about 1 point · Medium effort · DR & Backup

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 €70,000 to build again, about 0.5 person-years of work. Its weakest lens is Event-Driven, at 48 (Weak). Event-Driven is about whether the parts of the system can rely on the messages they send each other. Because the weakest lens counts most in the score, work on Event-Driven also moves the score most.
Based on: the rebuild estimate · the Event-Driven grade · how much each lens counts
What to do: Start with the Event-Driven actions in Top priorities.
If you do one thing first · First action
Remove synchronous peer round-trips (gen_server:call / hand-rolled receive) and blocking sleeps from OTP message handlers — cast a follow-up or resolve state locally, so processes stay temporally decoupled and deadlock-free. Of all the actions in this report, it raises the score most for the work it takes: about 5 points for medium effort. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort

At a glance — Code Health · 69% · Adequate ·

At a glance — Architecture · 90% · Adequate · gated by D26 ·

At a glance — Maturity · 77% · Strong ·

At a glance — Readiness · 55% · Adequate ·

At a glance — Security · 95% · Checked 4 of 10 ·

At a glance — Event-Driven · 48% · Weak ·

At a glance — Event Sourcing · 49% · Weak ·

Security & Compliance — OWASP Top-10 mapping

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

OWASP categoryFindingsSeverity
A05:2025 — Injection17High / Critical
A07:2025 — Authentication Failures2High / Critical

Roadmap

Top priorities: Remove synchronous peer round-trips (gen_server:call / hand-rolled receive) and blocking sleeps from OTP message handlers — cast a follow-up or resolve state locally, so processes stay temporally decoupled and deadlock-free; Keep the event-replay reducer pure — move every clock/UUID/random into the event at raise-time and read it back in the fold; Document RTO/RPO and a tested restore procedure (a backup config alone isn't disaster recovery).

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

Do thisHelpsEffortDimension
Remove synchronous peer round-trips (gen_server:call / hand-rolled receive) and blocking sleeps from OTP message handlers — cast a follow-up or resolve state locally, so processes stay temporally decoupled and deadlock-free.+5.5 ptsMediumHandler temporal coupling
Keep the event-replay reducer pure — move every clock/UUID/random into the event at raise-time and read it back in the fold.+4.8 ptsMediumFold determinism
Document RTO/RPO and a tested restore procedure (a backup config alone isn't disaster recovery).+1.0 ptsMediumDR & Backup
Swallowed exception (caught, then discarded)+1.0 ptsMediumException handling
Make sure a person approves each release. The release job names an environment, but its approval rules live in the code host's settings, where we can't see them. Check that a reviewer must approve each release, or publish releases as drafts first, so a bad build can be stopped before anyone downloads it.+0.7 ptsMediumDeployment & Rollback
Keep a changelog (e.g. Keep-a-Changelog) recording what shipped in each release.+0.7 ptsMediumRelease Hygiene
Resolve the 79 Orphaned file finding(s) in Knowledge Freshness — start with riak_kv_mrc_pipe.erl, riak_kv_entropy_manager.erl, riak_kv_eleveldb_backend.erl.+0.7 ptsMediumKnowledge Freshness
Bring the 27 bodies over 15 down to 15 or less in Cyclomatic Complexity — start with riak_kv_pb_aaefold.process (cyclomatic 67), riak_kv_pb_object.process (cyclomatic 62), riak_kv_vnode.handle_aaefold (cyclomatic 42).+0.7 ptsHighCyclomatic Complexity

File quality

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

FileScoreBandWorst signal
REDACTED2.7SlopStatic Analysis (SAST): High: REDACTED
REDACTED3.0SlopStatic Analysis (SAST): High: REDACTED
REDACTED3.7SlopStatic Analysis (SAST): High: REDACTED
REDACTED4.6MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.8MixedStatic Analysis (SAST): High: REDACTED
src/riak_kv_pb_object.erl5.7MixedCyclomatic Complexity: riak_kv_pb_object.process (cyclomatic 62)
src/riak_kv_vnode.erl6.0MixedExplicit Debt: TodoComment
src/riak_kv_query_server.erl6.0MixedExplicit Debt: TodoComment
src/riak_kv_mapred_term.erl6.0MixedExplicit Debt: XxxComment
src/riak_kv_mrc_pipe.erl6.0MixedExplicit Debt: TodoComment
src/riak_kv_put_fsm.erl6.0MixedExplicit Debt: TodoComment
src/riak_kv_clusteraae_fsm.erl6.0MixedExplicit Debt: TodoComment
src/riak_kv_wm_utils.erl6.0MixedExplicit Debt: TodoComment
src/riak_kv_ensemble_backend.erl6.0MixedExplicit Debt: TodoComment
src/riak_kv_app.erl6.0MixedExplicit Debt: TodoComment
src/riak_kv_index_hashtree.erl6.0MixedExplicit Debt: TodoComment
src/riak_kv_get_fsm.erl6.0MixedExplicit Debt: TodoComment
src/riak_client.erl6.0MixedExplicit Debt: TodoComment
eqc/ec_eqc.erl6.0MixedExplicit Debt: TodoComment
eqc/backend_eqc.erl6.0MixedExplicit Debt: TodoComment

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

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

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

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

Could not be resolved — 17

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

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

What we checked — 38 dimensions across the health lenses
D1D2D3D4D6D7D12D13D14D15D16D17D20D26D27D28D29D30D34D35D43D44AX10AX3AX4AX9ED1ES1M1M2M3P1P2P3P4P5P6X3

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, 502 of 511 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
  2. Is there a tool behind the number? Every score below names the method that produced it: Roslyn, git or a scanner, not a narrative.
  3. Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.

This report answers yes to all three. That's the bar to hold any assessment to.

Tools & methods

The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.

MethodBacksVersionEvaluator
Roslyn static analysisComplexity, cohesion, coupling, dead code, API surface, layering5.3.0✓ deterministic
Native secret scannerHardcoded secrets / credentials1.0.0✓ deterministic
Canine Code Analyzer duplication detector (in-process)Code duplication1.0.0✓ deterministic
Coverage (coverlet / dotnet-coverage)Line & branch coverage10.0.400✓ deterministic
NuGet / dotnetOutdated, vulnerable & deprecated dependencies10.0.400✓ deterministic
git / LibGit2SharpChurn hotspots, knowledge concentration, history2.43.0 · 0.31.0✓ deterministic
gitleaks · semgrep · trivySecrets in history, SAST, CVEs, IaC & container, PII / GDPR1.86.0 · 0.69.3✓ deterministic

Every finding is locatable in findings.md. Run 01a1de34-c65c-7fa5-b19a-12c74cdc00cf.

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

Run transparency — what happened this run

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

  • D8 Code Coverage — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT MEASURED: test source is present (.erl) but the built-in coverage collector has no runner for this repository's ecosystem — so this suite was never executed by it. Not scored — this is a gap in the analyzer's language coverage, not a defect in the repo.
  • D11 Test Reliability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test source is present (.erl) and this repository declares a rebar3 project (repository root, 74 test files), but it was not re-run: the analyzer environment could not run it. Not scored — this is a gap in the analyzer's language coverage, not a finding about this repository.
  • 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 rebar.config / erlang.mk DEPS (Hex), but the licence verdict published here was taken over its gem dependencies. Nothing was read about its Rebar dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
  • D22 Internal API Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22 identifies the intentionally-exposed surface from `IsPackable` and `.Contracts` project names, MSBuild conventions read off the loaded project set. This target exposed no such projects, so the probe never ran; this says nothing about whether the repository has a public API. This repository commits no C#/VB source at all, so there was never an MSBuild project set to read these conventions off. That is OUR side and it is a COLLECTOR gap, not an environment fault: it declares a published package (src/riak_kv.app.src), but no published-package marker D22 reads admitted any project here, so this ecosystem's public API has no collector, and the remedy is to write one — no change to the scan image can close it.
  • D24 Comment Value — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 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.
  • AX6 Interface segregation — 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 is computed over the public interfaces this run's compilations declare, and none was loaded, so it had nothing 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.
  • 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 and Scala source only, and this repository's Erlang 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 and Scala source only, and this repository's Erlang 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.
  • S1 Web-Security Posture — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These web-security controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks web-security controls.
  • X12 Unreachable branch — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
  • X2 Cancellation propagation — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Go, PHP, Dart, Kotlin, Ruby, Scala, Java, Python and Rust source only, and no C# was loaded, and no named async function in this repository's JavaScript/TypeScript, nor any Go, PHP or Dart function or Kotlin suspend function, makes a request that can be cancelled (fetch, axios, ky, ofetch, got, undici, node:http; net/http, net.Dial; amphp; Dio; Ktor, OkHttp), so there is nothing to judge, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X4 Structured logging — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Python, PHP, Dart, Ruby, Scala and Rust source only, and no C# was loaded, and this repository's JavaScript/TypeScript, Python and PHP make no call through a named logger, 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.
  • X7 Silent fallback defaults — 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. X7 measured the part of this repository it reads (C#, Python, TypeScript/JavaScript, Rust, Go, Java, Kotlin, Scala, PHP, Ruby, Swift and Dart), and its Erlang source is outside the check's reach, so the card covers only part of the product. That is a gap in this analyzer's language reach — not a finding that the unread source is free of silent defaults.

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.
  • 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.
  • D7 Architectural Integrity: Layering is checked against detected/declared rules — an architecture whose boundaries live in convention or in code review, not in a rule a scanner can read, is not enforced 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.
  • 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.
  • D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
  • D27 Navigability: Indirection/navigability is structural — it measures hops to follow a call, not whether that indirection buys real flexibility or just ceremony.
  • D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
  • D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
  • D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
  • D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
  • D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
  • D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
  • D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a Dockerfile (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
  • AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
  • AX9 CQS / query purity: Handlers are found by interface/name convention — a query handler using neither is not seen. Mutation is a resolved write/publish invocation (SaveChanges/repository/bus), so a write hidden behind a hand-rolled wrapper, reflection, or a string-keyed service locator resolves to a non-persistence type and isn't flagged; it detects that a query writes state, not whether the write is a legitimate read-side cache update. Clean means "no resolved write/publish in a query body", not a proof of CQS purity.
  • P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
  • P5 DR & Backup: Backup/restore and disaster-recovery readiness is judged from in-repo evidence — a config that exists is not a tested restore, so the absence of positive evidence is reported as "not evidenced", never scored as present.
  • P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.

Dimensions

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

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

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

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

27 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was riak_kv_pb_aaefold.process at 67. A further 10 method(s) were over the threshold but excluded as flat dispatchers (a long switch/match over independent cases: many branches, almost no nesting), the largest being riak_kv_stat.do_update at 88 — they are counted neither in the figure above nor in this dimension's score. 6 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold functions was excluded, so the exclusion is disclosed nowhere in the file itself: src/riak_kv_stat.erl (riak_kv_stat.do_update at 88), src/riak_kv_wm_json.erl (riak_kv_wm_json.escape at 35), src/riak_kv_mapred_filters.erl (riak_kv_mapred_filters.resolve_name at 25), src/riak_kv_index_hashtree.erl (riak_kv_index_hashtree.handle_call at 18), src/riak_kv_requests.erl (riak_kv_requests.request_type at 18), and 1 more not listed here. They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.

riak_kv_pb_aaefold.process (cyclomatic 67)src/riak_kv_pb_aaefold.erl:74
riak_kv_pb_object.process (cyclomatic 62)src/riak_kv_pb_object.erl:112
riak_kv_vnode.handle_aaefold (cyclomatic 42)src/riak_kv_vnode.erl:2076
riak_kv_query_server.handle_info (cyclomatic 38)src/riak_kv_query_server.erl:236
riak_kv_vnode.handle_info (cyclomatic 36)src/riak_kv_vnode.erl:2891

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

What to do

  1. Bring the 27 bodies over 15 down to 15 or less in Cyclomatic Complexity — start with riak_kv_pb_aaefold.process (cyclomatic 67), riak_kv_pb_object.process (cyclomatic 62), riak_kv_vnode.handle_aaefold (cyclomatic 42). — 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 27 together lifts Cyclomatic Complexity from 6.4 to about 10.0/10, projected with the scoring formula itself and assuming each lands exactly at 15.

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

D2 · Cognitive Complexity6.7 / 10Adequate✓ Tool-verified

What it measures: How hard the code is for a person to follow, beyond raw branching.

Method: Cognitive complexity per method (Sonar-style nesting-penalized score), computed exhaustively over production code, excluding test projects. Deterministic.

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

26 method(s) exceeded the cognitive complexity threshold of 15; the worst was riak_kv_pb_object.process at 54.

riak_kv_pb_object.process (cognitive 54)src/riak_kv_pb_object.erl:112
riak_kv_query_server.handle_info (cognitive 36)src/riak_kv_query_server.erl:236
riak_kv_pb_aaefold.process (cognitive 29)src/riak_kv_pb_aaefold.erl:74
riak_kv_put_fsm.validate (cognitive 29)src/riak_kv_put_fsm.erl:350
riak_kv_eleveldb_backend.fold_keys_fun (cognitive 28)src/riak_kv_eleveldb_backend.erl:745

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

What to do

  1. Bring the 2 bodies over 30 down to 30 or less in Cognitive Complexity — start with riak_kv_pb_object.process (cognitive 54), riak_kv_query_server.handle_info (cognitive 36). — 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 2 together lifts Cognitive Complexity from 6.7 to about 7.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 Classes6.8 / 10Adequate✓ 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 6.8 / 10 · rule-coverage 100% · ceiling Prevented

47 over-large unit(s) detected — types, modules or files that carry too much.

FileTooLong: src/riak_kv_vnode.erl · ×39src/riak_kv_vnode.erl
TooManyFunctions: replrtq_snk_eqc · ×8eqc/replrtq_snk_eqc.erl:13

What to do

  1. Resolve the 39 FileTooLong finding(s) in God Classes — start with riak_kv_vnode.erl, riak_object.erl, riak_kv_ttaaefs_manager.erl. — One of this dimension's main actionable groups (39 warning-level).
  2. Resolve the 8 TooManyFunctions finding(s) in God Classes — start with replrtq_snk_eqc.erl, replrtq_eqc.erl, riak_kv_crdt.erl. — One of this dimension's main actionable groups (8 warning-level).

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

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

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

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

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

105 duplicated block group(s) detected. 6.3 % of the production lines (4,440 of 70,577) are in a reported copy. A further 100 rows report members as variants of one another; the share counts each copied line once, however many rows cite it.

Duplicated block (5 lines × 2) · ×15src/riak_client.erl:1119
Duplicated block (9 lines × 2) · ×11src/riak_kv_multi_backend.erl:450
Duplicated block (8 lines × 2) · ×9src/riak_kv_bitcask_backend.erl:346
Duplicated block (6 lines × 2) · ×9eqc/eraser_eqc.erl:112
Edited copy of a member (10 corresponding lines) · ×7src/riak_kv_wm_buckets.erl:244

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

What to do

  1. Resolve the 15 Duplicated block (5 lines × 2) finding(s) in Code Duplication — start with riak_kv_multi_backend.erl (5), riak_client.erl, riak_kv_ensemble_console.erl. — One of this dimension's main actionable groups (15 warning-level).
  2. Resolve the 11 Duplicated block (9 lines × 2) finding(s) in Code Duplication — start with riak_kv_multi_backend.erl (2), riak_kv_query_server.erl (2), riak_kv_vnode.erl (2). — One of this dimension's main actionable groups (11 warning-level).
  3. Resolve the 9 Duplicated block (8 lines × 2) finding(s) in Code Duplication — start with riak_kv_multi_backend.erl (5), riak_kv_bitcask_backend.erl, riak_kv_query_server.erl. — One of this dimension's main actionable groups (9 warning-level).

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

D6 · Cohesion (LCOM4)10.0 / 10Exemplary✓ 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 10.0 / 10 · rule-coverage 100% · ceiling Verified

0 of 63 classes have LCOM4 above 3.

✓ On the Gold path — maintain.

Detailed fixes: d6_recommendation.md.

D7 · Architectural Integrity6.0 / 10Adequate✓ Tool-verified

What it measures: Whether the code respects its intended layering / architecture rules.

Method: Enforcement rung (Prevented/Verified/Documented) per checkable ADR via Roslyn, plus dependency cycles via the engine shared with D5/AX3. Deterministic, exact.

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

No mechanizable ADR was identified, so enforcement is not measured. Dependency cycles not checked (no project-reference graph; where this repository's language has an import-cycle lens, cycles are reported there).

Detailed fixes: d7_recommendation.md.

D12 · Dependency Hygiene9.9 / 10Exemplary✓ 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 9.9 / 10 · rule-coverage 100% · ceiling Verified

1 outdated direct gem(s), 0 pinning defect(s). 3 declaration(s) graded against rubygems.org, 2 of them against a version resolved in a committed Gemfile.lock. 1 declaration(s) carry a requirement that EXCLUDES the current release; that is a deliberate constraint (a supported-version ceiling or a held-back CI pin) and is counted, not charged. Whether any of these gems is DEPRECATED or YANKED is not graded — rubygems.org publishes no deprecation marker, and a yank removes a version rather than flagging it. Whether any is UNMAINTAINED is not graded either: no registry publishes a maintenance status, and release age does not stand in for one. Whether any is UNUSED is a source question, not a registry one. Known CVEs in this dependency graph are D30's question, read from the manifest there.

Outdated: jekyll-relative-links

✓ On the Gold path — maintain.

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 38 shipped gem(s) use a banned license. Licences were resolved from rubygems.org over the 38 gem(s) a consumer installs — this repository's runtime declarations closed transitively over its committed Gemfile.lock. Development-group and `add_development_dependency` gems are excluded: they are not distributed with this repository. ★ COVERAGE OF THIS VERDICT: it grades this repository's gem dependencies and nothing else. The repository also declares a rebar.config / erlang.mk DEPS (Hex), and the licences of those dependencies were NOT read by this pass — a gap in this engine's coverage, not a statement about them. So this result says the graded closure carries no banned licence; it does NOT say this repository's licensing is clear.

✓ On the Gold path — maintain.

Detailed fixes: d14_recommendation.md.

D15 · Churn × Complexity Hotspots9.1 / 10Stronggated by 1 serious finding✓ Tool-verified

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

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

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

Top hotspots: src/riak_kv_pb_object.erl (2×62=124)

Hotspot: src/riak_kv_pb_object.erlsrc/riak_kv_pb_object.erl:112

What to do

  1. Resolve the 1 Hotspot finding(s) in Churn × Complexity Hotspots — start with riak_kv_pb_object.erl. — One of this dimension's main actionable groups (1 warning-level).

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

D16 · Bus Factor8.5 / 10Strong✓ Tool-verified

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

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

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

14 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is src/riak_object.erl. Counted over 96 of the 163 production source files in this repository: 26 are under the ~2,400-byte size floor this dimension measures over, and the remaining 41 have no attributable history left to measure.

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

What to do

  1. Resolve the 1 Off-boarding risk finding(s) in Bus Factor. — One of this dimension's main actionable groups (1 recommendation-level).
  2. Resolve the 1 Further sole-owners (lower concentration) finding(s) in Bus Factor. — One of this dimension's main actionable groups (1 recommendation-level).

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

D17 · Explicit Debt9.8 / 10Stronggated by 56 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.8 / 10 · rule-coverage 100% · ceiling Prevented

66 deducted task-comment markers across 70577 LoC (0.1/KLoC) → score 9.8. 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 · ×54src/riak_client.erl:69
XxxCommentsrc/riak_kv_mapred_term.erl:162
XxxComment repeated across 11 filessrc/riak_kv_wm_bucket_type.erl:124

What to do

  1. Resolve the 54 TodoComment finding(s) in Explicit Debt — start with ec_eqc.erl (6), riak_client.erl (5), riak_kv_ensemble_backend.erl (4). — One of this dimension's main actionable groups (54 warning-level).
  2. Resolve the 1 XxxComment finding(s) in Explicit Debt — start with riak_kv_mapred_term.erl. — One of this dimension's main actionable groups (1 warning-level).
  3. Resolve the 1 XxxComment repeated across 11 files finding(s) in Explicit Debt — start with riak_kv_wm_bucket_type.erl. — One of this dimension's main actionable groups (1 warning-level).

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

D20 · ADR Quality10.0 / 10Exemplary○ Nothing flagged

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

0 of 1 evaluated ADRs have a defect readable from the log itself (a missing or empty section, no title, a single option, consequences with no cost, no status, a missing enforcement field, a status the log contradicts, a dangling link, an unlinked second decision on one question, a date that is no calendar day). How well each record argues its case is not measured.

✓ On the Gold path — maintain.

Detailed fixes: d20_recommendation.md.

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

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

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

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

1 of 2 build units (Bundler, rebar3) flagged as possibly oversized/incoherent.

Projects may be oversized for their cohesion

What to do

  1. Resolve the 1 Projects may be oversized for their cohesion finding(s) in Project Cohesion. — 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 · Navigability10.0 / 10Exemplary✓ Tool-verified

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d27_recommendation.md.

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

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

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

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

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

REDACTED
REDACTED

What to do

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

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

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

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

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

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

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

17 finding(s): 0 critical, 16 high, 1 medium, 0 low. 16 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.

REDACTED
REDACTED

What to do

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

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

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d30_recommendation.md.

D34 · Knowledge Freshness4.0 / 10Weak✓ Tool-verified

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

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

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

82 of 137 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is src/riak_kv_bucket.erl. Counted over 137 of the 163 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Orphaned file · ×79src/riak_kv_mrc_pipe.erl:1
Most significant orphaned file · ×3src/riak_kv_bucket.erl:1
Concentrated knowledge decay

What to do

  1. Resolve the 79 Orphaned file finding(s) in Knowledge Freshness — start with riak_kv_mrc_pipe.erl, riak_kv_entropy_manager.erl, riak_kv_eleveldb_backend.erl. — One of this dimension's main actionable groups (79 recommendation-level).
  2. Resolve the 3 Most significant orphaned file finding(s) in Knowledge Freshness — start with riak_kv_bucket.erl, riak_kv_wm_aaefold.erl, riak_kv_index_hashtree.erl. — One of this dimension's main actionable groups (3 recommendation-level).
  3. Resolve the 1 Concentrated knowledge decay finding(s) in Knowledge Freshness. — One of this dimension's main actionable groups (1 recommendation-level).

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

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

Strongest change-coupling: riak_kv_pb_counter.erl↔riak_kv_wm_counter.erl 70%; riak_kv_pb_object.erl↔riak_kv_wm_queue.erl 50%

Change coupling: riak_kv_pb_counter.erl ↔ riak_kv_wm_counter.erl · ×2src/riak_kv_pb_counter.erl:1

What to do

  1. Resolve the 2 Change coupling finding(s) in Change Coupling — start with riak_kv_pb_counter.erl, riak_kv_pb_object.erl. — One of this dimension's main actionable groups (2 warning-level).

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

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d43_recommendation.md.

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d44_recommendation.md.

Frontend & cross-cutting dimensions

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

AX10 · Code composition10.0 / 10Exemplary✓ Tool-verified

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

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

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

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

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

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

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

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

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

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

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

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

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

ED1 · Handler temporal coupling4.8 / 10Weak✓ Tool-verified

Other · Event-Driven — Whether event handlers stay asynchronous (no blocking remote HTTP/gRPC calls awaited inside a handler).

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

  • `riak_kv_2i_aae` clause `wait_for_index_scan/4#425` blocks the process on a synchronous `timer:sleep` while handling a message — the process is blocked (holding its mailbox) until a peer replies or the sleep elapses. That couples this handler in real time to another process being up and fast, and a mutual call can DEADLOCK. To decouple, move the delay off the hot path (a `state_timeout`/`send_after` self-message, or do the settle in a spawned worker). — src/riak_kv_2i_aae.erl:414

What to do

  • Remove synchronous peer round-trips (gen_server:call / hand-rolled receive) and blocking sleeps from OTP message handlers — cast a follow-up or resolve state locally, so processes stay temporally decoupled and deadlock-free.
ES1 · Fold determinism4.9 / 10Weak✓ Tool-verified

Other · Event Sourcing — Whether the event-sourcing replay fold reconstructs state purely from the event (no wall clock, UUID or randomness) so replay is reproducible.

Method: Roslyn syntax scan (event-sourcing gated): Apply/When folds checked for forbidden tokens (DateTime.Now, Guid.NewGuid, Random, IO), stripped of comments/strings. Deterministic, hard fact per fold.

  • `riak_kv_tictacaae_cli`'s event-replay reducer reads a wall clock / randomness / a peer process / persistence while reconstructing aggregate state — replaying the same events would rebuild DIFFERENT state each run. A fold must be a pure function of (state, event); stamp the timestamp/id into the event at raise-time and read it back in the fold. — src/riak_kv_tictacaae_cli.erl:865
  • `riak_kv_vnode_status_cli`'s event-replay reducer reads a wall clock / randomness / a peer process / persistence while reconstructing aggregate state — replaying the same events would rebuild DIFFERENT state each run. A fold must be a pure function of (state, event); stamp the timestamp/id into the event at raise-time and read it back in the fold. — src/riak_kv_vnode_status_cli.erl:113

What to do

  • Keep the event-replay reducer pure — move every clock/UUID/random into the event at raise-time and read it back in the fold.
M1 · Documentation (README)8.0 / 10Strong✓ Tool-verified

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

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

M2 · Architecture documentation7.0 / 10Strong✓ 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.

  • 1 ADR-shaped document(s) detected by content — `docs/InitialDesignDecisions.md`. They are not under a conventional ADR folder (docs/adr/) and are not named NNNN-title.md, and this check found them by their decision signature rather than by where they live — so a reader who does not already know these paths has no route to them. Detected by content signature only: records kept outside the repository, or written without a Status/Decision/Consequences shape, are not visible to this check and are not counted here.

What to do

  • Move ADRs under docs/adr/ (or docs/adrs/) and name them NNNN-title.md so they're easy to find.
M3 · Folder & project structure10.0 / 10Exemplary✓ Tool-verified

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

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

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

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

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

P2 · Observability8.0 / 10Strong✓ Tool-verified

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

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

P3 · Security & performance tooling4.0 / 10Weak✓ Tool-verified

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

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

What to do

  • Enable Dependabot/Renovate or a dependency-review gate.
  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P4 · Deployment & Rollback5.0 / 10Adequate✓ Tool-verified

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

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

What to do

  • Make sure a person approves each release. The release job names an environment, but its approval rules live in the code host's settings, where we can't see them. Check that a reviewer must approve each release, or publish releases as drafts first, so a bad build can be stopped before anyone downloads it.
P5 · DR & Backup4.0 / 10Weak✓ Tool-verified

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

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

What to do

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

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

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

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

What to do

  • Keep a changelog (e.g. Keep-a-Changelog) recording what shipped in each release.
X3 · Exception handling5.3 / 10Adequate✓ Tool-verified

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

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

  • `catch _:_` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×17) — src/riak_kv_2i_aae.erl:697, src/riak_kv_bitcask_backend.erl:694, src/riak_kv_ensemble_console.erl:323, …
  • `catch error:_` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×2) — src/riak_kv_eleveldb_backend.erl:625, src/riak_kv_exometer_sidejob.erl:82

What to do

  • Swallowed exception (caught, then discarded)

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 Health69%AdequateAcceptable, with room to improve.
Architecture90%Adequate — gated by D26Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Maturity77%StrongSolid.
Readiness55%AdequateAcceptable, with room to improve.
Security95%Checked 4 of 10Strongest area.
Event-Driven48%WeakLargest drag on the score — prioritise here.
Event Sourcing49%WeakBelow par — needs attention.
Unscored — 3 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.

  • D36 Supply-chain Provenance & Signing — 3 observation(s) recorded · The CI pipeline publishes no artifact — no package publish, container push or release with files to download. Supply-chain provenance, signing and an SBOM describe a PUBLISHED artifact for the people who obtain it, so there is nothing to attest here; a deployment of the service itself publishes nothing for anyone else to verify. Add them to the release pipeline when this repo starts publishing artifacts (a package, a container image, or a release with downloadable files). Build integrity and workflow-token hygiene are reported below: they describe what the CI runs and the token it runs with, neither of which is affected by whether the pipeline ships an artifact.
  • X10 Duplicated predicate — 4 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X31 Test-only surface in a production module — 9 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 3 control(s) we could not find positive evidence for

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

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

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

  • AC1 Text alternatives — No web markup found — accessibility is not applicable to this repository.
  • AC2 Forms & labels — No web markup found — accessibility is not applicable to this repository.
  • AC3 Page structure — No web markup found — accessibility is not applicable to this repository.
  • AC4 Keyboard semantics — No web markup found — accessibility is not applicable to this repository.
  • AC5 ARIA correctness — No web markup found — accessibility is not applicable to this repository.
  • AC6 Visual & motion safety — No web markup found — accessibility is not applicable to this repository.
  • AX1 Captive dependencies — Not applicable: the BEAM has no dependency-injection container — state lives in processes, and no process is handed an instance whose lifetime another one scopes; this repository's JavaScript imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's.
  • AX2 Stateful singletons — Not applicable: Erlang processes share no mutable memory — state lives in a process's own mailbox — so there is no shared object to race on. TypeScript/JavaScript runs each process's requests on one event loop, so no two requests write a shared object at the same instant (interleaving across an await is a different defect).
  • 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
  • AX6 Interface segregation — not assessed — interface segregation is computed over a type surface that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX7 Slice cohesion — not applicable — not a vertical-slice architecture
  • AX8 Test isolation — no test/production split to check
  • AXB1 Runtime evidence locked — no reproducible boot — This repository has nothing the runtime tiers could boot or serve — no markup, no UI framework or web-server dependency, no UI component source, no native UI project and no API definition — nothing here is a surface to boot — so runtime a11y/egress/header evidence has no subject here. Not applicable: this is neither a gap in the scan nor a finding about your code.
  • 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 — ~1030 lines of test source are present (.erl) but no test cases reached the test census for this repository — no test root we could resolve declared them, or the files we read declare no cases in a test framework we recognise — so skipped/assertion-free tests couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
  • D11 Test Reliability — Test reliability not included — the .erl suite was found but not re-run
  • 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.
  • D19 Documentation Quality — No runnable or published unit to look for an example in, and no multi-project root README to look for a map in; the other documentation kinds are withheld (see the gaps), so documentation quality is not applicable here.
  • D21 Naming Consistency — N/A — too few peers to establish a naming convention (10384 declarations, no unit with a dominant convention).
  • D22 Internal API Consistency — The exposed public-API surface could not be collected — no C#/VB projects loaded.
  • D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
  • D24 Comment Value — D24 reads C#, Visual Basic, TypeScript and JavaScript comments only; comments in this repository's .erl source were not judged.
  • D25 ADR Conformance — None of 0 binding record(s) states a rule in checkable form (a backticked element with a prohibition, or an `adr-rules` block), so conformance cannot be read from the code. Write the rule as an `adr-rules` block (`forbid:` a symbol, a package or a dependency) to make it checkable.
  • D31 IaC & Container Security — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
  • D32 Data Compliance (PII/GDPR) — 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.
  • D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
  • D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
  • D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
  • D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
  • D5 Coupling — Not applicable — this OTP build ships 1 production module(s), so there is no coupling BETWEEN modules to measure. (Its test and non-production modules are not part of the shipped graph.)
  • D8 Code Coverage — Coverage not included — suite not readable by the collector
  • DM1 Domain Modelling — not scored — this repository shows only 1 of the 3 signals this lens looks for (125 value object(s))
  • ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
  • ES2 Immutable events — not applicable — the code was read and holds no persisted event, so there is nothing for this check to judge
  • GD1 Unfinished & placeholder code — no source files were read — this check reads C#, F#, JavaScript/TypeScript, Dart, Ruby and Scala, and none was read for this repository's product. That is a limit of the analyzer, not a finding about your code.
  • IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • M4 Documentation accuracy — Not applicable: the 20 current-state document(s) make no claim of a kind M4 checks. 6 claim(s) of kinds M4 does not check were not checked (environment variable 6); M4 checks only links and versions and artefact counts.
  • P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
  • P7 Outbound HTTP resilience — not applicable — no HTTP server, API framework or worker entry point was found in the Erlang, JavaScript/TypeScript source, so there is no service whose uptime a failing dependency could take down
  • P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
  • P9 Domain vs controller coverage — coverage not measured: this check compares the coverage of the analyzer's own test run across the domain and web layers, and that run measured none here — Test coverage (D8) says why
  • PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for `erlperf:run`/`compare`/`benchmark`/`time` calls, a common_test `benchmark_data` event, `bench_*` functions in a `bench_*.erl` module where rebar.config installs rebar3_bench, or erlperf or rebar3_bench in a rebar.config, and for a `*benchmark*` script that this repository's CI runs. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted.
  • PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
  • PF3 Async & latency hygiene — Not applicable: Erlang has no async/await function colour, so there is no asynchronous code for a blocking call to stall.
  • S1 Web-Security Posture — Not assessed: these web-security controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks web-security controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • X1 Async correctness — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X12 Unreachable branch — X12 reached only 0% of this repository's production lines — erlang (70,577 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • X13 Undrained process stream — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X14 Bypassable address classification — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X15 Unvalidated length from an untrusted reader — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X16 Unfloored truncation loop — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X17 Uncapped recursion over a caller-supplied document — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X18 Disposal-pattern correctness — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X19 Unrestored process-global state — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X2 Cancellation propagation — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X20 Mistyped argument guard — This check asks whether an argument guard reports an EMPTY value as a NULL one, which needs a language that throws a null-specific argument exception — .NET's ArgumentNullException, the JVM's NullPointerException, Dart's ArgumentError.notNull. This repository contains none of those languages: the ones it is written in have a single exception for a bad argument, so there is no pair of exceptions to confuse and nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X21 Side-effecting pattern guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X22 Contradicted release guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X23 Unguarded diagnostic materialisation — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X24 Document value interpolated into markup unescaped — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X25 Inert configuration knob — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X26 Unsynchronised callback handoff — Not applicable: this check looks for a collection written by a callback on one thread while the body waiting on it touches it on another, and in this repository's languages no collection is reachable from two threads at once. Erlang processes share no heap: a value sent to another process arrives as a copy, so no collection is reachable from two processes at once. TypeScript/JavaScript runs every callback on the one thread that owns its objects: a callback runs only when the body waiting on it has yielded, never alongside it, and a worker thread receives a COPY of what it is sent. A SharedArrayBuffer carries raw bytes, never an Array, Map or Set, so no collection is reachable from two threads at once. Not a gap in the analyzer and not a finding about your code.
  • X27 Collection changed while being enumerated — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X28 Index access outside its own emptiness guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X29 Per-element action decided by a fixed element — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X30 Support guard that admits what it rejects — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X4 Structured logging — 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
  • X5 Nullable reference types — Not applicable: this check asks whether the null-typed discipline a language offers is switched on, and how much of that the assertion operator takes back, and in this repository's languages there is no such switch and no such operator. Erlang has no null: every variable is bound, absence is a value you pattern-match (`undefined`, `nil`, the error tuples), and there is no static type checker whose null warning could be turned on or off. Plain JavaScript carries no type annotations and commits no tsconfig, so it states no null-typed discipline for this check to grade: there is nothing here that switches null checking on or off, and TypeScript (or `// @ts-check`) is how a repository acquires one — advice, not a defect this card measures. 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 — 19 finding(s)
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
ES1 · Fold determinism · Nondeterministic fold · ×2
  • Nondeterministic fold: riak_kv_tictacaae_cli src/riak_kv_tictacaae_cli.erl:865 — `riak_kv_tictacaae_cli`'s event-replay reducer reads a wall clock / randomness / a peer process / persistence while reconstructing aggregate state — replaying the same events would rebuild DIFFERENT state each run. A fold must be a pure function of (state, event); stamp the timestamp/id into the event at raise-time and read it back in the fold.
  • Nondeterministic fold: riak_kv_vnode_status_cli src/riak_kv_vnode_status_cli.erl:113 — `riak_kv_vnode_status_cli`'s event-replay reducer reads a wall clock / randomness / a peer process / persistence while reconstructing aggregate state — replaying the same events would rebuild DIFFERENT state each run. A fold must be a pure function of (state, event); stamp the timestamp/id into the event at raise-time and read it back in the fold.
D28 · Secrets (history) · REDACTED · ×1
  • REDACTED
Serious — 388 finding(s)
D17 · Explicit Debt · TodoComment · ×54
  • TodoComment src/riak_client.erl:69 — %% TODO: This type needs to be better specified and validated against — 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 src/riak_client.erl:110 — %% TODO: Investigate adding a monitor here and eliminating the timeout. — 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 src/riak_client.erl:412 — %% TODO: Investigate adding a monitor here and eliminating the timeout. — 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 src/riak_client.erl:428 — %% TODO: Expose client option to explicitly request overwrite — 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 src/riak_client.erl:455 — %% TODO: Expose client option to explicitly request overwrite — 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 src/riak_kv_app.erl:107 — %% TODO: Need to revisit this. Buckets are typically created — 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 src/riak_kv_app.erl:393 — %% TODO: clearly, this isn't ideal if we have more versions — 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 src/riak_kv_backend.erl:62 — %% TODO maybe more specific? [{atom(), term()}]? — 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 src/riak_kv_clusteraae_fsm.erl:195 — % TODO - loose_limit() — 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 src/riak_kv_clusteraae_fsm.erl:633 — %% 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 src/riak_kv_query_server.erl:35 — %% 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 eqc/ec_eqc.erl:33 — %% 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 eqc/get_fsm_eqc.erl:33 — %% 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 src/riak_kv_delete.erl:125 — %% TODO: No sanity check of this value vs. "real" n_val. — 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 src/riak_kv_ensemble_backend.erl:117 — %% TODO: Move to riak_ensemble_backend or something — 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 src/riak_kv_ensemble_backend.erl:183 — %% TODO: Add a timer:sleep()? Something else? — 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 src/riak_kv_ensemble_backend.erl:201 — %% TODO: Should this entire function be async? — 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 src/riak_kv_ensemble_backend.erl:225 — %% TODO: Make ensembles/peers use ensemble/peer as actual peer — 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 src/riak_kv_ensembles.erl:153 — %% TODO: We have no notion of deleting ensembles. Nor do we check if — 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 src/riak_kv_ensembles.erl:179 — %% TODO: Make ensembles/peers use ensemble/peer as actual peer name so this is unneeded — 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 src/riak_kv_entropy_info.erl:160 — %% TODO: Should this really be empty list? — 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 src/riak_kv_env.erl:169 — %% TODO: Figure out recommended fullsweep range — 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 src/riak_kv_exchange_fsm.erl:239 — %% TODO: Add stats for AAE — 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 src/riak_kv_exchange_fsm.erl:295 — %% TODO: Even though this is at debug level, it's still extremely — 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 src/riak_kv_get_fsm.erl:584 — %% TODO: We can see entire preflist (more than 4 nodes) if we concatenate — 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.
  • + 29 more in this group — see findings.md.
D3 · God Classes · FileTooLong · ×39
  • FileTooLong: src/riak_kv_vnode.erl src/riak_kv_vnode.erl — FileTooLong — 4042 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 216 functions. The bar is 500 significant lines; this is 3542 over it, 8.08× the bar. In this language a module is exactly one source file, so its length cannot be moved into sibling files of the same module. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no one module has to be read whole to change one of them.
  • FileTooLong: src/riak_object.erl src/riak_object.erl — FileTooLong — 1917 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 140 functions. The bar is 500 significant lines; this is 1417 over it, 3.83× the bar. In this language a module is exactly one source file, so its length cannot be moved into sibling files of the same module. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no one module has to be read whole to change one of them.
  • FileTooLong: src/riak_kv_ttaaefs_manager.erl src/riak_kv_ttaaefs_manager.erl — FileTooLong — 1729 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 63 functions. The bar is 500 significant lines; this is 1229 over it, 3.46× the bar. In this language a module is exactly one source file, so its length cannot be moved into sibling files of the same module. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no one module has to be read whole to change one of them.
  • FileTooLong: src/riak_kv_wm_object.erl src/riak_kv_wm_object.erl — FileTooLong — 1304 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 63 functions. The bar is 500 significant lines; this is 804 over it, 2.61× the bar. In this language a module is exactly one source file, so its length cannot be moved into sibling files of the same module. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no one module has to be read whole to change one of them.
  • FileTooLong: src/riak_kv_put_fsm.erl src/riak_kv_put_fsm.erl — FileTooLong — 1160 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 68 functions. The bar is 500 significant lines; this is 660 over it, 2.32× the bar. In this language a module is exactly one source file, so its length cannot be moved into sibling files of the same module. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no one module has to be read whole to change one of them.
  • FileTooLong: src/riak_kv_bucket.erl src/riak_kv_bucket.erl — FileTooLong — 1085 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 37 functions. The bar is 500 significant lines; this is 585 over it, 2.17× the bar. In this language a module is exactly one source file, so its length cannot be moved into sibling files of the same module. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no one module has to be read whole to change one of them.
  • FileTooLong: src/riak_kv_stat.erl src/riak_kv_stat.erl — FileTooLong — 1083 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 43 functions. The bar is 500 significant lines; this is 583 over it, 2.17× the bar. In this language a module is exactly one source file, so its length cannot be moved into sibling files of the same module. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no one module has to be read whole to change one of them.
  • FileTooLong: src/riak_kv_wm_aaefold.erl src/riak_kv_wm_aaefold.erl — FileTooLong — 942 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 38 functions. The bar is 500 significant lines; this is 442 over it, 1.88× the bar. In this language a module is exactly one source file, so its length cannot be moved into sibling files of the same module. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no one module has to be read whole to change one of them.
  • FileTooLong: src/riak_kv_index_hashtree.erl src/riak_kv_index_hashtree.erl — FileTooLong — 931 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 94 functions. The bar is 500 significant lines; this is 431 over it, 1.86× the bar. In this language a module is exactly one source file, so its length cannot be moved into sibling files of the same module. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no one module has to be read whole to change one of them.
  • FileTooLong: src/riak_kv_wm_query.erl src/riak_kv_wm_query.erl — FileTooLong — 914 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 414 over it, 1.83× the bar. In this language a module is exactly one source file, so its length cannot be moved into sibling files of the same module. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no one module has to be read whole to change one of them.
  • FileTooLong: src/riak_kv_entropy_manager.erl src/riak_kv_entropy_manager.erl — FileTooLong — 910 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 89 functions. The bar is 500 significant lines; this is 410 over it, 1.82× the bar. In this language a module is exactly one source file, so its length cannot be moved into sibling files of the same module. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no one module has to be read whole to change one of them.
  • FileTooLong: src/riak_kv_replrtq_src.erl src/riak_kv_replrtq_src.erl — FileTooLong — 898 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 31 functions. The bar is 500 significant lines; this is 398 over it, 1.80× the bar. In this language a module is exactly one source file, so its length cannot be moved into sibling files of the same module. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no one module has to be read whole to change one of them.
  • FileTooLong: src/riak_kv_eleveldb_backend.erl src/riak_kv_eleveldb_backend.erl — FileTooLong — 885 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 47 functions. The bar is 500 significant lines; this is 385 over it, 1.77× the bar. In this language a module is exactly one source file, so its length cannot be moved into sibling files of the same module. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no one module has to be read whole to change one of them.
  • FileTooLong: src/riak_kv_tictacaae_cli.erl src/riak_kv_tictacaae_cli.erl — FileTooLong — 854 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 72 functions. The bar is 500 significant lines; this is 354 over it, 1.71× the bar. In this language a module is exactly one source file, so its length cannot be moved into sibling files of the same module. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no one module has to be read whole to change one of them.
  • FileTooLong: src/riak_kv_replrtq_snk.erl src/riak_kv_replrtq_snk.erl — FileTooLong — 843 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 46 functions. The bar is 500 significant lines; this is 343 over it, 1.69× the bar. In this language a module is exactly one source file, so its length cannot be moved into sibling files of the same module. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no one module has to be read whole to change one of them.
  • FileTooLong: src/riak_kv_query.erl src/riak_kv_query.erl — FileTooLong — 821 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 321 over it, 1.64× the bar. In this language a module is exactly one source file, so its length cannot be moved into sibling files of the same module. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no one module has to be read whole to change one of them.
  • FileTooLong: src/riak_kv_bitcask_backend.erl src/riak_kv_bitcask_backend.erl — FileTooLong — 803 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 50 functions. The bar is 500 significant lines; this is 303 over it, 1.61× the bar. In this language a module is exactly one source file, so its length cannot be moved into sibling files of the same module. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no one module has to be read whole to change one of them.
  • FileTooLong: src/riak_kv_get_fsm.erl src/riak_kv_get_fsm.erl — FileTooLong — 802 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 41 functions. The bar is 500 significant lines; this is 302 over it, 1.60× the bar. In this language a module is exactly one source file, so its length cannot be moved into sibling files of the same module. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no one module has to be read whole to change one of them.
  • FileTooLong: src/riak_client.erl src/riak_client.erl — FileTooLong — 796 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 95 functions. The bar is 500 significant lines; this is 296 over it, 1.59× the bar. In this language a module is exactly one source file, so its length cannot be moved into sibling files of the same module. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no one module has to be read whole to change one of them.
  • FileTooLong: src/riak_kv_wm_json.erl src/riak_kv_wm_json.erl — FileTooLong — 769 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 77 functions. The bar is 500 significant lines; this is 269 over it, 1.54× the bar. In this language a module is exactly one source file, so its length cannot be moved into sibling files of the same module. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no one module has to be read whole to change one of them.
  • FileTooLong: eqc/ec_eqc.erl eqc/ec_eqc.erl — FileTooLong — 749 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 249 over it, 1.50× the bar. In this language a module is exactly one source file, so its length cannot be moved into sibling files of the same module. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no one module has to be read whole to change one of them.
  • FileTooLong: src/riak_kv_leveled_backend.erl src/riak_kv_leveled_backend.erl — FileTooLong — 747 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 33 functions. The bar is 500 significant lines; this is 247 over it, 1.49× the bar. In this language a module is exactly one source file, so its length cannot be moved into sibling files of the same module. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no one module has to be read whole to change one of them.
  • FileTooLong: src/riak_kv_console.erl src/riak_kv_console.erl — FileTooLong — 746 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 53 functions. The bar is 500 significant lines; this is 246 over it, 1.49× the bar. In this language a module is exactly one source file, so its length cannot be moved into sibling files of the same module. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no one module has to be read whole to change one of them.
  • FileTooLong: src/riak_kv_clusteraae_fsm.erl src/riak_kv_clusteraae_fsm.erl — FileTooLong — 735 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 235 over it, 1.47× the bar. In this language a module is exactly one source file, so its length cannot be moved into sibling files of the same module. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no one module has to be read whole to change one of them.
  • FileTooLong: src/riak_kv_token_manager.erl src/riak_kv_token_manager.erl — FileTooLong — 701 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 201 over it, 1.40× the bar. In this language a module is exactly one source file, so its length cannot be moved into sibling files of the same module. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no one module has to be read whole to change one of them.
  • + 14 more in this group — see findings.md.
X3 · Exception handling · Swallowed exception (caught, then discarded) · ×19
  • Swallowed exception (caught, then discarded) src/riak_kv_2i_aae.erl:697 — `catch _:_` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) src/riak_kv_bitcask_backend.erl:694 — `catch _:_` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) src/riak_kv_eleveldb_backend.erl:625 — `catch error:_` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) src/riak_kv_ensemble_console.erl:323 — `catch _:_` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) src/riak_kv_exometer_sidejob.erl:82 — `catch error:_` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) src/riak_kv_tictacaae_cli.erl:449 — `catch _:_` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) src/riak_kv_tictacaae_cli.erl:660 — `catch _:_` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) src/riak_kv_vnode_status_cli.erl:205 — `catch _:_` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) src/riak_kv_wm_aaefold.erl:716 — `catch _:_` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) src/riak_kv_wm_aaefold.erl:732 — `catch _:_` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) src/riak_kv_wm_aaefold.erl:748 — `catch _:_` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) src/riak_kv_wm_aaefold.erl:759 — `catch _:_` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) src/riak_kv_wm_aaefold.erl:880 — `catch _:_` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) src/riak_kv_wm_index.erl:325 — `catch _:_` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) src/riak_kv_wm_index.erl:338 — `catch _:_` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) src/riak_kv_wm_queue.erl:324 — `catch _:_` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) src/riak_kv_wm_queue.erl:333 — `catch _:_` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) eqc/kv_crdt_eqc.erl:227 — `catch _:_` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) eqc/kv_crdt_eqc.erl:232 — `catch _:_` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
D4 · Code Duplication · Duplicated block (5 lines × 2) · ×15
  • Duplicated block (5 lines × 2) src/riak_client.erl:1119 — src/riak_client.erl:1119-1123 | src/riak_client.erl:1139-1143 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) src/riak_kv_ensemble_console.erl:472 — src/riak_kv_ensemble_console.erl:472-476 | src/riak_kv_ensemble_console.erl:500-504 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/riak_kv_ensemble_console.erl:472` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) src/riak_kv_get_fsm.erl:856 — src/riak_kv_get_fsm.erl:856-860 | src/riak_kv_put_fsm.erl:995-1000 — 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 `src/riak_kv_get_fsm.erl:856` it does not close everything it opens, so those exact lines 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) src/riak_kv_stat.erl:488 — src/riak_kv_stat.erl:488-492 | src/riak_kv_stat.erl:504-508 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) src/riak_kv_wm_json.erl:880 — src/riak_kv_wm_json.erl:880-884 | src/riak_kv_wm_json.erl:923-927 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) src/riak_kv_multi_backend.erl:368 — src/riak_kv_multi_backend.erl:368-372 | src/riak_kv_multi_prefix_backend.erl:398-402 — before extracting anything, compare `src/riak_kv_multi_backend.erl` and `src/riak_kv_multi_prefix_backend.erl` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 283 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 `src/riak_kv_multi_backend.erl:368` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) src/riak_kv_multi_backend.erl:394 — src/riak_kv_multi_backend.erl:394-398 | src/riak_kv_multi_prefix_backend.erl:424-428 — before extracting anything, compare `src/riak_kv_multi_backend.erl` and `src/riak_kv_multi_prefix_backend.erl` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 283 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 `src/riak_kv_multi_backend.erl:394` it does not close everything it opens, so those exact lines 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) src/riak_kv_multi_backend.erl:405 — src/riak_kv_multi_backend.erl:405-409 | src/riak_kv_multi_prefix_backend.erl:435-439 — before extracting anything, compare `src/riak_kv_multi_backend.erl` and `src/riak_kv_multi_prefix_backend.erl` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 283 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 2) src/riak_kv_multi_backend.erl:426 — src/riak_kv_multi_backend.erl:426-430 | src/riak_kv_multi_prefix_backend.erl:456-460 — before extracting anything, compare `src/riak_kv_multi_backend.erl` and `src/riak_kv_multi_prefix_backend.erl` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 283 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 2) src/riak_kv_multi_backend.erl:476 — src/riak_kv_multi_backend.erl:476-480 | src/riak_kv_multi_prefix_backend.erl:506-510 — before extracting anything, compare `src/riak_kv_multi_backend.erl` and `src/riak_kv_multi_prefix_backend.erl` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 283 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 2) src/riak_kv_wm_aaefold.erl:160 — src/riak_kv_wm_aaefold.erl:160-164 | src/riak_kv_wm_query.erl:192-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 `src/riak_kv_wm_query.erl:192` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) src/riak_kv_wm_buckets.erl:78 — src/riak_kv_wm_buckets.erl:78-84 | src/riak_kv_wm_object.erl:334-338 — before extracting anything, compare `src/riak_kv_wm_buckets.erl` and `src/riak_kv_wm_object.erl` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 42 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 2) src/riak_kv_wm_counter.erl:276 — src/riak_kv_wm_counter.erl:276-280 | src/riak_kv_wm_crdt.erl:436-440 — before extracting anything, compare `src/riak_kv_wm_counter.erl` and `src/riak_kv_wm_crdt.erl` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 31 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 2) src/riak_kv_pb_csbucket.erl:104 — src/riak_kv_pb_csbucket.erl:104-108 | src/riak_kv_pb_index.erl:222-226 — 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 `src/riak_kv_pb_csbucket.erl:104` it does not close everything it opens, so those exact lines 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) src/riak_kv_pb_object.erl:579 — src/riak_kv_pb_object.erl:579-583 | src/riak_kv_wm_queue.erl:406-410 — 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 (9 lines × 2) · ×11
  • Duplicated block (9 lines × 2) src/riak_kv_multi_backend.erl:450 — src/riak_kv_multi_backend.erl:450-458 | src/riak_kv_multi_prefix_backend.erl:480-488 — before extracting anything, compare `src/riak_kv_multi_backend.erl` and `src/riak_kv_multi_prefix_backend.erl` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 283 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 2) src/riak_kv_pb_aaefold.erl:143 — src/riak_kv_pb_aaefold.erl:143-151 | src/riak_kv_pb_aaefold.erl:223-231 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/riak_kv_pb_aaefold.erl:143` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) src/riak_kv_query_server.erl:332 — src/riak_kv_query_server.erl:332-340 | src/riak_kv_query_server.erl:393-401 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/riak_kv_query_server.erl: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.
  • Duplicated block (9 lines × 2) src/riak_kv_query_server.erl:425 — src/riak_kv_query_server.erl:425-433 | src/riak_kv_query_server.erl:441-449 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/riak_kv_query_server.erl:425` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) src/riak_kv_tictacaae_cli.erl:757 — src/riak_kv_tictacaae_cli.erl:757-765 | src/riak_kv_tictacaae_cli.erl:798-806 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/riak_kv_tictacaae_cli.erl:757` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) src/riak_kv_vnode.erl:2912 — src/riak_kv_vnode.erl:2912-2920 | src/riak_kv_vnode.erl:2961-2969 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) src/riak_kv_vnode.erl:2931 — src/riak_kv_vnode.erl:2931-2939 | src/riak_kv_vnode.erl:2949-2957 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) src/riak_kv_wm_buckets.erl:129 — src/riak_kv_wm_buckets.erl:129-137 | src/riak_kv_wm_index.erl:145-153 — before extracting anything, compare `src/riak_kv_wm_buckets.erl` and `src/riak_kv_wm_index.erl` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 43 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 `src/riak_kv_wm_index.erl:145` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) src/riak_kv_multi_backend.erl:512 — src/riak_kv_multi_backend.erl:512-520 | src/riak_kv_multi_prefix_backend.erl:544-552 — before extracting anything, compare `src/riak_kv_multi_backend.erl` and `src/riak_kv_multi_prefix_backend.erl` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 283 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 `src/riak_kv_multi_backend.erl:512` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) src/riak_kv_wm_object.erl:1634 — src/riak_kv_wm_object.erl:1634-1642 | src/riak_kv_wm_utils.erl:217-225 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (9 lines × 2) eqc/eraser_eqc.erl:100 — eqc/eraser_eqc.erl:100-108 | eqc/reaper_eqc.erl:91-99 — 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 (8 lines × 2) · ×9
  • Duplicated block (8 lines × 2) src/riak_kv_bitcask_backend.erl:346 — src/riak_kv_bitcask_backend.erl:346-353 | src/riak_kv_bitcask_backend.erl:388-395 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/riak_kv_bitcask_backend.erl:346` 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) src/riak_kv_multi_backend.erl:231 — src/riak_kv_multi_backend.erl:231-238 | src/riak_kv_multi_prefix_backend.erl:268-275 — before extracting anything, compare `src/riak_kv_multi_backend.erl` and `src/riak_kv_multi_prefix_backend.erl` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 283 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 2) src/riak_kv_multi_backend.erl:247 — src/riak_kv_multi_backend.erl:247-254 | src/riak_kv_multi_prefix_backend.erl:284-291 — before extracting anything, compare `src/riak_kv_multi_backend.erl` and `src/riak_kv_multi_prefix_backend.erl` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 283 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 2) src/riak_kv_multi_backend.erl:279 — src/riak_kv_multi_backend.erl:279-286 | src/riak_kv_multi_prefix_backend.erl:317-324 — before extracting anything, compare `src/riak_kv_multi_backend.erl` and `src/riak_kv_multi_prefix_backend.erl` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 283 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 2) src/riak_kv_multi_backend.erl:500 — src/riak_kv_multi_backend.erl:500-507 | src/riak_kv_multi_prefix_backend.erl:532-539 — before extracting anything, compare `src/riak_kv_multi_backend.erl` and `src/riak_kv_multi_prefix_backend.erl` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 283 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 `src/riak_kv_multi_backend.erl:500` 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) src/riak_kv_query_server.erl:380 — src/riak_kv_query_server.erl:380-387 | src/riak_kv_query_server.erl:393-400 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/riak_kv_query_server.erl:380` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) src/riak_kv_tictacaae_cli.erl:178 — src/riak_kv_tictacaae_cli.erl:178-185 | src/riak_kv_tictacaae_cli.erl:219-226 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/riak_kv_tictacaae_cli.erl:178` 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) src/riak_kv_mapred_json.erl:238 — src/riak_kv_mapred_json.erl:238-245 | src/riak_kv_mapred_term.erl:91-98 — 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 `src/riak_kv_mapred_json.erl:238` 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) src/riak_kv_multi_backend.erl:383 — src/riak_kv_multi_backend.erl:383-390 | src/riak_kv_multi_prefix_backend.erl:413-420 — before extracting anything, compare `src/riak_kv_multi_backend.erl` and `src/riak_kv_multi_prefix_backend.erl` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 283 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 `src/riak_kv_multi_backend.erl:383` it does not close everything it opens, so those 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 (6 lines × 2) · ×9
  • Duplicated block (6 lines × 2) eqc/eraser_eqc.erl:112 — eqc/eraser_eqc.erl:112-117 | eqc/reaper_eqc.erl:103-108 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `eqc/eraser_eqc.erl:112` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) src/riak_kv_clusteraae_fsm.erl:526 — src/riak_kv_clusteraae_fsm.erl:526-531 | src/riak_kv_hotbackup_fsm.erl:111-116 — 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 `src/riak_kv_clusteraae_fsm.erl:526` it does not close everything it opens, so those exact lines 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) src/riak_kv_replrtq_snk.erl:772 — src/riak_kv_replrtq_snk.erl:772-777 | src/riak_kv_replrtq_snk.erl:782-787 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/riak_kv_replrtq_snk.erl:772` it does not close everything it opens, so those exact lines 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) src/riak_kv_wm_bucket_type.erl:199 — src/riak_kv_wm_bucket_type.erl:199-204 | src/riak_kv_wm_props.erl:216-221 — before extracting anything, compare `src/riak_kv_wm_bucket_type.erl` and `src/riak_kv_wm_props.erl` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 42 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/riak_kv_wm_bucket_type.erl:199` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) src/riak_kv_wm_counter.erl:245 — src/riak_kv_wm_counter.erl:245-250 | src/riak_kv_wm_crdt.erl:229-234 — before extracting anything, compare `src/riak_kv_wm_counter.erl` and `src/riak_kv_wm_crdt.erl` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 31 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 (6 lines × 2) src/riak_kv_multi_backend.erl:557 — src/riak_kv_multi_backend.erl:557-562 | src/riak_kv_multi_prefix_backend.erl:588-593 — before extracting anything, compare `src/riak_kv_multi_backend.erl` and `src/riak_kv_multi_prefix_backend.erl` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 283 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 2) src/riak_kv_pb_index.erl:200 — src/riak_kv_pb_index.erl:200-205 | src/riak_kv_wm_index.erl:552-557 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (6 lines × 2) src/riak_kv_ttaaefs_manager.erl:1480 — src/riak_kv_ttaaefs_manager.erl:1480-1485 | src/riak_kv_ttaaefs_manager.erl:1504-1510 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (6 lines × 2) eqc/replrtq_eqc.erl:162 — eqc/replrtq_eqc.erl:162-167 | eqc/replrtq_eqc.erl:221-226 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D3 · God Classes · TooManyFunctions · ×8
  • TooManyFunctions: replrtq_snk_eqc eqc/replrtq_snk_eqc.erl:13 — TooManyFunctions — 77 functions. The bar is 30 functions; this is 47 over it, 2.57× the bar. The counted members are a module's functions — a module holds no instance state, so there is no shared data to group them by and no type to move them onto. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no single module carries every responsibility.
  • TooManyFunctions: replrtq_eqc eqc/replrtq_eqc.erl:31 — TooManyFunctions — 73 functions. The bar is 30 functions; this is 43 over it, 2.43× the bar. The counted members are a module's functions — a module holds no instance state, so there is no shared data to group them by and no type to move them onto. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no single module carries every responsibility.
  • TooManyFunctions: riak_kv_crdt src/riak_kv_crdt.erl:23 — TooManyFunctions — 53 functions. The bar is 30 functions; this is 23 over it, 1.77× the bar. The counted members are a module's functions — a module holds no instance state, so there is no shared data to group them by and no type to move them onto. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no single module carries every responsibility.
  • TooManyFunctions: riak_kv_multi_prefix_backend src/riak_kv_multi_prefix_backend.erl:73 — TooManyFunctions — 41 functions. The bar is 30 functions; this is 11 over it, 1.37× the bar. The counted members are a module's functions — a module holds no instance state, so there is no shared data to group them by and no type to move them onto. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no single module carries every responsibility.
  • TooManyFunctions: riak_kv_requests src/riak_kv_requests.erl:22 — TooManyFunctions — 39 functions. The bar is 30 functions; this is 9 over it, 1.30× the bar. The counted members are a module's functions — a module holds no instance state, so there is no shared data to group them by and no type to move them onto. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no single module carries every responsibility.
  • TooManyFunctions: riak_kv_mapred_filters src/riak_kv_mapred_filters.erl:22 — TooManyFunctions — 35 functions. The bar is 30 functions; this is 5 over it, 1.17× the bar. The counted members are a module's functions — a module holds no instance state, so there is no shared data to group them by and no type to move them onto. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no single module carries every responsibility.
  • TooManyFunctions: riak_kv_wm_crdt src/riak_kv_wm_crdt.erl:122 — TooManyFunctions — 33 functions. The bar is 30 functions; this is 3 over it, 1.10× the bar. The counted members are a module's functions — a module holds no instance state, so there is no shared data to group them by and no type to move them onto. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no single module carries every responsibility.
  • TooManyFunctions: riak_kv_yessir_backend src/riak_kv_yessir_backend.erl:118 — TooManyFunctions — 32 functions. The bar is 30 functions; this is 2 over it, 1.07× the bar. The counted members are a module's functions — a module holds no instance state, so there is no shared data to group them by and no type to move them onto. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no single module carries every responsibility.
D4 · Code Duplication · Edited copy of a member (10 corresponding lines) · ×7
  • Edited copy of a member (10 corresponding lines) src/riak_kv_wm_buckets.erl:244 — src/riak_kv_wm_buckets.erl:244-256 | src/riak_kv_wm_keylist.erl:279-288 — 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) src/riak_kv_wm_crdt.erl:534 — src/riak_kv_wm_crdt.erl:534-546 | src/riak_kv_wm_object.erl:1748-1757 — 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) src/riak_kv_wm_bucket_type.erl:263 — src/riak_kv_wm_bucket_type.erl:263-272 | src/riak_kv_wm_props.erl:282-291 — 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) src/riak_client.erl:597 — src/riak_client.erl:597-606 | src/riak_client.erl:692-703 — 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) src/riak_kv_util.erl:300 — src/riak_kv_util.erl:300-309 | src/riak_kv_util.erl:340-355 — 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) src/riak_kv_wm_object.erl:1478 — src/riak_kv_wm_object.erl:1478-1487 | src/riak_kv_wm_object.erl:1496-1508 — 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) src/riak_kv_bitcask_backend.erl:551 — src/riak_kv_bitcask_backend.erl:551-561 | src/riak_kv_memory_backend.erl:478-487 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (8 corresponding lines) · ×7
  • Edited copy of a member (8 corresponding lines) src/riak_kv_w1c_worker.erl:282 — src/riak_kv_w1c_worker.erl:282-291 | src/riak_kv_w1c_worker.erl:293-300 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) src/riak_client.erl:1118 — src/riak_client.erl:1118-1125 | src/riak_client.erl:1138-1153 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) src/riak_kv_vnode.erl:3626 — src/riak_kv_vnode.erl:3626-3633 | src/riak_kv_vnode.erl:3636-3643 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) eqc/replrtq_eqc.erl:161 — eqc/replrtq_eqc.erl:161-168 | eqc/replrtq_eqc.erl:220-227 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) src/riak_kv_entropy_info.erl:126 — src/riak_kv_entropy_info.erl:126-133 | src/riak_kv_entropy_info.erl:141-148 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) src/riak_client.erl:860 — src/riak_client.erl:860-867 | src/riak_client.erl:1048-1055 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) src/riak_kv_token_session.erl:201 — src/riak_kv_token_session.erl:201-208 | src/riak_kv_token_session.erl:211-220 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (7 corresponding lines) · ×7
  • Edited copy of a member (7 corresponding lines) src/riak_client.erl:589 — src/riak_client.erl:589-595 | src/riak_client.erl:684-690 — 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) src/riak_kv_wm_keylist.erl:83 — src/riak_kv_wm_keylist.erl:83-89 | src/riak_kv_wm_link_walker.erl:215-221 — 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) eqc/eraser_eqc.erl:111 — eqc/eraser_eqc.erl:111-117 | eqc/reaper_eqc.erl:102-108 — 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) src/riak_kv_index_fsm.erl:297 — src/riak_kv_index_fsm.erl:297-303 | src/riak_kv_query_server.erl:702-708 — 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) src/riak_kv_multi_backend.erl:317 — src/riak_kv_multi_backend.erl:317-324 | src/riak_kv_multi_prefix_backend.erl:349-355 — 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) src/riak_kv_multi_backend.erl:335 — src/riak_kv_multi_backend.erl:335-342 | src/riak_kv_multi_prefix_backend.erl:366-372 — 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) src/riak_kv_wm_crdt.erl:283 — src/riak_kv_wm_crdt.erl:283-289 | src/riak_kv_wm_object.erl:404-410 — 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 (7 lines × 2) · ×6
  • Duplicated block (7 lines × 2) src/riak_kv_ttaaefs_manager.erl:1470 — src/riak_kv_ttaaefs_manager.erl:1470-1476 | src/riak_kv_ttaaefs_manager.erl:1480-1486 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) src/riak_kv_get_fsm.erl:202 — src/riak_kv_get_fsm.erl:202-208 | src/riak_kv_put_fsm.erl:299-305 — 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) src/riak_kv_get_fsm.erl:770 — src/riak_kv_get_fsm.erl:770-776 | src/riak_kv_put_fsm.erl:954-960 — 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) src/riak_kv_wm_bucket_type.erl:91 — src/riak_kv_wm_bucket_type.erl:91-97 | src/riak_kv_wm_props.erl:109-115 — before extracting anything, compare `src/riak_kv_wm_bucket_type.erl` and `src/riak_kv_wm_props.erl` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 42 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/riak_kv_wm_bucket_type.erl:91` 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) src/riak_kv_get_core.erl:317 — src/riak_kv_get_core.erl:317-323 | src/riak_kv_put_core.erl:168-174 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/riak_kv_get_core.erl:317` it does not close everything it opens, so those exact lines 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) src/riak_kv_wm_buckets.erl:155 — src/riak_kv_wm_buckets.erl:155-161 | src/riak_kv_wm_keylist.erl:163-169 — before extracting anything, compare `src/riak_kv_wm_buckets.erl` and `src/riak_kv_wm_keylist.erl` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 72 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Edited copy of a member (11 corresponding lines) · ×5
  • Edited copy of a member (11 corresponding lines) src/riak_kv_console.erl:341 — src/riak_kv_console.erl:341-352 | src/riak_kv_console.erl:370-380 — 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) src/riak_client.erl:1291 — src/riak_client.erl:1291-1301 | src/riak_client.erl:1303-1313 — 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) src/riak_kv_index_fsm.erl:305 — src/riak_kv_index_fsm.erl:305-315 | src/riak_kv_query_server.erl:710-724 — 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) src/riak_kv_get_fsm.erl:124 — src/riak_kv_get_fsm.erl:124-134 | src/riak_kv_put_fsm.erl:167-177 — 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) src/riak_kv_index_hashtree.erl:1229 — src/riak_kv_index_hashtree.erl:1229-1239 | src/riak_kv_vnode.erl:4513-4523 — 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 (10 lines × 2) · ×5
  • Duplicated block (10 lines × 2) src/riak_kv_delete.erl:135 — src/riak_kv_delete.erl:135-144 | src/riak_kv_delete.erl:174-183 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) src/riak_kv_multi_backend.erl:415 — src/riak_kv_multi_backend.erl:415-424 | src/riak_kv_multi_prefix_backend.erl:445-454 — before extracting anything, compare `src/riak_kv_multi_backend.erl` and `src/riak_kv_multi_prefix_backend.erl` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 283 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (10 lines × 2) src/riak_kv_wm_counter.erl:189 — src/riak_kv_wm_counter.erl:189-198 | src/riak_kv_wm_props.erl:179-188 — before extracting anything, compare `src/riak_kv_wm_counter.erl` and `src/riak_kv_wm_props.erl` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 61 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (10 lines × 2) src/riak_kv_wm_counter.erl:259 — src/riak_kv_wm_counter.erl:259-268 | src/riak_kv_wm_crdt.erl:241-250 — before extracting anything, compare `src/riak_kv_wm_counter.erl` and `src/riak_kv_wm_crdt.erl` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 31 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (10 lines × 2) src/riak_kv_tictacaae_cli.erl:408 — src/riak_kv_tictacaae_cli.erl:408-417 | src/riak_kv_vnode_status_cli.erl:175-184 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) · ×4
  • Members sharing a duplicated core (4 members, 50+ identical tokens) src/riak_kv_multi_backend.erl:231 — src/riak_kv_multi_backend.erl:231-240 | src/riak_kv_multi_backend.erl:247-256 | src/riak_kv_multi_prefix_backend.erl:268-277 | src/riak_kv_multi_prefix_backend.erl:284-293 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) src/riak_kv_multi_backend.erl:264 — src/riak_kv_multi_backend.erl:264-273 | src/riak_kv_multi_backend.erl:279-288 | src/riak_kv_multi_prefix_backend.erl:302-311 | src/riak_kv_multi_prefix_backend.erl:317-326 — 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) src/riak_kv_wm_aaefold.erl:458 — src/riak_kv_wm_aaefold.erl:458-484 | src/riak_kv_wm_aaefold.erl:488-515 | src/riak_kv_wm_aaefold.erl:519-546 | src/riak_kv_wm_aaefold.erl:641-668 — 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) src/riak_kv_wm_buckets.erl:129 — src/riak_kv_wm_buckets.erl:129-152 | src/riak_kv_wm_index.erl:145-171 | src/riak_kv_wm_keylist.erl:136-160 | src/riak_kv_wm_query.erl:251-275 — 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 (6 corresponding lines) · ×4
  • Edited copy of a member (6 corresponding lines) src/riak_kv_wm_json.erl:777 — src/riak_kv_wm_json.erl:777-782 | src/riak_kv_wm_json.erl:1114-1119 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) src/riak_kv_mapred_json.erl:192 — src/riak_kv_mapred_json.erl:192-197 | src/riak_kv_mapred_json.erl:465-471 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) src/riak_kv_crdt.erl:473 — src/riak_kv_crdt.erl:473-478 | src/riak_kv_hll.erl:177-182 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) src/riak_kv_util.erl:106 — src/riak_kv_util.erl:106-111 | src/riak_object.erl:323-328 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (4 corresponding lines) · ×4
  • Edited copy of a member (4 corresponding lines) src/riak_object.erl:1076 — src/riak_object.erl:1076-1079 | src/riak_object.erl:1083-1089 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) src/riak_kv_multi_backend.erl:400 — src/riak_kv_multi_backend.erl:400-403 | src/riak_kv_multi_prefix_backend.erl:430-433 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) src/riak_kv_get_fsm.erl:594 — src/riak_kv_get_fsm.erl:594-597 | src/riak_kv_put_fsm.erl:742-745 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) src/riak_kv_wm_bucket_type.erl:189 — src/riak_kv_wm_bucket_type.erl:189-192 | src/riak_kv_wm_props.erl:206-209 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (5 corresponding lines) · ×4
  • Edited copy of a member (5 corresponding lines) src/riak_kv_stat.erl:470 — src/riak_kv_stat.erl:470-474 | src/riak_kv_stat.erl:476-480 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) src/riak_kv_get_core.erl:465 — src/riak_kv_get_core.erl:465-469 | src/riak_kv_put_core.erl:218-222 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) src/riak_kv_wm_bucket_type.erl:214 — src/riak_kv_wm_bucket_type.erl:214-218 | src/riak_kv_wm_props.erl:231-235 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) src/riak_kv_crdt.erl:565 — src/riak_kv_crdt.erl:565-571 | src/riak_kv_mapred_json.erl:548-552 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (3 corresponding lines) · ×4
  • Edited copy of a member (3 corresponding lines) src/riak_kv_ttaaefs_manager.erl:1098 — src/riak_kv_ttaaefs_manager.erl:1098-1106 | src/riak_kv_util.erl:606-608 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) src/riak_kv_multi_backend.erl:411 — src/riak_kv_multi_backend.erl:411-413 | src/riak_kv_multi_prefix_backend.erl:441-443 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) src/riak_kv_multi_backend.erl:222 — src/riak_kv_multi_backend.erl:222-224 | src/riak_kv_multi_prefix_backend.erl:259-261 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) eqc/eraser_eqc.erl:60 — eqc/eraser_eqc.erl:60-62 | eqc/reaper_eqc.erl:54-56 — 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 (12 lines × 2) · ×4
  • Duplicated block (12 lines × 2) src/riak_kv_multi_backend.erl:207 — src/riak_kv_multi_backend.erl:207-218 | src/riak_kv_multi_prefix_backend.erl:244-255 — before extracting anything, compare `src/riak_kv_multi_backend.erl` and `src/riak_kv_multi_prefix_backend.erl` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 283 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 2) src/riak_kv_vnode.erl:3667 — src/riak_kv_vnode.erl:3667-3678 | src/riak_kv_vnode.erl:3687-3698 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) src/riak_kv_wm_aaefold.erl:912 — src/riak_kv_wm_aaefold.erl:912-923 | src/riak_kv_wm_index.erl:501-512 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (12 lines × 2) src/riak_kv_query_filebuffer.erl:326 — src/riak_kv_query_filebuffer.erl:326-337 | src/riak_kv_query_server.erl:564-575 — 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.
D36 · Supply-chain Provenance & Signing · REDACTED · ×3
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Edited copy of a member (23 corresponding lines) · ×3
  • Edited copy of a member (23 corresponding lines) src/riak_kv_wm_json.erl:872 — src/riak_kv_wm_json.erl:872-894 | src/riak_kv_wm_json.erl:915-937 — 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) src/riak_kv_pb_csbucket.erl:95 — src/riak_kv_pb_csbucket.erl:95-119 | src/riak_kv_pb_index.erl:213-235 — 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) src/riak_kv_wm_object.erl:558 — src/riak_kv_wm_object.erl:558-580 | src/riak_kv_wm_stats.erl:109-131 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (14 corresponding lines) · ×3
  • Edited copy of a member (14 corresponding lines) src/riak_kv_multi_backend.erl:114 — src/riak_kv_multi_backend.erl:114-130 | src/riak_kv_multi_prefix_backend.erl:130-143 — 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) src/riak_kv_leveled_backend.erl:285 — src/riak_kv_leveled_backend.erl:285-298 | src/riak_kv_leveled_backend.erl:856-878 — 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) src/riak_kv_vnode.erl:3665 — src/riak_kv_vnode.erl:3665-3678 | src/riak_kv_vnode.erl:3685-3698 — 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 copies of one member (3 members, 4+ corresponding lines) · ×3
  • Edited copies of one member (3 members, 4+ corresponding lines) src/riak_kv_wm_json.erl:830 — src/riak_kv_wm_json.erl:830-833 | src/riak_kv_wm_json.erl:835-839 | src/riak_kv_wm_json.erl:848-851 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 4+ corresponding lines) src/riak_client.erl:562 — src/riak_client.erl:562-565 | src/riak_client.erl:657-660 | src/riak_client.erl:905-911 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 4+ corresponding lines) src/riak_kv_wm_json.erl:762 — src/riak_kv_wm_json.erl:762-765 | src/riak_kv_wm_json.erl:767-770 | src/riak_kv_wm_json.erl:772-775 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (2 corresponding lines) · ×3
  • Edited copy of a member (2 corresponding lines) src/riak_kv_get_fsm.erl:109 — src/riak_kv_get_fsm.erl:109-110 | src/riak_kv_put_fsm.erl:164-165 — These two members are one piece of code written twice and then edited apart: 2 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (2 corresponding lines) eqc/eraser_eqc.erl:64 — eqc/eraser_eqc.erl:64-65 | eqc/reaper_eqc.erl:58-59 — These two members are one piece of code written twice and then edited apart: 2 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (2 corresponding lines) src/riak_kv_get_fsm.erl:869 — src/riak_kv_get_fsm.erl:869-870 | src/riak_kv_put_fsm.erl:1008-1009 — These two members are one piece of code written twice and then edited apart: 2 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (14 lines × 2) · ×3
  • Duplicated block (14 lines × 2) src/riak_kv_multi_backend.erl:461 — src/riak_kv_multi_backend.erl:461-474 | src/riak_kv_multi_prefix_backend.erl:491-504 — before extracting anything, compare `src/riak_kv_multi_backend.erl` and `src/riak_kv_multi_prefix_backend.erl` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 283 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 `src/riak_kv_multi_backend.erl:461` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) src/riak_kv_ttaaefs_manager.erl:585 — src/riak_kv_ttaaefs_manager.erl:585-598 | src/riak_kv_ttaaefs_manager.erl:621-634 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/riak_kv_ttaaefs_manager.erl:585` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) src/riak_kv_wm_counter.erl:261 — src/riak_kv_wm_counter.erl:261-274 | src/riak_kv_wm_object.erl:693-706 — before extracting anything, compare `src/riak_kv_wm_counter.erl` and `src/riak_kv_wm_object.erl` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 61 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (13 lines × 2) · ×3
  • Duplicated block (13 lines × 2) src/riak_kv_pipe_index.erl:172 — src/riak_kv_pipe_index.erl:172-184 | src/riak_kv_pipe_listkeys.erl:178-190 — 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 `src/riak_kv_pipe_index.erl:172` 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 (13 lines × 2) src/riak_kv_pb_aaefold.erl:113 — src/riak_kv_pb_aaefold.erl:113-125 | src/riak_kv_pb_aaefold.erl:169-181 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/riak_kv_pb_aaefold.erl: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.
  • Duplicated block (13 lines × 2) src/riak_kv_wm_counter.erl:408 — src/riak_kv_wm_counter.erl:408-420 | src/riak_kv_wm_object.erl:1719-1731 — before extracting anything, compare `src/riak_kv_wm_counter.erl` and `src/riak_kv_wm_object.erl` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 61 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×3
  • Duplicated block (11 lines × 2) src/riak_kv_multi_backend.erl:114 — src/riak_kv_multi_backend.erl:114-124 | src/riak_kv_multi_prefix_backend.erl:130-140 — before extracting anything, compare `src/riak_kv_multi_backend.erl` and `src/riak_kv_multi_prefix_backend.erl` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 283 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 `src/riak_kv_multi_backend.erl:114` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) src/riak_kv_multi_backend.erl:636 — src/riak_kv_multi_backend.erl:636-646 | src/riak_kv_multi_prefix_backend.erl:642-652 — before extracting anything, compare `src/riak_kv_multi_backend.erl` and `src/riak_kv_multi_prefix_backend.erl` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 283 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (11 lines × 2) src/riak_kv_console.erl:146 — src/riak_kv_console.erl:146-156 | src/riak_kv_console.erl:170-180 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D35 · Change Coupling · Change coupling · ×2
  • Change coupling: riak_kv_pb_counter.erl ↔ riak_kv_wm_counter.erl src/riak_kv_pb_counter.erl:1 — `src/riak_kv_pb_counter.erl` and `src/riak_kv_wm_counter.erl` change together 70% of the time (16 of the 23 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 16 shared commits counted here, the most recent 3 are `0622729f` Nhse 034 orkv.i57 fixcapability (#26); `328f2b94` Stop use of riak_client not as M:F; `11ad7c20` Update API to allow node_confirms per request — run `git show` on any of them.
  • Change coupling: riak_kv_pb_object.erl ↔ riak_kv_wm_queue.erl src/riak_kv_pb_object.erl:1 — `src/riak_kv_pb_object.erl` and `src/riak_kv_wm_queue.erl` change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `89222225` Nhse develop d30upd (#15); `5c4c8da4` Mas i1788 reconcileapi (#1792); `328f2b94` Stop use of riak_client not as M:F — run `git show` on any of them.
D4 · Code Duplication · Edited copy of a member (22 corresponding lines) · ×2
  • Edited copy of a member (22 corresponding lines) src/riak_kv_wm_json.erl:1036 — src/riak_kv_wm_json.erl:1036-1058 | src/riak_kv_wm_json.erl:1091-1112 — 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) src/riak_kv_pipe_index.erl:81 — src/riak_kv_pipe_index.erl:81-102 | src/riak_kv_pipe_listkeys.erl:96-117 — 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 (17 corresponding lines) · ×2
  • Edited copy of a member (17 corresponding lines) src/riak_kv_wm_json.erl:1018 — src/riak_kv_wm_json.erl:1018-1034 | src/riak_kv_wm_json.erl:1060-1082 — 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) src/riak_kv_yessir_backend.erl:315 — src/riak_kv_yessir_backend.erl:315-331 | src/riak_kv_yessir_backend.erl:340-357 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (16 corresponding lines) · ×2
  • Edited copy of a member (16 corresponding lines) src/riak_kv_wm_json.erl:971 — src/riak_kv_wm_json.erl:971-986 | src/riak_kv_wm_json.erl:988-1003 — 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) src/riak_kv_wm_crdt.erl:212 — src/riak_kv_wm_crdt.erl:212-227 | src/riak_kv_wm_object.erl:587-623 — 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 copies of one member (3 members, 25+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 25+ corresponding lines) src/riak_kv_wm_bucket_type.erl:132 — src/riak_kv_wm_bucket_type.erl:132-156 | src/riak_kv_wm_counter.erl:173-198 | src/riak_kv_wm_props.erl:159-188 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 25 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 25+ corresponding lines) src/riak_kv_wm_aaefold.erl:183 — src/riak_kv_wm_aaefold.erl:183-207 | src/riak_kv_wm_queue.erl:109-133 | src/riak_kv_wm_stats.erl:58-82 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 25 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 6+ corresponding lines) · ×2
  • Edited copies of one member (4 members, 6+ corresponding lines) src/riak_kv_wm_json.erl:784 — src/riak_kv_wm_json.erl:784-789 | src/riak_kv_wm_json.erl:807-813 | src/riak_kv_wm_json.erl:823-828 | src/riak_kv_wm_json.erl:841-846 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 6+ corresponding lines) src/riak_kv_buckets_fsm_sup.erl:50 — src/riak_kv_buckets_fsm_sup.erl:50-55 | src/riak_kv_delete_sup.erl:43-48 | src/riak_kv_query_filebuffer_sup.erl:52-63 | src/riak_kv_query_sup.erl:48-59 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (9 corresponding lines) · ×2
  • Edited copy of a member (9 corresponding lines) src/riak_kv_util.erl:122 — src/riak_kv_util.erl:122-130 | src/riak_kv_util.erl:143-151 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) src/riak_kv_multi_backend.erl:499 — src/riak_kv_multi_backend.erl:499-507 | src/riak_kv_multi_prefix_backend.erl:531-539 — 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 copy of a member (12 corresponding lines) · ×2
  • Edited copy of a member (12 corresponding lines) src/riak_kv_token_manager.erl:230 — src/riak_kv_token_manager.erl:230-241 | src/riak_kv_token_manager.erl:247-258 — 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) src/riak_kv_wm_bucket_type.erl:198 — src/riak_kv_wm_bucket_type.erl:198-209 | src/riak_kv_wm_props.erl:215-226 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (13 corresponding lines) · ×2
  • Edited copy of a member (13 corresponding lines) src/riak_kv_index_hashtree.erl:893 — src/riak_kv_index_hashtree.erl:893-905 | src/riak_kv_index_hashtree.erl:928-940 — 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) src/riak_kv_tictacaae_cli.erl:342 — src/riak_kv_tictacaae_cli.erl:342-355 | src/riak_kv_tictacaae_cli.erl:370-382 — 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 · Edited copy of a member (19 corresponding lines) · ×2
  • Edited copy of a member (19 corresponding lines) src/riak_kv_util.erl:628 — src/riak_kv_util.erl:628-654 | src/riak_kv_util.erl:659-677 — 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) src/riak_kv_wm_buckets.erl:186 — src/riak_kv_wm_buckets.erl:186-204 | src/riak_kv_wm_keylist.erl:195-213 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (15 corresponding lines) · ×2
  • Edited copy of a member (15 corresponding lines) src/riak_client.erl:98 — src/riak_client.erl:98-112 | src/riak_client.erl:209-226 — 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) src/riak_kv_bitcask_backend.erl:565 — src/riak_kv_bitcask_backend.erl:565-579 | src/riak_kv_bitcask_backend.erl:583-597 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 7+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 7+ corresponding lines) src/riak_object.erl:934 — src/riak_object.erl:934-941 | src/riak_object.erl:965-971 | src/riak_object.erl:983-991 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 7+ corresponding lines) eqc/replrtq_eqc.erl:311 — eqc/replrtq_eqc.erl:311-317 | eqc/replrtq_eqc.erl:336-342 | eqc/replrtq_eqc.erl:361-368 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (18 lines × 2) · ×2
  • Duplicated block (18 lines × 2) src/riak_kv_multi_backend.erl:346 — src/riak_kv_multi_backend.erl:346-363 | src/riak_kv_multi_prefix_backend.erl:376-393 — before extracting anything, compare `src/riak_kv_multi_backend.erl` and `src/riak_kv_multi_prefix_backend.erl` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 283 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 `src/riak_kv_multi_backend.erl:346` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (18 lines × 2) src/riak_kv_vnode.erl:2282 — src/riak_kv_vnode.erl:2282-2299 | src/riak_kv_vnode.erl:2312-2329 — both copies are in the same file, so extract the 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 (17 lines × 2) · ×2
  • Duplicated block (17 lines × 2) src/riak_kv_multi_backend.erl:432 — src/riak_kv_multi_backend.erl:432-448 | src/riak_kv_multi_prefix_backend.erl:462-478 — before extracting anything, compare `src/riak_kv_multi_backend.erl` and `src/riak_kv_multi_prefix_backend.erl` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 283 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (17 lines × 2) src/riak_kv_wm_buckets.erl:188 — src/riak_kv_wm_buckets.erl:188-204 | src/riak_kv_wm_keylist.erl:197-213 — before extracting anything, compare `src/riak_kv_wm_buckets.erl` and `src/riak_kv_wm_keylist.erl` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 72 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (8 lines × 3) · ×2
  • Duplicated block (8 lines × 3) src/riak_kv_wm_bucket_type.erl:132 — src/riak_kv_wm_bucket_type.erl:132-139 | src/riak_kv_wm_counter.erl:173-180 | src/riak_kv_wm_props.erl:159-166 — before extracting anything, compare `src/riak_kv_wm_bucket_type.erl` and `src/riak_kv_wm_props.erl` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 42 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/riak_kv_wm_bucket_type.erl:132` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 3) src/riak_kv_eraser.erl:135 — src/riak_kv_eraser.erl:135-142 | src/riak_kv_reader.erl:112-119 | src/riak_kv_reaper.erl:158-165 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (7 lines × 4) · ×2
  • Duplicated block (7 lines × 4) src/riak_kv_multi_backend.erl:234 — src/riak_kv_multi_backend.erl:234-240 | src/riak_kv_multi_backend.erl:250-256 | src/riak_kv_multi_prefix_backend.erl:271-277 | src/riak_kv_multi_prefix_backend.erl:287-293 — before extracting anything, compare `src/riak_kv_multi_backend.erl` and `src/riak_kv_multi_prefix_backend.erl` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 283 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 4) src/riak_kv_multi_backend.erl:267 — src/riak_kv_multi_backend.erl:267-273 | src/riak_kv_multi_backend.erl:282-288 | src/riak_kv_multi_prefix_backend.erl:305-311 | src/riak_kv_multi_prefix_backend.erl:320-326 — before extracting anything, compare `src/riak_kv_multi_backend.erl` and `src/riak_kv_multi_prefix_backend.erl` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 283 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.
D1 · Cyclomatic Complexity · riak_kv_pb_aaefold.process (cyclomatic 67) · ×1
  • riak_kv_pb_aaefold.process (cyclomatic 67) src/riak_kv_pb_aaefold.erl:74 — riak_kv_pb_aaefold.process has cyclomatic complexity 67 (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 · riak_kv_pb_object.process (cyclomatic 62) · ×1
  • riak_kv_pb_object.process (cyclomatic 62) src/riak_kv_pb_object.erl:112 — riak_kv_pb_object.process has cyclomatic complexity 62 (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 · riak_kv_vnode.handle_aaefold (cyclomatic 42) · ×1
  • riak_kv_vnode.handle_aaefold (cyclomatic 42) src/riak_kv_vnode.erl:2076 — riak_kv_vnode.handle_aaefold has cyclomatic complexity 42 (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 · riak_kv_query_server.handle_info (cyclomatic 38) · ×1
  • riak_kv_query_server.handle_info (cyclomatic 38) src/riak_kv_query_server.erl:236 — riak_kv_query_server.handle_info has cyclomatic complexity 38 (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 · riak_kv_vnode.handle_info (cyclomatic 36) · ×1
  • riak_kv_vnode.handle_info (cyclomatic 36) src/riak_kv_vnode.erl:2891 — riak_kv_vnode.handle_info has cyclomatic complexity 36 (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 · riak_kv_eleveldb_backend.fold_keys_fun (cyclomatic 32) · ×1
  • riak_kv_eleveldb_backend.fold_keys_fun (cyclomatic 32) src/riak_kv_eleveldb_backend.erl:745 — riak_kv_eleveldb_backend.fold_keys_fun has cyclomatic complexity 32 (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 · riak_kv_replrtq_src.handle_call (cyclomatic 31) · ×1
  • riak_kv_replrtq_src.handle_call (cyclomatic 31) src/riak_kv_replrtq_src.erl:362 — riak_kv_replrtq_src.handle_call has cyclomatic complexity 31 (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 · riak_kv_wm_aaefold.validate_filter_field (cyclomatic 31) · ×1
  • riak_kv_wm_aaefold.validate_filter_field (cyclomatic 31) src/riak_kv_wm_aaefold.erl:780 — riak_kv_wm_aaefold.validate_filter_field has cyclomatic complexity 31 (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 · riak_kv_ttaaefs_manager.handle_cast (cyclomatic 29) · ×1
  • riak_kv_ttaaefs_manager.handle_cast (cyclomatic 29) src/riak_kv_ttaaefs_manager.erl:514 — riak_kv_ttaaefs_manager.handle_cast has cyclomatic complexity 29 (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 · riak_kv_tictacaae_cli.fold_query_arg (cyclomatic 28) · ×1
  • riak_kv_tictacaae_cli.fold_query_arg (cyclomatic 28) src/riak_kv_tictacaae_cli.erl:827 — riak_kv_tictacaae_cli.fold_query_arg has cyclomatic complexity 28 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · riak_kv_bucket.validate (cyclomatic 24) · ×1
  • riak_kv_bucket.validate (cyclomatic 24) src/riak_kv_bucket.erl:251 — riak_kv_bucket.validate has cyclomatic complexity 24 (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 · riak_kv_mapred_term.parse_inputs (cyclomatic 23) · ×1
  • riak_kv_mapred_term.parse_inputs (cyclomatic 23) src/riak_kv_mapred_term.erl:66 — riak_kv_mapred_term.parse_inputs has cyclomatic complexity 23 (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 · riak_kv_mrc_pipe.send_inputs (cyclomatic 22) · ×1
  • riak_kv_mrc_pipe.send_inputs (cyclomatic 22) src/riak_kv_mrc_pipe.erl:604 — riak_kv_mrc_pipe.send_inputs has cyclomatic complexity 22 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · riak_kv_mapred_term.get_required_permissions (cyclomatic 21) · ×1
  • riak_kv_mapred_term.get_required_permissions (cyclomatic 21) src/riak_kv_mapred_term.erl:151 — riak_kv_mapred_term.get_required_permissions has cyclomatic complexity 21 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · riak_kv_console.repair_2i (cyclomatic 20) · ×1
  • riak_kv_console.repair_2i (cyclomatic 20) src/riak_kv_console.erl:653 — riak_kv_console.repair_2i has cyclomatic complexity 20 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · riak_kv_get_core.response (cyclomatic 20) · ×1
  • riak_kv_get_core.response (cyclomatic 20) src/riak_kv_get_core.erl:253 — riak_kv_get_core.response has cyclomatic complexity 20 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · riak_kv_put_fsm.validate (cyclomatic 19) · ×1
  • riak_kv_put_fsm.validate (cyclomatic 19) src/riak_kv_put_fsm.erl:350 — riak_kv_put_fsm.validate has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · riak_kv_tictacaae_cli.fold_cmd (cyclomatic 19) · ×1
  • riak_kv_tictacaae_cli.fold_cmd (cyclomatic 19) src/riak_kv_tictacaae_cli.erl:634 — riak_kv_tictacaae_cli.fold_cmd has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · riak_kv_token_manager.handle_cast (cyclomatic 19) · ×1
  • riak_kv_token_manager.handle_cast (cyclomatic 19) src/riak_kv_token_manager.erl:299 — riak_kv_token_manager.handle_cast has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · riak_kv_vnode.handle_coverage_request (cyclomatic 19) · ×1
  • riak_kv_vnode.handle_coverage_request (cyclomatic 19) src/riak_kv_vnode.erl:1901 — riak_kv_vnode.handle_coverage_request has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · riak_kv_wm_index.malformed_request (cyclomatic 19) · ×1
  • riak_kv_wm_index.malformed_request (cyclomatic 19) src/riak_kv_wm_index.erl:187 — riak_kv_wm_index.malformed_request has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · riak_kv_clusteraae_fsm.init (cyclomatic 18) · ×1
  • riak_kv_clusteraae_fsm.init (cyclomatic 18) src/riak_kv_clusteraae_fsm.erl:365 — riak_kv_clusteraae_fsm.init has cyclomatic complexity 18 (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 · riak_kv_clusteraae_fsm.process_results (cyclomatic 18) · ×1
  • riak_kv_clusteraae_fsm.process_results (cyclomatic 18) src/riak_kv_clusteraae_fsm.erl:439 — riak_kv_clusteraae_fsm.process_results has cyclomatic complexity 18 (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 · riak_kv_query_buffer.merge (cyclomatic 18) · ×1
  • riak_kv_query_buffer.merge (cyclomatic 18) src/riak_kv_query_buffer.erl:180 — riak_kv_query_buffer.merge has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions — but note WHERE they are: these tests sit in guard sequences, and a guard is a restricted expression sublanguage that allows neither binding a local nor calling a function you wrote, so neither of those moves is available in place. Move the decision out of the guard instead: keep one clause with a permissive guard, compute the compound test in the body through named predicate functions, and dispatch on their result. Where the clauses genuinely differ by pattern rather than by test, keep the patterns and lift only the comma-conjunctions.
D1 · Cyclomatic Complexity · riak_kv_wm_object.accept_doc_body (cyclomatic 18) · ×1
  • riak_kv_wm_object.accept_doc_body (cyclomatic 18) src/riak_kv_wm_object.erl:1072 — riak_kv_wm_object.accept_doc_body has cyclomatic complexity 18 (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 · riak_kv_replrtq_snk.handle_call (cyclomatic 17) · ×1
  • riak_kv_replrtq_snk.handle_call (cyclomatic 17) src/riak_kv_replrtq_snk.erl:269 — riak_kv_replrtq_snk.handle_call has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · riak_kv_wm_utils.multipart_encode_body (cyclomatic 16) · ×1
  • riak_kv_wm_utils.multipart_encode_body (cyclomatic 16) src/riak_kv_wm_utils.erl:112 — riak_kv_wm_utils.multipart_encode_body 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.
D15 · Churn × Complexity Hotspots · Hotspot · ×1
  • Hotspot: src/riak_kv_pb_object.erl src/riak_kv_pb_object.erl:112 — src/riak_kv_pb_object.erl changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 62 in riak_kv_pb_object.process at line 112. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 15:06:43 +00:00' --until='2026-11-12 15:06:43 +00:00' --full-history --no-merges -- src/riak_kv_pb_object.erl`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
D17 · Explicit Debt · XxxComment · ×1
  • XxxComment src/riak_kv_mapred_term.erl:162 — %% XXX this requires a 'blanket' mapreduce permission — 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.
D17 · Explicit Debt · XxxComment repeated across 11 files · ×1
  • XxxComment repeated across 11 files src/riak_kv_wm_bucket_type.erl:124 — The identical XxxComment appears in 11 files (11 occurrences) — almost certainly one boilerplate line from a single migration or decision, not 11 independent debts. Fix the systemic cause once rather than file-by-file. Text: "%% XXX 301 may be more appropriate here, but since the http and". Source code is not a task system: track the cleanup where tasks live. (Every occurrence still counts toward the score and metrics.)
D2 · Cognitive Complexity · riak_kv_pb_object.process (cognitive 54) · ×1
  • riak_kv_pb_object.process (cognitive 54) src/riak_kv_pb_object.erl:112 — riak_kv_pb_object.process has cognitive complexity 54 (threshold 15). Drivers by points: match/switch 31 (44 pts), loops 2 (8 pts), boolean chains 1, error handling 1 (nesting depth added 19). 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 · riak_kv_query_server.handle_info (cognitive 36) · ×1
  • riak_kv_query_server.handle_info (cognitive 36) src/riak_kv_query_server.erl:236 — riak_kv_query_server.handle_info has cognitive complexity 36 (threshold 15). Drivers by points: match/switch 20 (26 pts), boolean chains 10 (nesting depth added 6). 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 · riak_kv_pb_aaefold.process (cognitive 29) · ×1
  • riak_kv_pb_aaefold.process (cognitive 29) src/riak_kv_pb_aaefold.erl:74 — riak_kv_pb_aaefold.process has cognitive complexity 29 (threshold 15). Drivers by points: match/switch 29. 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 · riak_kv_put_fsm.validate (cognitive 29) · ×1
  • riak_kv_put_fsm.validate (cognitive 29) src/riak_kv_put_fsm.erl:350 — riak_kv_put_fsm.validate has cognitive complexity 29 (threshold 15). Drivers by points: match/switch 15 (24 pts), if/else 3, loops 2 (nesting depth added 9). 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 · riak_kv_eleveldb_backend.fold_keys_fun (cognitive 28) · ×1
  • riak_kv_eleveldb_backend.fold_keys_fun (cognitive 28) src/riak_kv_eleveldb_backend.erl:745 — riak_kv_eleveldb_backend.fold_keys_fun has cognitive complexity 28 (threshold 15). Drivers by points: match/switch 20 (25 pts), boolean chains 2, if/else 1 (nesting depth added 5). 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 · riak_kv_vnode.handle_aaefold (cognitive 26) · ×1
  • riak_kv_vnode.handle_aaefold (cognitive 26) src/riak_kv_vnode.erl:2076 — riak_kv_vnode.handle_aaefold has cognitive complexity 26 (threshold 15). Drivers by points: match/switch 20 (26 pts) (nesting depth added 6). 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 · riak_kv_tictacaae_cli.fold_query_arg (cognitive 25) · ×1
  • riak_kv_tictacaae_cli.fold_query_arg (cognitive 25) src/riak_kv_tictacaae_cli.erl:827 — riak_kv_tictacaae_cli.fold_query_arg has cognitive complexity 25 (threshold 15). Drivers by points: match/switch 10 (17 pts), error handling 5, loops 1 (3 pts) (nesting depth added 9). 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 · riak_kv_ttaaefs_manager.handle_cast (cognitive 24) · ×1
  • riak_kv_ttaaefs_manager.handle_cast (cognitive 24) src/riak_kv_ttaaefs_manager.erl:514 — riak_kv_ttaaefs_manager.handle_cast has cognitive complexity 24 (threshold 15). Drivers by points: match/switch 18 (23 pts), boolean chains 1 (nesting depth added 5). 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 · riak_kv_wm_query.malformed_request (cognitive 23) · ×1
  • riak_kv_wm_query.malformed_request (cognitive 23) src/riak_kv_wm_query.erl:285 — riak_kv_wm_query.malformed_request has cognitive complexity 23 (threshold 15). Drivers by points: match/switch 9 (19 pts), error handling 1 (3 pts), boolean chains 1 (nesting depth added 12). 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 · riak_kv_query.evaluate_query (cognitive 22) · ×1
  • riak_kv_query.evaluate_query (cognitive 22) src/riak_kv_query.erl:557 — riak_kv_query.evaluate_query has cognitive complexity 22 (threshold 15). Drivers by points: match/switch 10 (19 pts), boolean chains 3 (nesting depth added 9). 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 · riak_kv_wm_object.accept_doc_body (cognitive 22) · ×1
  • riak_kv_wm_object.accept_doc_body (cognitive 22) src/riak_kv_wm_object.erl:1072 — riak_kv_wm_object.accept_doc_body has cognitive complexity 22 (threshold 15). Drivers by points: match/switch 15 (21 pts), if/else 1 (nesting depth added 6). 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 · riak_kv_mrc_pipe.send_inputs (cognitive 20) · ×1
  • riak_kv_mrc_pipe.send_inputs (cognitive 20) src/riak_kv_mrc_pipe.erl:604 — riak_kv_mrc_pipe.send_inputs has cognitive complexity 20 (threshold 15). Drivers by points: match/switch 14 (15 pts), error handling 2, loops 1 (2 pts), boolean chains 1 (nesting depth added 2). 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 · riak_kv_mapred_json.parse_step (cognitive 19) · ×1
  • riak_kv_mapred_json.parse_step (cognitive 19) src/riak_kv_mapred_json.erl:394 — riak_kv_mapred_json.parse_step has cognitive complexity 19 (threshold 15). Drivers by points: match/switch 12 (19 pts) (nesting depth added 7). 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 · riak_kv_node_cli.node_repair_status_cmd (cognitive 18) · ×1
  • riak_kv_node_cli.node_repair_status_cmd (cognitive 18) src/riak_kv_node_cli.erl:104 — riak_kv_node_cli.node_repair_status_cmd has cognitive complexity 18 (threshold 15). Drivers by points: loops 5 (11 pts), match/switch 5 (7 pts) (nesting depth added 8). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · riak_kv_token_manager.handle_cast (cognitive 18) · ×1
  • riak_kv_token_manager.handle_cast (cognitive 18) src/riak_kv_token_manager.erl:299 — riak_kv_token_manager.handle_cast has cognitive complexity 18 (threshold 15). Drivers by points: match/switch 16 (18 pts) (nesting depth added 2). 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 · riak_kv_ensemble_backend.tick (cognitive 17) · ×1
  • riak_kv_ensemble_backend.tick (cognitive 17) src/riak_kv_ensemble_backend.erl:200 — riak_kv_ensemble_backend.tick has cognitive complexity 17 (threshold 15). Drivers by points: loops 3 (9 pts), match/switch 5 (8 pts) (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · riak_kv_mapred_json.parse_query (cognitive 17) · ×1
  • riak_kv_mapred_json.parse_query (cognitive 17) src/riak_kv_mapred_json.erl:276 — riak_kv_mapred_json.parse_query has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 9 (14 pts), boolean chains 2, if/else 1 (nesting depth added 5). 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 · riak_kv_mapred_json.parse_request (cognitive 17) · ×1
  • riak_kv_mapred_json.parse_request (cognitive 17) src/riak_kv_mapred_json.erl:41 — riak_kv_mapred_json.parse_request has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 7 (14 pts), boolean chains 2, error handling 1 (nesting depth added 7). 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 · riak_kv_mrc_pipe.send_key_list (cognitive 17) · ×1
  • riak_kv_mrc_pipe.send_key_list (cognitive 17) src/riak_kv_mrc_pipe.erl:715 — riak_kv_mrc_pipe.send_key_list has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 5 (7 pts), loops 2 (6 pts), error handling 2 (4 pts) (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 · riak_kv_tictacaae_cli.fold_cmd (cognitive 17) · ×1
  • riak_kv_tictacaae_cli.fold_cmd (cognitive 17) src/riak_kv_tictacaae_cli.erl:634 — riak_kv_tictacaae_cli.fold_cmd has cognitive complexity 17 (threshold 15). Drivers by points: loops 5 (10 pts), match/switch 5, error handling 1 (2 pts) (nesting depth added 6). 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 · riak_kv_app.check_kv_health (cognitive 16) · ×1
  • riak_kv_app.check_kv_health (cognitive 16) src/riak_kv_app.erl:325 — riak_kv_app.check_kv_health has cognitive complexity 16 (threshold 15). Drivers by points: if/else 2 (7 pts), loops 3 (6 pts), match/switch 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · riak_kv_bucket.validate (cognitive 16) · ×1
  • riak_kv_bucket.validate (cognitive 16) src/riak_kv_bucket.erl:251 — riak_kv_bucket.validate has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 11, boolean chains 5. 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 · riak_kv_get_core.final_action (cognitive 16) · ×1
  • riak_kv_get_core.final_action (cognitive 16) src/riak_kv_get_core.erl:347 — riak_kv_get_core.final_action has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 6, loops 3 (5 pts), if/else 1 (3 pts), boolean chains 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · riak_kv_vnode.aae_update (cognitive 16) · ×1
  • riak_kv_vnode.aae_update (cognitive 16) src/riak_kv_vnode.erl:4121 — riak_kv_vnode.aae_update has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 11 (15 pts), boolean chains 1 (nesting depth added 4). 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 · riak_kv_vnode.handle_info (cognitive 16) · ×1
  • riak_kv_vnode.handle_info (cognitive 16) src/riak_kv_vnode.erl:2891 — riak_kv_vnode.handle_info has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 12 (15 pts), boolean chains 1 (nesting depth added 3). 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 · riak_kv_wm_query.make_query_request (cognitive 16) · ×1
  • riak_kv_wm_query.make_query_request (cognitive 16) src/riak_kv_wm_query.erl:529 — riak_kv_wm_query.make_query_request has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 9 (16 pts) (nesting depth added 7). 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.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D4 · Code Duplication · Members sharing a duplicated core (8 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (8 members, 50+ identical tokens) src/riak_kv_wm_bucket_type.erl:117 — src/riak_kv_wm_bucket_type.erl:117-130 | src/riak_kv_wm_buckets.erl:112-125 | src/riak_kv_wm_counter.erl:158-171 | src/riak_kv_wm_index.erl:128-141 | src/riak_kv_wm_keylist.erl:119-132 | src/riak_kv_wm_object.erl:388-401 | src/riak_kv_wm_props.erl:144-157 | src/riak_kv_wm_query.erl:227-247 — These 8 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 8 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 8 times.
D4 · Code Duplication · Edited copy of a member (73 corresponding lines) · ×1
  • Edited copy of a member (73 corresponding lines) src/riak_kv_wm_counter.erl:356 — src/riak_kv_wm_counter.erl:356-428 | src/riak_kv_wm_object.erl:1659-1746 — 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 (52 corresponding lines) · ×1
  • Edited copy of a member (52 corresponding lines) src/riak_kv_pipe_index.erl:167 — src/riak_kv_pipe_index.erl:167-218 | src/riak_kv_pipe_listkeys.erl:162-224 — These two members are one piece of code written twice and then edited apart: 52 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (39 corresponding lines) · ×1
  • Edited copy of a member (39 corresponding lines) src/riak_kv_delete.erl:119 — src/riak_kv_delete.erl:119-157 | src/riak_kv_delete.erl:159-201 — These two members are one piece of code written twice and then edited apart: 39 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (25 corresponding lines) · ×1
  • Edited copy of a member (25 corresponding lines) src/riak_kv_wm_json.erl:404 — src/riak_kv_wm_json.erl:404-431 | src/riak_kv_wm_json.erl:453-477 — 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, 20+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 20+ corresponding lines) src/riak_kv_crdt_json.erl:216 — src/riak_kv_crdt_json.erl:216-235 | src/riak_kv_crdt_json.erl:238-259 | src/riak_kv_crdt_json.erl:262-282 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 20 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (37 corresponding lines) · ×1
  • Edited copy of a member (37 corresponding lines) src/riak_kv_multi_backend.erl:147 — src/riak_kv_multi_backend.erl:147-183 | src/riak_kv_multi_prefix_backend.erl:179-220 — These two members are one piece of code written twice and then edited apart: 37 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 32+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 32+ corresponding lines) src/riak_kv_bitcask_backend.erl:293 — src/riak_kv_bitcask_backend.erl:293-329 | src/riak_kv_bitcask_backend.erl:340-371 | src/riak_kv_bitcask_backend.erl:382-413 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 32 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 22+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 22+ corresponding lines) src/riak_kv_tictacaae_cli.erl:126 — src/riak_kv_tictacaae_cli.erl:126-148 | src/riak_kv_tictacaae_cli.erl:168-190 | src/riak_kv_tictacaae_cli.erl:210-231 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 22 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 13+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 13+ corresponding lines) src/riak_kv_mrc_sink.erl:215 — src/riak_kv_mrc_sink.erl:215-227 | src/riak_kv_mrc_sink.erl:242-255 | src/riak_kv_mrc_sink.erl:257-270 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 9+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 9+ corresponding lines) src/riak_kv_wm_json.erl:433 — src/riak_kv_wm_json.erl:433-441 | src/riak_kv_wm_json.erl:896-904 | src/riak_kv_wm_json.erl:939-947 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (31 corresponding lines) · ×1
  • Edited copy of a member (31 corresponding lines) src/riak_kv_multi_backend.erl:524 — src/riak_kv_multi_backend.erl:524-555 | src/riak_kv_multi_prefix_backend.erl:556-586 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 19+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 19+ corresponding lines) src/riak_kv_wm_object.erl:631 — src/riak_kv_wm_object.erl:631-650 | src/riak_kv_wm_object.erl:664-682 | src/riak_kv_wm_object.erl:687-707 — 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 copies of one member (4 members, 12+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 12+ corresponding lines) src/riak_kv_wm_bucket_type.erl:104 — src/riak_kv_wm_bucket_type.erl:104-115 | src/riak_kv_wm_buckets.erl:94-110 | src/riak_kv_wm_keylist.erl:98-117 | src/riak_kv_wm_query.erl:202-220 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 11+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 11+ corresponding lines) src/riak_client.erl:335 — src/riak_client.erl:335-356 | src/riak_client.erl:470-488 | src/riak_client.erl:577-587 | src/riak_client.erl:672-682 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (20 corresponding lines) · ×1
  • Edited copy of a member (20 corresponding lines) src/riak_kv_console.erl:140 — src/riak_kv_console.erl:140-159 | src/riak_kv_console.erl:161-183 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 7+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 7+ corresponding lines) src/riak_kv_wm_json.erl:396 — src/riak_kv_wm_json.erl:396-402 | src/riak_kv_wm_json.erl:445-451 | src/riak_kv_wm_json.erl:863-869 | src/riak_kv_wm_json.erl:906-912 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 16+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 16+ corresponding lines) src/riak_kv_wm_aaefold.erl:364 — src/riak_kv_wm_aaefold.erl:364-382 | src/riak_kv_wm_aaefold.erl:389-405 | src/riak_kv_wm_aaefold.erl:578-594 | src/riak_kv_wm_aaefold.erl:620-635 — 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 (3 members, 11+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 11+ corresponding lines) src/riak_kv_wm_aaefold.erl:412 — src/riak_kv_wm_aaefold.erl:412-422 | src/riak_kv_wm_aaefold.erl:554-571 | src/riak_kv_wm_aaefold.erl:602-614 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 9+ corresponding lines) · ×1
  • Edited copies of one member (5 members, 9+ corresponding lines) src/riak_kv_buckets_fsm_sup.erl:33 — src/riak_kv_buckets_fsm_sup.erl:33-41 | src/riak_kv_clusteraae_fsm_sup.erl:34-42 | src/riak_kv_index_fsm_sup.erl:34-42 | src/riak_kv_keys_fsm_sup.erl:33-41 | src/riak_kv_query_sup.erl:34-42 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (25–26 lines × 2) · ×1
  • Duplicated block (25–26 lines × 2) src/riak_kv_multi_backend.erl:530 — src/riak_kv_multi_backend.erl:530-555 | src/riak_kv_multi_prefix_backend.erl:562-586 — before extracting anything, compare `src/riak_kv_multi_backend.erl` and `src/riak_kv_multi_prefix_backend.erl` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 283 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 `src/riak_kv_multi_backend.erl:530` 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 (24 lines × 2) · ×1
  • Duplicated block (24 lines × 2) src/riak_kv_index_fsm.erl:271 — src/riak_kv_index_fsm.erl:271-294 | src/riak_kv_query_server.erl:676-699 — 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 `src/riak_kv_query_server.erl:676` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (22 lines × 2) · ×1
  • Duplicated block (22 lines × 2) src/riak_kv_multi_backend.erl:149 — src/riak_kv_multi_backend.erl:149-170 | src/riak_kv_multi_prefix_backend.erl:183-204 — before extracting anything, compare `src/riak_kv_multi_backend.erl` and `src/riak_kv_multi_prefix_backend.erl` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 283 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (14–21 lines × 8) · ×1
  • Duplicated block (14–21 lines × 8) src/riak_kv_wm_bucket_type.erl:117 — src/riak_kv_wm_bucket_type.erl:117-130 | src/riak_kv_wm_buckets.erl:112-125 | src/riak_kv_wm_counter.erl:158-171 | src/riak_kv_wm_index.erl:128-141 | src/riak_kv_wm_keylist.erl:119-132 | src/riak_kv_wm_object.erl:388-401 | src/riak_kv_wm_props.erl:144-157 | src/riak_kv_wm_query.erl:227-247 — before extracting anything, compare `src/riak_kv_wm_bucket_type.erl` and `src/riak_kv_wm_props.erl` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 42 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/riak_kv_wm_bucket_type.erl:117` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (20 lines × 2) · ×1
  • Duplicated block (20 lines × 2) src/riak_kv_multi_backend.erl:615 — src/riak_kv_multi_backend.erl:615-634 | src/riak_kv_multi_prefix_backend.erl:621-640 — before extracting anything, compare `src/riak_kv_multi_backend.erl` and `src/riak_kv_multi_prefix_backend.erl` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 283 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (19 lines × 2) · ×1
  • Duplicated block (19 lines × 2) src/riak_kv_multi_backend.erl:186 — src/riak_kv_multi_backend.erl:186-204 | src/riak_kv_multi_prefix_backend.erl:223-241 — before extracting anything, compare `src/riak_kv_multi_backend.erl` and `src/riak_kv_multi_prefix_backend.erl` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 283 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (18 lines × 4) · ×1
  • Duplicated block (18 lines × 4) src/riak_kv_wm_aaefold.erl:459 — src/riak_kv_wm_aaefold.erl:459-476 | src/riak_kv_wm_aaefold.erl:489-506 | src/riak_kv_wm_aaefold.erl:520-537 | src/riak_kv_wm_aaefold.erl:642-659 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (17–18 lines × 2) · ×1
  • Duplicated block (17–18 lines × 2) src/riak_kv_token_manager.erl:354 — src/riak_kv_token_manager.erl:354-371 | src/riak_kv_token_manager.erl:407-423 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/riak_kv_token_manager.erl:354` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/riak_kv_token_manager.erl:404` calls `cast` and `src/riak_kv_token_manager.erl:353` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (17 lines × 3) · ×1
  • Duplicated block (17 lines × 3) src/riak_kv_wm_aaefold.erl:183 — src/riak_kv_wm_aaefold.erl:183-199 | src/riak_kv_wm_queue.erl:109-125 | src/riak_kv_wm_stats.erl:58-74 — 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 `src/riak_kv_wm_queue.erl:109` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (11–17 lines × 2) · ×1
  • Duplicated block (11–17 lines × 2) src/riak_kv_wm_query.erl:204 — src/riak_kv_wm_query.erl:204-220 | src/riak_kv_wm_queue.erl:97-107 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/riak_kv_wm_queue.erl:97` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (10–15 lines × 3) · ×1
  • Duplicated block (10–15 lines × 3) src/riak_kv_vnode.erl:2333 — src/riak_kv_vnode.erl:2333-2342 | src/riak_kv_vnode.erl:2364-2373 | src/riak_kv_vnode.erl:2413-2427 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (15 lines × 3) · ×1
  • Duplicated block (15 lines × 3) src/riak_kv_vnode.erl:2347 — src/riak_kv_vnode.erl:2347-2361 | src/riak_kv_vnode.erl:2396-2410 | src/riak_kv_vnode.erl:2449-2463 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (10–15 lines × 2) · ×1
  • Duplicated block (10–15 lines × 2) src/riak_kv_wm_bucket_type.erl:106 — src/riak_kv_wm_bucket_type.erl:106-115 | src/riak_kv_wm_buckets.erl:96-110 — 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 `src/riak_kv_wm_bucket_type.erl:106` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (15 lines × 2) · ×1
  • Duplicated block (15 lines × 2) src/riak_kv_wm_index.erl:152 — src/riak_kv_wm_index.erl:152-166 | src/riak_kv_wm_query.erl:256-270 — before extracting anything, compare `src/riak_kv_wm_index.erl` and `src/riak_kv_wm_query.erl` 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. 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 `src/riak_kv_wm_index.erl:152` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (13–14 lines × 3) · ×1
  • Duplicated block (13–14 lines × 3) src/riak_kv_replrtq_src.erl:456 — src/riak_kv_replrtq_src.erl:456-468 | src/riak_kv_replrtq_src.erl:483-495 | src/riak_kv_replrtq_src.erl:510-523 — 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 `src/riak_kv_replrtq_src.erl:456` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (11–14 lines × 3) · ×1
  • Duplicated block (11–14 lines × 3) src/riak_kv_wm_buckets.erl:186 — src/riak_kv_wm_buckets.erl:186-196 | src/riak_kv_wm_keylist.erl:195-205 | src/riak_kv_wm_object.erl:558-571 — before extracting anything, compare `src/riak_kv_wm_buckets.erl` and `src/riak_kv_wm_keylist.erl` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 72 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (2–14 lines × 3) · ×1
  • Duplicated block (2–14 lines × 3) src/riak_kv_pb_aaefold.erl:107 — src/riak_kv_pb_aaefold.erl:107-108 | src/riak_kv_pb_aaefold.erl:185-198 | src/riak_kv_pb_aaefold.erl:204-217 — 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 `src/riak_kv_pb_aaefold.erl:185` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (13 lines × 4) · ×1
  • Duplicated block (13 lines × 4) src/riak_kv_wm_buckets.erl:140 — src/riak_kv_wm_buckets.erl:140-152 | src/riak_kv_wm_index.erl:159-171 | src/riak_kv_wm_keylist.erl:148-160 | src/riak_kv_wm_query.erl:263-275 — before extracting anything, compare `src/riak_kv_wm_buckets.erl` and `src/riak_kv_wm_index.erl` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (12–13 lines × 2) · ×1
  • Duplicated block (12–13 lines × 2) src/riak_kv_ensemble_console.erl:425 — src/riak_kv_ensemble_console.erl:425-436 | src/riak_kv_ensemble_console.erl:452-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 `src/riak_kv_ensemble_console.erl:425` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (11–13 lines × 2) · ×1
  • Duplicated block (11–13 lines × 2) src/riak_kv_wm_counter.erl:247 — src/riak_kv_wm_counter.erl:247-257 | src/riak_kv_wm_object.erl:637-649 — before extracting anything, compare `src/riak_kv_wm_counter.erl` and `src/riak_kv_wm_object.erl` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 61 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (10–11 lines × 3) · ×1
  • Duplicated block (10–11 lines × 3) src/riak_kv_wm_counter.erl:140 — src/riak_kv_wm_counter.erl:140-149 | src/riak_kv_wm_keylist.erl:107-117 | src/riak_kv_wm_props.erl:132-142 — before extracting anything, compare `src/riak_kv_wm_counter.erl` and `src/riak_kv_wm_props.erl` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 61 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (6–11 lines × 3) · ×1
  • Duplicated block (6–11 lines × 3) src/riak_kv_wm_aaefold.erl:171 — src/riak_kv_wm_aaefold.erl:171-181 | src/riak_kv_wm_index.erl:116-126 | src/riak_kv_wm_keylist.erl:99-104 — before extracting anything, compare `src/riak_kv_wm_index.erl` and `src/riak_kv_wm_keylist.erl` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 45 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 `src/riak_kv_wm_index.erl: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.
D4 · Code Duplication · Duplicated block (10–11 lines × 2) · ×1
  • Duplicated block (10–11 lines × 2) src/riak_kv_wm_counter.erl:128 — src/riak_kv_wm_counter.erl:128-137 | src/riak_kv_wm_props.erl:124-134 — before extracting anything, compare `src/riak_kv_wm_counter.erl` and `src/riak_kv_wm_props.erl` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 61 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (8–10 lines × 2) · ×1
  • Duplicated block (8–10 lines × 2) src/riak_kv_eleveldb_backend.erl:227 — src/riak_kv_eleveldb_backend.erl:227-236 | src/riak_kv_eleveldb_backend.erl:359-366 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/riak_kv_eleveldb_backend.erl:239` calls `is_tuple`, `element` and `src/riak_kv_eleveldb_backend.erl:367` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (9–10 lines × 2) · ×1
  • Duplicated block (9–10 lines × 2) src/riak_kv_wm_counter.erl:230 — src/riak_kv_wm_counter.erl:230-239 | src/riak_kv_wm_crdt.erl:212-220 — before extracting anything, compare `src/riak_kv_wm_counter.erl` and `src/riak_kv_wm_crdt.erl` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 31 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (6 lines × 5) · ×1
  • Duplicated block (6 lines × 5) src/riak_kv_pb_aaefold.erl:256 — src/riak_kv_pb_aaefold.erl:256-261 | src/riak_kv_pb_csbucket.erl:137-142 | src/riak_kv_pb_index.erl:238-243 | src/riak_kv_pb_object.erl:627-632 | src/riak_kv_wm_utils.erl:487-492 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 5 call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (6 lines × 3) · ×1
  • Duplicated block (6 lines × 3) src/riak_kv_pb_counter.erl:171 — src/riak_kv_pb_counter.erl:171-176 | src/riak_kv_pb_crdt.erl:234-239 | src/riak_kv_pb_object.erl:607-612 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (6 lines × 4) · ×1
  • Duplicated block (6 lines × 4) src/riak_kv_clusteraae_fsm_sup.erl:51 — src/riak_kv_clusteraae_fsm_sup.erl:51-57 | src/riak_kv_hotbackup_fsm_sup.erl:46-52 | src/riak_kv_index_fsm_sup.erl:51-56 | src/riak_kv_keys_fsm_sup.erl:50-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 all 4 call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (7 lines × 3) · ×1
  • Duplicated block (7 lines × 3) src/riak_kv_ensemble_console.erl:474 — src/riak_kv_ensemble_console.erl:474-480 | src/riak_kv_ensemble_console.erl:483-489 | src/riak_kv_ensemble_console.erl:492-498 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/riak_kv_ensemble_console.erl:474` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
ED1 · Handler temporal coupling · Handler temporal coupling · ×1
  • Handler temporal coupling: riak_kv_2i_aae clause `wait_for_index_scan/4#425` src/riak_kv_2i_aae.erl:414 — `riak_kv_2i_aae` clause `wait_for_index_scan/4#425` blocks the process on a synchronous `timer:sleep` while handling a message — the process is blocked (holding its mailbox) until a peer replies or the sleep elapses. That couples this handler in real time to another process being up and fast, and a mutual call can DEADLOCK. To decouple, move the delay off the hot path (a `state_timeout`/`send_after` self-message, or do the settle in a spawned worker).
Minor — 103 finding(s)
D34 · Knowledge Freshness · Orphaned file · ×79
  • Orphaned file src/riak_kv_mrc_pipe.erl:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/riak_kv_entropy_manager.erl:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/riak_kv_eleveldb_backend.erl:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file eqc/ec_eqc.erl:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/riak_kv_bitcask_backend.erl:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file eqc/put_fsm_eqc.erl:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/riak_kv_memory_backend.erl:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/riak_kv_crdt_json.erl:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/riak_kv_mapred_json.erl:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/riak_kv_2i_aae.erl:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/riak_kv_crdt.erl:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/riak_index.erl:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/riak_kv_env.erl:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/riak_kv_vnode_status_mgr.erl:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file eqc/backend_eqc.erl:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/riak_kv_wm_crdt.erl:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/riak_kv_put_core.erl:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/riak_kv_ensemble_console.erl:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/riak_kv_wm_utils.erl:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/riak_kv_wm_link_walker.erl:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/riak_kv_exchange_fsm.erl:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/riak_kv_yessir_backend.erl:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/riak_kv_wm_counter.erl:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/riak_kv_mrc_sink.erl:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file eqc/kv679_eqc.erl:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • + 54 more in this group — see findings.md.
X31 · Test-only surface in a production module · Test-only surface in a production module · ×9
  • Test-only surface in a production module src/json_pp.erl:28 — `json_pp:test/0` is exported unconditionally and its name IS the test marker, so the shipped module publishes a function named for the test tree. No other module in this repository calls it at any arity. Erlang has no visibility below `-export`, so this is part of the module's public contract: it cannot be changed without a compatibility argument. Nothing tells the next maintainer that its only caller is a test. Wrapping the attribute in `-ifdef(TEST). … -endif.` keeps the test's access and removes it from the shipped module.
  • Test-only surface in a production module src/riak.erl:26 — `riak:client_test/1` is exported unconditionally and its name carries a test marker at a name-segment boundary, so the shipped module publishes a function named for the test tree. No other module in this repository calls it at any arity. Erlang has no visibility below `-export`, so this is part of the module's public contract: it cannot be changed without a compatibility argument. Nothing tells the next maintainer that its only caller is a test. Wrapping the attribute in `-ifdef(TEST). … -endif.` keeps the test's access and removes it from the shipped module.
  • Test-only surface in a production module src/riak_kv_memory_backend.erl:61 — `riak_kv_memory_backend:reset/0` is exported unconditionally, and the comment directly above the `-export` on this line says the exports below it are for testing. Erlang has no visibility below `-export`, so this is part of the module's public contract: it cannot be changed without a compatibility argument. This arm read the comment, not the call graph: if the comment is right and only tests call it, wrapping the attribute in `-ifdef(TEST). … -endif.` keeps the test's access and removes it from the shipped module. If production code calls it, the comment is stale and wrapping the export would break the build — delete the comment and document the function as part of the module's API.
  • Test-only surface in a production module src/riak_kv_mrc_pipe.erl:138 — `riak_kv_mrc_pipe:example/0` is exported unconditionally, and the comment directly above the `-export` on this line says the exports below it are for testing. Erlang has no visibility below `-export`, so this is part of the module's public contract: it cannot be changed without a compatibility argument. This arm read the comment, not the call graph: if the comment is right and only tests call it, wrapping the attribute in `-ifdef(TEST). … -endif.` keeps the test's access and removes it from the shipped module. If production code calls it, the comment is stale and wrapping the export would break the build — delete the comment and document the function as part of the module's API.
  • Test-only surface in a production module src/riak_kv_mrc_pipe.erl:138 — `riak_kv_mrc_pipe:example_bucket/0` is exported unconditionally, and the comment directly above the `-export` on this line says the exports below it are for testing. Erlang has no visibility below `-export`, so this is part of the module's public contract: it cannot be changed without a compatibility argument. This arm read the comment, not the call graph: if the comment is right and only tests call it, wrapping the attribute in `-ifdef(TEST). … -endif.` keeps the test's access and removes it from the shipped module. If production code calls it, the comment is stale and wrapping the export would break the build — delete the comment and document the function as part of the module's API.
  • Test-only surface in a production module src/riak_kv_mrc_pipe.erl:138 — `riak_kv_mrc_pipe:example_reduce/0` is exported unconditionally, and the comment directly above the `-export` on this line says the exports below it are for testing. Erlang has no visibility below `-export`, so this is part of the module's public contract: it cannot be changed without a compatibility argument. This arm read the comment, not the call graph: if the comment is right and only tests call it, wrapping the attribute in `-ifdef(TEST). … -endif.` keeps the test's access and removes it from the shipped module. If production code calls it, the comment is stale and wrapping the export would break the build — delete the comment and document the function as part of the module's API.
  • Test-only surface in a production module src/riak_kv_mrc_pipe.erl:138 — `riak_kv_mrc_pipe:example_setup/0` is exported unconditionally, and the comment directly above the `-export` on this line says the exports below it are for testing. Erlang has no visibility below `-export`, so this is part of the module's public contract: it cannot be changed without a compatibility argument. This arm read the comment, not the call graph: if the comment is right and only tests call it, wrapping the attribute in `-ifdef(TEST). … -endif.` keeps the test's access and removes it from the shipped module. If production code calls it, the comment is stale and wrapping the export would break the build — delete the comment and document the function as part of the module's API.
  • Test-only surface in a production module src/riak_kv_mrc_pipe.erl:138 — `riak_kv_mrc_pipe:example_setup/1` is exported unconditionally, and the comment directly above the `-export` on this line says the exports below it are for testing. Erlang has no visibility below `-export`, so this is part of the module's public contract: it cannot be changed without a compatibility argument. This arm read the comment, not the call graph: if the comment is right and only tests call it, wrapping the attribute in `-ifdef(TEST). … -endif.` keeps the test's access and removes it from the shipped module. If production code calls it, the comment is stale and wrapping the export would break the build — delete the comment and document the function as part of the module's API.
  • Test-only surface in a production module src/riak_kv_vnode.erl:33 — `riak_kv_vnode:test_vnode/1` is exported unconditionally and its name carries a test marker at a name-segment boundary, so the shipped module publishes a function named for the test tree. No other module in this repository calls it at any arity. Erlang has no visibility below `-export`, so this is part of the module's public contract: it cannot be changed without a compatibility argument. Nothing tells the next maintainer that its only caller is a test. Wrapping the attribute in `-ifdef(TEST). … -endif.` keeps the test's access and removes it from the shipped module.
X10 · Duplicated predicate · Duplicated predicate · ×4
  • Duplicated predicate src/riak_kv_mapred_json.erl:477 — `is_binary(Bucket) andalso is_binary(Key)` appears character-identically in 2 files — src/riak_kv_mapred_json.erl, src/riak_kv_wm_utils.erl. 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 src/riak_kv_mapred_json.erl:474 — `is_binary(Source) orelse is_list(Source)` appears character-identically in 2 files — src/riak_kv_mapred_json.erl, src/riak_kv_mrc_map.erl. 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 src/riak_kv_pb_csbucket.erl:101 — `is_integer(MaxResults) andalso Count >= MaxResults` appears character-identically in 2 files — src/riak_kv_pb_csbucket.erl, src/riak_kv_pb_index.erl. 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 eqc/replrtq_eqc.erl:87 — `is_pid(Res) andalso is_process_alive(Res)` appears character-identically in 2 files — eqc/replrtq_eqc.erl, eqc/replrtq_snk_eqc.erl. 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.
D34 · Knowledge Freshness · Most significant orphaned file · ×3
  • Most significant orphaned file src/riak_kv_bucket.erl:1 — One of the orphaned files carrying the most lost knowledge — ranked by size weighted by the file's role in the codebase, the same weighting behind the score above, so core code outranks equally large plumbing. A reasonable place to start a read-through before the aggregate risk above bites.
  • Most significant orphaned file src/riak_kv_wm_aaefold.erl:1 — One of the orphaned files carrying the most lost knowledge — ranked by size weighted by the file's role in the codebase, the same weighting behind the score above, so core code outranks equally large plumbing. A reasonable place to start a read-through before the aggregate risk above bites.
  • Most significant orphaned file src/riak_kv_index_hashtree.erl:1 — One of the orphaned files carrying the most lost knowledge — ranked by size weighted by the file's role in the codebase, the same weighting behind the score above, so core code outranks equally large plumbing. A reasonable place to start a read-through before the aggregate risk above bites.
D16 · Bus Factor · Off-boarding risk · ×1
  • Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 9 significant file(s) lose their only recent owner: src/riak_object.erl, src/riak_kv_ttaaefs_manager.erl, src/riak_kv_wm_object.erl, src/riak_kv_wm_query.erl, src/riak_kv_replrtq_snk.erl, src/riak_kv_query.erl, src/riak_kv_util.erl, eqc/replrtq_snk_eqc.erl (+1 more). Pair on, review, or document these before any departure.
D16 · Bus Factor · Further sole-owners (lower concentration) · ×1
  • Further sole-owners (lower concentration) — 3 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold — folded into the bus-factor score and metrics (14 single-owned of 96 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 96 of the 163 production source files in this repository met that bar). They are anonymized user #2 (2 file(s)), anonymized user #3 (2 file(s)), anonymized user #4 (1 file(s)) — spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: src/riak_kv_tictacaae_cli.erl, src/riak_kv_node_cli.erl, src/riak_kv_env.erl, src/riak_kv_vnode_status_mgr.erl, src/riak_kv_multi_prefix_backend.erl.
D26 · Project Cohesion · Projects may be oversized for their cohesion · ×1
  • Projects may be oversized for their cohesion — 1 of 2 project(s) overshoot their size bounds, lowering Project Cohesion to 0.0/10. The most over is `(repository root)` (70483 LoC, 162 module-visible types across 3 directories). Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
D28 · Secrets (history) · Rotate the exposed credentials · ×1
  • REDACTED
D34 · Knowledge Freshness · Concentrated knowledge decay · ×1
  • Concentrated knowledge decay — 82 of 137 significant files have no living knowledge, while the repository is still being changed at a low rate (18 commit(s) in the last 90 days) — so this is one repo-wide knowledge-decay state, not 82 separate risks. Counted over 137 of the 163 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over. The code moved on without the people who understood these files: document them or schedule a read-through before the next change lands in them.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
M2 · Architecture documentation · ADRs not easily discoverable · ×1
  • ADRs not easily discoverable — 1 ADR-shaped document(s) detected by content — `docs/InitialDesignDecisions.md`. They are not under a conventional ADR folder (docs/adr/) and are not named NNNN-title.md, and this check found them by their decision signature rather than by where they live — so a reader who does not already know these paths has no route to them. Detected by content signature only: records kept outside the repository, or written without a Status/Decision/Consequences shape, are not visible to this check and are not counted here.
P6 · Release Hygiene · No changelog · ×1
  • No changelog — No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)
Minor — 1 finding(s)
D12 · Dependency Hygiene · Outdated · ×1
  • Outdated: jekyll-relative-links — `jekyll-relative-links` is resolved to 0.7.0 in the committed Gemfile.lock but 0.9.2 is the current release on rubygems.org, and docs/Gemfile declares no version requirement for it, so nothing but the lockfile is holding it back. This build is therefore missing every fix published since, including any security fix. Run `bundle update jekyll-relative-links` and commit the updated Gemfile.lock.

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 --report-format json --report-path /tmp/watchdog-gitleaks-6308d77b6881481ba104a156275ff764/history.json --exit-code 0 --source .1artifacts/raw/gitleaks-history.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-6308d77b6881481ba104a156275ff764/tree.json --exit-code 0 --source .0artifacts/raw/gitleaks-tree.json
D29 · Static Analysis (SAST)semgrep—semgrep --config /opt/semgrep-rules/security-audit.yml --config /opt/semgrep-rules/owasp-top-ten.yml --config /opt/semgrep-rules/canine-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off --exclude *.arrow --exclude *.avro --exclude *.csv --exclude *.dat --exclude *.db --exclude *.feather --exclude *.geojson --exclude *.h5 --exclude *.hdf5 --exclude *.jsonl --exclude *.log --exclude *.ndjson --exclude *.npy --exclude *.npz --exclude *.orc --exclude *.parquet --exclude *.pickle --exclude *.pkl --exclude *.psv --exclude *.sqlite --exclude *.sqlite3 --exclude *.tfrecord --exclude *.tsv --exclude *.txt .17artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiesosv-scanner—osv-scanner --format json --recursive --experimental-disable-plugins transitivedependency/requirements --experimental-disable-plugins dotnet/csproj --experimental-disable-plugins dotnet/nugetcpm .0artifacts/raw/osv-scanner.json
D31 · IaC & Container Securitytrivy—trivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.0—
D32 · Data Compliance (PII/GDPR)semgrep—semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that.0—
D37 · Vulnerability-disclosure Policydisclosure—disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.0—
D40 · Network Egress Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.0—
D41 · Kernel & Syscall Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.0—
D42 · Runtime Threat Enforcementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.0—
D43 · Malicious Dependenciesosv-scanner—osv-scanner --format json --recursive --experimental-disable-plugins transitivedependency/requirements --experimental-disable-plugins dotnet/csproj --experimental-disable-plugins dotnet/nugetcpm .0artifacts/raw/osv-scanner.json

Run 01a1de34-c65c-7fa5-b19a-12c74cdc00cf · 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