Public report of apache/couchdb, published 10 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 reportMeasured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.11.2). 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, 10 November 2026, 09:50 UTC · Survey ID cd_acc155f71c9740bcbe6cf38e483f0e06
apache/couchdb
Measured 10 November 2026, 09:50 UTC, at code version f83dd8d
Dependency hygiene is not measured: Mix pinning read, dependency currency not (Hex registry unreachable).
CAI scoreWeak
CriticalWeakAdequateStrongExemplary
No change 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 large codebase: 135,418 lines of product code in 33 projects, tests not counted · Estimated rebuild effort: about 1.3 person-years · Weakest lens: Code Health, 38
Findings by how serious they are
58 critical516 serious71 minor
16 dimensions are left out of the score. For each one, we either couldn't measure it in this code, or found no evidence of the safeguard we look for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.
This survey was produced by
Canine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
10 November 2026, 09:50 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 ▸
60of 60 dimensions measured by tools.
634of 645 findings point to an exact file and line, so you can open each one in the code. The other 11 concern the repository as a whole, such as missing documentation.
60dimensions across 7 lenses, read from 135,418 lines of product code in 33 projects.
apache/couchdb falls short of our standard for production, held back most by its Code Health lens, the quality of the code itself. It scores 47 out of 100 and is rated Weak, and 54 of its 58 critical findings are security problems.
Code Health, at 38, is the weakest lens and counts most in the score. The best first step for the work it takes is fixing the password or key in the code, worth about 4 points. Adding type checking would lift Code Health itself, worth about 5 points. Raising Code Health to 70 would lift the score to about 54.
Forty-two passwords or keys in the code's history and one in the code are open to anyone who can read the repository. Six weaknesses in the code could be used by an attacker, and four pipeline steps REDACTED downloads nobody checks. Replacing each exposed password or key, fixing the weaknesses the scanner points to and checking each download against a checksum would close these risks. The place where the code runs text as code or as a command needs a direct call instead. The four parts of the code nobody has worked on for a long time need someone to learn and document them before anyone changes them.
The product code is 135,418 lines, about €200,000 to rebuild.
A lens is capped at Adequate while one of its dimensions scores below 4 out of 10, however well the rest of the lens does. That way a serious problem in one place always shows in the lens's rating.
How the score is built: what each lens counts forThe 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.
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: 199 findings
These 199 critical or serious findings were in the previous survey, on 23 October 2026, and are gone from this one. The first 100 are listed here.
Code Duplication · Edited copy of a member (16 corresponding lines) src/mango/src/mango_idx_nouveau.erl
Large Files · _build/default/src/fauxton/app/addons/components/components/ace-worker-mango.js: 1563 lines of code _build/default/src/fauxton/app/addons/components/components/ace-worker-mango.js
Large Files · _build/default/src/fauxton/app/addons/databases/components.js: 494 lines of code _build/default/src/fauxton/app/addons/databases/components.js
Test Coverage · No test reaches this file _build/default/src/fauxton/app/addons/replication/reducers.js
Test Coverage · No test reaches this file share/server/render.js
Test Coverage · No test reaches this file _build/default/src/fauxton/app/addons/setup/actions.js
Test Coverage · No test reaches this file _build/default/src/fauxton/app/addons/replication/controller.js
Test Coverage · No test reaches this file _build/default/src/fauxton/tasks/fauxton.js
Test Coverage · No test reaches this file share/server/util.js
Test Coverage · No test reaches this file share/server/dispatch-quickjs.js
Test Coverage · No test reaches this file share/server/loop.js
Test Coverage · No test reaches this file _build/default/src/fauxton/app/addons/setup/components/MultipleNodeController.js
Test Coverage · No test reaches this file _build/default/src/fauxton/app/addons/verifyinstall/resources.js
Test Coverage · No test reaches this file share/server/mimeparse.js
Test Coverage · No test reaches this file _build/default/src/fauxton/app/addons/replication/container.js
Test Coverage · No test reaches this file share/server/views.js
Test Coverage · No test reaches this file _build/default/src/fauxton/app/addons/setup/reducers.js
Test Coverage · No test reaches this file _build/default/src/fauxton/devserver.js
Test Coverage · No test reaches this file _build/default/src/fauxton/app/addons/activetasks/components/tablebodycontents.js
Test Coverage · No test reaches this file _build/default/src/fauxton/app/addons/fauxton/appwrapper.js
Test Coverage · No test reaches this file _build/default/src/fauxton/app/addons/documents/rev-browser/rev-browser.stores.js
Test Coverage · No test reaches this file _build/default/src/fauxton/app/addons/replication/components/replicate-activity.js
Rebuild cost: about €200,000 · Estimate
Cost to rebuild
€65,000 to €330,000, for 1,086 to 3,447 hours of work, about 1.3 person-years for 1 to 3 engineers
Difficulty of the problem
Standard, 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 47. 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.
Size
Large: 135,418 lines of product code
What it is not
Not a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.
How the estimate is made: We price the hours a team would need to write this code again, at €60 to €95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty. For this code, every line is priced as straight logic, which keeps the estimate on the low side.
Top priorities
The three actions that raise the score most for the work they take. The full ranked list is in the Roadmap.
1
Resolve the 1 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED.
Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up.
Raises the score by about 5 points · Medium effort · Type Safety
3
Declare the default where Java declares it: `@NullMarked` (org.jspecify.annotations) in each package's `package-info.java`, or once in `module-info.java`, and REDACTED NullAway (Error Prone) or the Checker Framework so the declaration is enforced.
Then annotate the real exceptions `@Nullable` and resolve the suppressions rather than adding to them: a `@SuppressWarnings("NullAway")` or `castToNonNull(x)` on a value the checker could show to be null is a `NullPointerException` waiting for the path that makes it true — where the value genuinely cannot be null, say something the checker can see instead (a null check, `Objects.requireNonNull`, a non-null field initialised in the constructor).
Each conclusion below combines several dimensions into one point that no single dimension shows, and lists the measurements it rests on.
Where the investment is most exposed · Value at risk
This code would cost about €200,000 to build again, about 1.3 person-years of work. Its weakest lens is Code Health, at 38 (Weak). Code Health is about how easy the code is to read and change safely, and code that is hard to read is slow and risky to change, so every future change costs more than it should. Because the weakest lens counts most in the score, work on Code Health also moves the score most.
Based on: the rebuild estimate · the Code Health grade · how much each lens counts
What to do: Start with the Code Health actions in Top priorities.
If you do one thing first · First action
Resolve the 1 Leaked secret finding(s) in REDACTED Scanning. Of all the actions in this report, it raises the score most for the work it takes: about 4 points for low effort, because it clears the 1 REDACTED Scanning findings. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
Architecture: which parts of the code depend on which
The code is divided into modules, groups of code that each handle one part of the product, and a module depends on another when it uses code from it. The table lists the modules both down the side and across the top, in an order where each module should only use modules listed above it. A number in a cell means the module on that row uses the module in that column, and it counts the pairs of building blocks (types) that connect them. The one thing to look for is a mark above the diagonal line. It means two or more modules use each other in a loop (a dependency cycle), so none of them can be changed, tested or released on its own.
143 modules, with 9 dependencies between them. Every module uses only modules listed above it, so there are no loops.
The table shows the 40 modules with the most connections; 103 more are left out to keep it readable.
Which modules use which. The module on each row uses the module in each column, and the number counts the pairs of types that connect them. A cell above the diagonal is part of a loop.
org.apache.couchdb.nouveau.api uses org.apache.couchdb.nouveau.core.ser, so a change to org.apache.couchdb.nouveau.core.ser can break org.apache.couchdb.nouveau.api, while a change to org.apache.couchdb.nouveau.api can't break org.apache.couchdb.nouveau.core.ser.
Position
Below the diagonal: org.apache.couchdb.nouveau.api uses a module listed above it, which is the healthy direction.
org.apache.couchdb.nouveau.core uses org.apache.couchdb.nouveau.api, so a change to org.apache.couchdb.nouveau.api can break org.apache.couchdb.nouveau.core, while a change to org.apache.couchdb.nouveau.core can't break org.apache.couchdb.nouveau.api.
Position
Below the diagonal: org.apache.couchdb.nouveau.core uses a module listed above it, which is the healthy direction.
org.apache.couchdb.nouveau.lucene uses org.apache.couchdb.nouveau.core.ser, so a change to org.apache.couchdb.nouveau.core.ser can break org.apache.couchdb.nouveau.lucene, while a change to org.apache.couchdb.nouveau.lucene can't break org.apache.couchdb.nouveau.core.ser.
Position
Below the diagonal: org.apache.couchdb.nouveau.lucene uses a module listed above it, which is the healthy direction.
org.apache.couchdb.nouveau.lucene uses org.apache.couchdb.nouveau.api, so a change to org.apache.couchdb.nouveau.api can break org.apache.couchdb.nouveau.lucene, while a change to org.apache.couchdb.nouveau.lucene can't break org.apache.couchdb.nouveau.api.
Position
Below the diagonal: org.apache.couchdb.nouveau.lucene uses a module listed above it, which is the healthy direction.
org.apache.couchdb.nouveau.lucene uses org.apache.couchdb.nouveau.core, so a change to org.apache.couchdb.nouveau.core can break org.apache.couchdb.nouveau.lucene, while a change to org.apache.couchdb.nouveau.lucene can't break org.apache.couchdb.nouveau.core.
Position
Below the diagonal: org.apache.couchdb.nouveau.lucene uses a module listed above it, which is the healthy direction.
org.apache.couchdb.nouveau.resources uses org.apache.couchdb.nouveau.api, so a change to org.apache.couchdb.nouveau.api can break org.apache.couchdb.nouveau.resources, while a change to org.apache.couchdb.nouveau.resources can't break org.apache.couchdb.nouveau.api.
Position
Below the diagonal: org.apache.couchdb.nouveau.resources uses a module listed above it, which is the healthy direction.
org.apache.couchdb.nouveau.resources uses org.apache.couchdb.nouveau.core, so a change to org.apache.couchdb.nouveau.core can break org.apache.couchdb.nouveau.resources, while a change to org.apache.couchdb.nouveau.resources can't break org.apache.couchdb.nouveau.core.
Position
Below the diagonal: org.apache.couchdb.nouveau.resources uses a module listed above it, which is the healthy direction.
org.apache.couchdb.nouveau.tasks uses org.apache.couchdb.nouveau.core, so a change to org.apache.couchdb.nouveau.core can break org.apache.couchdb.nouveau.tasks, while a change to org.apache.couchdb.nouveau.tasks can't break org.apache.couchdb.nouveau.core.
Position
Below the diagonal: org.apache.couchdb.nouveau.tasks uses a module listed above it, which is the healthy direction.
org.apache.couchdb.nouveau.health uses org.apache.couchdb.nouveau.resources, so a change to org.apache.couchdb.nouveau.resources can break org.apache.couchdb.nouveau.health, while a change to org.apache.couchdb.nouveau.health can't break org.apache.couchdb.nouveau.resources.
Position
Below the diagonal: org.apache.couchdb.nouveau.health uses a module listed above it, which is the healthy direction.
At a glance — Code Health · 38% · Weak · gated by R1, X5 ·
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 category
Findings
Severity
A07:2025 — Authentication Failures
44
High / Critical
A05:2025 — Injection
17
High / Critical
A03:2025 — Software Supply Chain Failures
1
Medium
A02:2025 — Security Misconfiguration
1
Medium
Roadmap
Top priorities: Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up; Resolve the 1 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED; Declare the default where Java declares it: `@NullMarked` (org.jspecify.annotations) in each package's `package-info.java`, or once in `module-info.java`, and REDACTED NullAway (Error Prone) or the Checker Framework so the declaration is enforced. Then annotate the real exceptions `@Nullable` and resolve the suppressions rather than adding to them: a `@SuppressWarnings("NullAway")` or `castToNonNull(x)` on a value the checker could show to be null is a `NullPointerException` waiting for the path that makes it true — where the value genuinely cannot be null, say something the checker can see instead (a null check, `Objects.requireNonNull`, a non-null field initialised in the constructor).
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Resolve the 1 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED.
Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up.
Declare the default where Java declares it: `@NullMarked` (org.jspecify.annotations) in each package's `package-info.java`, or once in `module-info.java`, and REDACTED NullAway (Error Prone) or the Checker Framework so the declaration is enforced. Then annotate the real exceptions `@Nullable` and resolve the suppressions rather than adding to them: a `@SuppressWarnings("NullAway")` or `castToNonNull(x)` on a value the checker could show to be null is a `NullPointerException` waiting for the path that makes it true — where the value genuinely cannot be null, say something the checker can see instead (a null check, `Objects.requireNonNull`, a non-null field initialised in the constructor).
Run what this repository's stack ships: dialyzer or elvis — locally for now, since there is no CI pipeline here yet, and as a step of the first workflow you add so a security regression fails the build instead of landing.
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.
Pass `timeout=` on every `requests`/`httpx` call (requests has no default and will wait forever), mount an `HTTPAdapter(max_retries=Retry(...))` on shared sessions, and wrap calls to flaky dependencies in `tenacity` retries or a `pybreaker` circuit breaker.
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 — 58
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 — 516
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 — 71
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 16
Something this survey could not settle
from the outside, and which could be critical or serious. Either a control was required and no
positive evidence of it exists in the repository — a backup job that nothing shows was ever restored from proves
nothing about restores — or our own analysis could not REDACTED 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 — REDACTED 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 REDACTED. All 60 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.9, the weighted average across measured dimensions.
Every figure here is one of two kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10.
What we checked — 60 dimensions across the health lenses
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
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, 634 of 645 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.)
Is there a tool behind the number? Every score below names the method that produced it: Roslyn, git or a scanner, not a narrative.
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 REDACTED, 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 REDACTED (captured at analysis time) — re-run on the same commit for the identical score.
Method
Backs
Version
Evaluator
Roslyn static analysis
Complexity, cohesion, coupling, dead code, API surface, layering
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 REDACTED also records its exact cause in diagnostics.md.
D4 Code Duplication — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The 216 duplicated block group(s) on this row were found in the languages this pass could tokenize, and they do NOT cover all of this repository's production source: .c (84,502 lines, 38% of production source), .cpp (2,297 lines, 1% of production source) went unread, because no language model this pass could load exposed a clone-unit token stream for those file kinds. Duplication in that source is UNMEASURED — its absence from the count above is a gap in this analyzer's language coverage, not a finding that the code is free of duplication.
D8 Code Coverage — not measured this REDACTED — 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 (.exs, .ex, .erl, .py) 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. To have real coverage read, produce a coverage report in a standard format (lcov — `mix test --cover` with `excoveralls` (`mix coveralls.lcov`), or `rebar3 do eunit --cover, cover` (or covertool for Cobertura XML), or `coverage REDACTED -m pytest` then `coverage xml`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures. You can widen what we reach: optional: produce a coverage report in a standard format (lcov — `mix test --cover` with `excoveralls` (`mix coveralls.lcov`), or `rebar3 do eunit --cover, cover` (or covertool for Cobertura XML), or `coverage REDACTED -m pytest` then `coverage xml`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures — then the real number is read on the next scan.
D11 Test Reliability — not measured this REDACTED — 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 (.exs, .ex, .erl, .py) and this repository declares a rebar3 project (repository root, 362 test files), but it was not re-run: the analyzer environment could not REDACTED it. Not scored — this is a gap in the analyzer's language coverage, not a finding about this repository.
D12 Dependency Hygiene — not measured this REDACTED — 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. Not scored — 3 Mix dependency declaration(s) were read for PINNING discipline (1 defect(s) reported), but the outdated/retired signal needs the Hex registry, which had no lockfile-resolved dependency to be asked about, so this dimension's own question is only partly answered. NOT a finding that these dependencies are current or healthy, and not a finding that they are all USED — whether a declaration is unused is ungraded, because a Hex app name does not determine the modules it provides and a large idiomatic class of BEAM dependencies is correctly declared and never referenced in source.
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 an Elixir mix.exs/mix.lock (Hex), but the licence verdict published here was taken over its Python distribution dependencies. Nothing was read about its Mix dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each ecosystem's manifests (what makes a folder runnable or a published package) need their own proof before D19 judges its units. Until then those folders' READMEs are judged only as documents (boilerplate, structure), never counted as complete.
D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This kind did not reach the 95 % precision gate in three adjudicated runs (docs/plans/deterministic-engine/adjudication/D19-sample3-v3.md), so by the pre-registered fallback it publishes no row until a re-measurement shows it does. The candidates are counted here, not reported as findings, and the score does not include them.
D21 Naming Consistency — not measured this REDACTED — 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. D21's deterministic naming rules are gated on C# first (docs/plans/deterministic-engine.md, P5): each other language is switched on only after its own concept suite and A/B gate pass. Until then its declarations carry no naming verdict this REDACTED — this says nothing about whether its names are consistent.
D22 Internal API Consistency — not measured this REDACTED — 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/weatherreport/src/weatherreport.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 — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each source language's comment syntax, and the code a comment annotates in it, needs its own proof before D24 judges it. Until then those comments are left unread, not counted as clean.
D26 Project Cohesion — 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. Project size and spread are measured over build units whose source a code model reads. This repository's .c, .cpp source is a material share of its production lines and was read by none, so the score is a verdict about the units that were read. Not a finding that the unread source is cohesive — it is unmeasured.
D27 Navigability — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Tracing effort is measured over resolved call sites, and all 879 sampled here came from .erl files. This repository's .c, .cpp source is a material share of its production lines and contributed none, so the score above is a verdict about the part that was read. Not a finding that the unread half navigates well — it is unmeasured.
AXR1 Runtime accessibility — not measured this REDACTED — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Render strategy: boot via REDACTED (REDACTED). docker build failed (exit 1) — [0m - InvalidDefaultArgInFrom: Default value for ARG ${COUCHDB_IMAGE} results in empty or invalid base image name (line 2) REDACTED:2 -------------------- 1 | ARG COUCHDB_IMAGE 2 | >>> FROM ${COUCHDB_IMAGE} 3 | 4 | # Install SpiderMonkey 128 and tell CouchDB to use it in configure -------------------- ERROR: failed to solve: base name (${COUCHDB_IMAGE}) should not be blank; runtime evidence skipped.
C1 Data Protection — not measured this REDACTED — 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 REDACTED, 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 REDACTED — 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 REDACTED, 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 REDACTED — 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 REDACTED, 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 REDACTED — 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 REDACTED, 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 REDACTED — 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 REDACTED, 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 REDACTED — 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 Elixir, Erlang, Java, Python, c, cpp 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 REDACTED — 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 Elixir, Erlang, Python, c, cpp is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
M4 Documentation accuracy — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9), and artefact counts an order of magnitude off. Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
S1 Web-Security Posture — not measured this REDACTED — 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 REDACTED, 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.
X2 Cancellation propagation — not measured this REDACTED — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Go, PHP, Dart, Kotlin, Ruby, Scala, Java, Python and Rust source only, and no C# was loaded, and no named async function in this repository's JavaScript/TypeScript, nor any Go, PHP or Dart function or Kotlin suspend function, makes a request that can be cancelled (fetch, axios, ky, ofetch, got, undici, node:http; net/http, net.Dial; amphp; Dio; Ktor, OkHttp), so there is nothing to judge, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X3 Exception handling — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 13 further occurrence(s) are not listed individually; the score already reflects all 53.
X7 Silent fallback defaults — not measured this REDACTED — 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 Elixir, 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.
D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
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.
D9 Test Distribution: The test-pyramid shape is inferred from project/folder naming and references, with a single test host bucketed per-file by its path tier and content signals — a suite that names tiers unconventionally and gives no per-file signal can still be mis-bucketed.
D13 REDACTED Scanning: REDACTED detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
D20 ADR Quality: ADR quality checks the structure of the decision records present: it cannot know about decisions made and never recorded, and it does not judge how well a record argues its case. Records in a language the section lexicon does not cover are not evaluated.
D24 Comment Value: Comment value is measured as redundancy only: a comment that repeats its code's words is found, but a paraphrase in other words, a vague comment, or one the code contradicts is not, and whether a comment is valuable is not claimed. Comments in other scripts or languages, and outside C#, are not judged.
D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
D27 Navigability: Indirection/navigability is structural — it measures hops to follow a call, not whether that indirection buys real flexibility or just ceremony.
D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned REDACTED, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules — it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a REDACTED (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (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.
M4 Documentation accuracy: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot REDACTED the onboarding or measure how long a real new joiner takes.
P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.
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.
38 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was mango_selector.match at 59. A further 34 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 chttpd.error_info at 56 — they are counted neither in the figure above nor in this dimension's score. 23 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/chttpd/src/chttpd.erl (chttpd.error_info at 56), src/couch_log/src/couch_log_util.erl (couch_log_util.level_to_integer at 37), src/couch/src/couch_util.erl (couch_util.is_whitespace at 32), src/couch/src/couch_debug.erl (couch_debug.help at 31), src/chttpd/src/chttpd_auth_request.erl (chttpd_auth_request.authorize_request_int at 30), and 18 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.
+ 33 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 38 bodies over 15 down to 15 or less in Cyclomatic Complexity — start with mango_selector.match (cyclomatic 59), mango_selector.norm_ops (cyclomatic 58), couch_log_trunc_io.print (cyclomatic 54). — 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 38 together lifts Cyclomatic Complexity from 6.6 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.
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.
+ 38 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 7 bodies over 30 down to 30 or less in Cognitive Complexity — start with couch_httpd.error_headers (cognitive 51), couch_server.handle_call (cognitive 42), chttpd.error_headers (cognitive 41). — 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 7 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.
Do you agree with this assessment?
D3 · God Classes7.1 / 10Strong✓ Tool-verified
What it measures: Over-large classes that try to do too much ("god classes").
Method: God-class detection by line and method-count thresholds per logical type (partial classes unified), filtered for generated code and registration/contract false positives. Deterministic.
Resolve the 64 FileTooLong finding(s) in God Classes — start with chttpd_db.erl, couch_db.erl, mango_cursor_view.erl. — One of this dimension's main actionable groups (64 warning-level).
Resolve the 15 TooManyFunctions finding(s) in God Classes — start with fabric_util.erl, couch_log_trunc_io_fmt.erl, couch_key_tree.erl. — One of this dimension's main actionable groups (15 warning-level).
Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Copy-pasted code that should be shared instead.
Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), density-scored per KLoC of production code. Deterministic.
216 duplicated block group(s) detected. A further 9 rows report members as variants of one another; they aggregate block groups already counted above and are not themselves counted. 39 of the 225 are in trees this repository does not ship — vendored, example/demo, project-template, fixture and benchmark code — and are ranked below the shipped groups rather than excluded from them: the duplication there is real and is still counted in this dimension's score. The dimensions that publish a production-file census leave those trees out of theirs, so this count is deliberately drawn over the wider population. Measured on part of this repository only: .c, .cpp (39% of production source) was not exposed to the token comparison, so duplication there is unmeasured and is not in this count.
+ 79 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 21 Duplicated block (5 lines × 2) finding(s) in Code Duplication — start with mango_idx_nouveau.erl (3), chttpd.erl (3), chttpd_auth_request.erl. — One of this dimension's main actionable groups (21 warning-level).
Resolve the 16 Duplicated block (6 lines × 2) finding(s) in Code Duplication — start with couch_bt_engine_compactor.erl (2), chttpd_show.erl, couch_base32.erl. — One of this dimension's main actionable groups (16 warning-level).
Resolve the 14 Duplicated block (8 lines × 2) finding(s) in Code Duplication — start with couch_base32.erl (2), dreyfus_util.erl (2), config_util.erl. — One of this dimension's main actionable groups (14 warning-level).
Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D5 · Coupling10.0 / 10Exemplary✓ Tool-verified
What it measures: Whether volatile projects sit underneath others that depend on them (so their churn ripples upward), and whether project dependencies form cycles. A widely-depended-on but stable shared/kernel project is healthy, not penalised.
Method: Dependency cycles via elementary-DFS over real .csproj references, plus Martin instability (afferent/efferent) per project. Exhaustive over the reference graph, deterministic.
Coverage: Exhaustive · type-level: afferent/efferent coupling + cycles computed over every production type — the population is all types, not a name convention.
31 production modules (Gradle+OTP), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; edges a convention plugin adds from buildSrc or build-logic are not visible there; 0 module(s) off the main sequence.
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.
Resolve the 1 Low cohesion finding(s) in Cohesion (LCOM4) — start with couch_quickjs_scanner_plugin.erl. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
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.
Do you agree with this assessment?
D9 · Test Distribution10.0 / 10Exemplary✓ Tool-verified
What it measures: Whether the test suite has a healthy mix of unit / integration / end-to-end tests.
Method: Test projects classified (Unit/Integration/BDD/E2E) from compiled metadata; test methods counted exhaustively across projects with placement-agnostic disk fallback. Deterministic.
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.
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.
0 of 8 shipped Python distribution(s) use a banned license. Licences were resolved from PyPI over the distributions a consumer installs — this repository's 3 declared runtime requirement(s) closed transitively over each distribution's published `requires_dist` (5 reached that way). Requirements it states ONLY under an extra, a PEP 735 dependency group, a Poetry dev group or a dev-named requirements file are excluded: pip does not install any of them for a consumer. ★ This repository commits no dependency lockfile that this pass reads, so each licence is the one PyPI publishes for the distribution's CURRENT release rather than for a pinned version. ★ COVERAGE OF THIS VERDICT: it grades this repository's Python distribution dependencies and nothing else. The repository also declares an Elixir mix.exs/mix.lock (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.
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.
Resolve the 3 Hotspot finding(s) in Churn × Complexity Hotspots — start with chttpd.erl, chttpd_auth_request.erl, fabric_doc_update.erl. — One of this dimension's main actionable groups (3 warning-level).
Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D16 · Bus Factor7.6 / 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.
74 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is src/couch/src/couch_httpd_db.erl. Counted over 309 of the 553 production source files in this repository: 218 are under the ~2,400-byte size floor this dimension measures over, and the remaining 26 have no attributable history left to measure.
Off-boarding risk: anonymized user #1 · ×2
Further sole-owners (lower concentration)
What to do
Resolve the 2 Off-boarding risk finding(s) in Bus Factor. — One of this dimension's main actionable groups (2 recommendation-level).
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.
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.
68 deducted task-comment markers across 135418 LoC (0.0/KLoC) → score 9.9. Task comments only: this repository's language is read without a compiler, so D17's suppression, dead-code and commented-out-code arms did not REDACTED and this score counts fewer marker kinds than a .NET repository's would.
Resolve the 61 TodoComment finding(s) in Explicit Debt — start with 07_text_custom_field_list_test.exs (4), basics_test.exs (3), mango_cursor_view.erl (3). — One of this dimension's main actionable groups (61 warning-level).
Resolve the 4 FixmeComment finding(s) in Explicit Debt — start with couch_flags_tests.erl, couchdb_update_conflicts_tests.erl, couchdb_views_tests.erl. — One of this dimension's main actionable groups (4 warning-level).
Resolve the 3 HackComment finding(s) in Explicit Debt — start with 13_stable_update_test.exs, mem3_sync_event.erl, fabric_db_meta.erl. — One of this dimension's main actionable groups (3 warning-level).
Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the project's documentation is clear, complete, and useful.
Method: Every README, docs/ document and root guide parsed by its markup and measured in Unicode letters. Published: a runnable or packaged .NET project whose README (or a document it links, or a root guide) shows no example, and a root README naming none of three or more projects. Overview, licence, boilerplate, wall-of-text, empty-section and XML-doc rows are measured and withheld (counted in gaps) after adjudication. Deterministic, exhaustive, advisory.
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.
0 of 16 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.
What it measures: Whether comments are worth it — explaining WHY (valuable) rather than WHAT (redundant).
Method: Every inline C# comment compared word by word with the identifiers, literals and constructs of the code it annotates (taken from the syntax); a comment whose words that code already contains is redundant, as are closing-brace labels and generator template text. Comments giving a reason or a reference are kept; other scripts and languages are not judged. Deterministic, exhaustive, advisory.
0 of 33 build units (Gradle, Mix, OTP, Python, rebar3) flagged as possibly oversized/incoherent. This repository's .c, .cpp source was read by no build unit, so this covers part of the tree, not all of it.
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.
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. Measured over the .erl source only — this repository's .c, .cpp was not sampled for call sites, so this score covers part of the tree, not all of it.
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.
42 finding(s): 0 critical, 42 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
Resolve the 42 REDACTED finding(s) in Secrets (history) — start with REDACTED (14), REDACTED (8), REDACTED (4). — One of this dimension's main actionable groups (42 issue-level).
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.
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).
17 finding(s): 0 critical, 11 high, 3 medium, 3 low. semgrep hit a parse error in 21 file(s) — `extra/nouveau/gradlew` (line 74, line 178), `share/server/coffee-script.js`, `src/b64url/c_src/b64url.c` (line 102, line 112, line 123, …), `src/couch/priv/couch_cfile/couch_cfile.c`, `src/couch/priv/couch_ejson_compare/couch_ejson_compare.c` (line 68, line 69), … (+16 more) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them.
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
+ 4 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 4 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2), REDACTED (2). — One of this dimension's main actionable groups (4 issue-level).
Resolve the 3 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2), REDACTED. — One of this dimension's main actionable groups (3 issue-level).
Resolve the 2 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2). — One of this dimension's main actionable groups (2 issue-level).
Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
Resolve the 1 Medium CVE finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d30_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
40 of 335 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is src/weatherreport/src/weatherreport_getopt.erl. Counted over 335 of the 553 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
Resolve the 4 Orphaned knowledge finding(s) in Knowledge Freshness — start with weatherreport_getopt.erl, couch_mrview_debug.erl, fabric_doc_open.erl. — One of this dimension's main actionable groups (4 issue-level).
Resolve the 36 Orphaned file finding(s) in Knowledge Freshness — start with cpse_util.erl, couch_httpd_vhost.erl, clouseau_rpc.erl. — One of this dimension's main actionable groups (36 recommendation-level).
Resolve the 1 Further orphaned files (smaller) 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.
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.
Resolve the 1 Change coupling finding(s) in Change Coupling — start with fabric_view_map.erl. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d35_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
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.
0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 2 platform declaration(s) and 4 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.
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.
What to do
The domain core is a small share of production code, but most of the rest matched no layer vocabulary at all — so this is not yet an anemic-domain finding. The namespace/path convention could not place that code, which makes the composition above a statement about the naming, not about the design. Name the layers (or check that the repository's conventions differ from the ones this check knows) before reading a thin domain into it.
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.
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.
Other · Architecture — Whether interfaces stay focused rather than fat — the Interface-Segregation principle (SOLID 'I').
Method: Roslyn scan: public interface declared-member counts (accessors fold into their property/event); fat-interface threshold (over 15 declared members) flagged per type. Each finding also reports the distinct-OPERATION count — members counted by name, so an overload group counts once — which decides whether it states the caller-side ISP harm or the implementer-side burden of an overload set. TypeScript: exported interfaces that declare behaviour, counted over their REQUIRED operations (method signatures and function-typed properties with no `?`, once per signature) — data-shape interfaces and ambient .d.ts declarations are outside the population; JavaScript declares no interfaces and is not applicable. Deterministic, type-level.
Do you agree with this assessment?
AX8 · Test isolation10.0 / 10Exemplary✓ Tool-verified
Other · Architecture — Whether production projects stay free of references to test projects — tests may depend on production, never the reverse.
Method: Csproj graph: each production project checked for references to test projects (identified by test-framework presence, not name). Zero violations is clean. Deterministic.
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.
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.
`couch_httpd_vhost` clause `handle_config_change/5#413` makes a synchronous `gen_server`/`gen_statem:call` round-trip to a peer process 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, react by casting a follow-up message (fire-and-forget), or resolve the needed state locally. — src/couch/src/couch_httpd_vhost.erl:414
`couch_log_sup` clause `handle_config_change/5#57` makes a synchronous `gen_server`/`gen_statem:call` round-trip to a peer process 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, react by casting a follow-up message (fire-and-forget), or resolve the needed state locally. — src/couch_log/src/couch_log_sup.erl:72
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.
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.
Maturity · Maturity — Whether the repo and its projects have a README, and whether it's substantive and current.
Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.
What to do
Add a build/run (quick start) section to the root README — the first thing a newcomer needs.
Explain in the README how to REDACTED the tests. Add a section called Testing to the README in the repository's top folder, saying how to REDACTED the test suite.
Add an 'Architecture' / 'How it works' section to the root README — the high-level shape.
Describe the projects a newcomer cannot place from the root README: 1 of 9 have no README of their own, in their folder or in their family's project (`src/couch_tests`).
Maturity · Maturity — Whether the project's current-state documentation describes the code that exists.
Method: Every current-state document's checkable claims looked up in the tree (links, versions, and artefact counts an order of magnitude off), plus two README checks: an advertised infrastructure product with no footprint, and a module the CHANGELOG records as removed. Deterministic, no model. Advisory.
src/couch_scanner/README.md links to `src/couch_scanner_ddoc_features.erl`, but `src/couch_scanner/src/couch_scanner_ddoc_features.erl` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — src/couch_scanner/README.md:16
What to do
Reconcile the README with reality: src/couch_scanner/README.md links to `src/couch_scanner_ddoc_features.erl`, but `src/couch_scanner/src/couch_scanner_ddoc_features.erl` does not exist.
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.
Do you agree with this assessment?
P10 · Library API & versioning10.0 / 10Exemplary○ Nothing flagged
Readiness · Readiness — For a library: a deliberate (small) public API surface and explicit semantic versioning so consumers can depend on it safely.
Method: Roslyn scan: public API surface area and semantic-versioning markers (SemVer attributes, changelog entries) for libraries; off .NET, a library is the ecosystem's publication act (an npm package that is not private and names an entry point, a PyPI distribution with a build system, a Rust library crate, a Maven/Gradle module that publishes, a Go module with no package main, a gemspec, a Composer library, a SwiftPM library product, a pub.dev or Hex package), its surface is the share of types the language's code model records as public (Rust, Swift, Java, Kotlin, Go, Dart; not measured where the model records no type visibility or, as in TypeScript, only module-level export), and its version is read from the manifest, a semver CHANGELOG, release tooling or semver git tags. Exhaustive, deterministic.
Do you agree with this assessment?
P2 · Observability5.2 / 10Adequate✓ Tool-verified
Readiness · Readiness — Whether the code is diagnosable in production — structured logging, tracing/metrics, health checks.
Only 2/5 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `.`, `src/docs`, `src/weatherreport`.
What to do
Extend structured logging to the remaining runnable modules so everything you REDACTED is diagnosable in production.
Readiness · Readiness — Whether SAST, secret/dependency scanning and performance benchmarking are wired in (presence, not runtime).
Method: Filesystem scan: SAST configuration, dependency-update automation, secret scanning, and a benchmark harness or benchmark step — in this repository's own ecosystem. Exhaustive, deterministic.
No static application security testing detected. For this repository's stack, add dialyzer or elvis — this repository has no CI pipeline yet, so REDACTED it locally to clear the existing findings, then make it a step of the first workflow you add so a regression fails the build. What was searched, so you can tell an absence from a miss: the 0 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
What to do
Run what this repository's stack ships: dialyzer or elvis — locally for now, since there is no CI pipeline here yet, and as a step of the first workflow you add so a security regression fails the build instead of landing.
Enable Dependabot/Renovate or a dependency-review gate.
Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
Readiness · Readiness — Whether releases are automated and safely reversible (probes, rolling updates, approval gates) — from manifests/pipeline files, not the live environment.
Method: Filesystem scan: deployment manifests/IaC (K8s YAML, Helm, Terraform) for rolling updates, probes, approval gates, migration hooks. Exhaustive, deterministic.
What to do
Nothing pauses a release for a human: publish as a draft release (or gate the release job on a protected tag/manual dispatch) so a bad build can be stopped before users can download it.
Readiness · Readiness — Whether outbound HTTP calls are wrapped in resilience (retry/timeout/circuit-breaker) so a failing dependency doesn't cascade.
Method: Source scan: outbound HTTP clients and what bounds them — resilience handlers (Polly, AddStandardResilienceHandler) on .NET; on Go, the JVM, Python, JavaScript/TypeScript, Ruby, PHP, Rust, Elixir, Swift, Dart and Erlang, a timeout, deadline, retry or breaker beside each call, or a process-wide client default (a framework-wide deadline such as Drupal core's, Laravel's or actix's awc counts). Exhaustive, deterministic.
`requests.post(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. — build-aux/logfile-uploader.py:106
`requests.put(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. — build-aux/logfile-uploader.py:117
What to do
Pass `timeout=` on every `requests`/`httpx` call (requests has no default and will wait forever), mount an `HTTPAdapter(max_retries=Retry(...))` on shared sessions, and wrap calls to flaky dependencies in `tenacity` retries or a `pybreaker` circuit breaker.
Do you agree with this assessment?
R1 · Type Safety0.0 / 10Critical✓ Tool-verified
React / JS · Code Health — How much of the frontend is typed TypeScript vs untyped JavaScript.
Method: Frontend file inventory: the share of typed TypeScript vs untyped JavaScript across the source tree. Deterministic, exhaustive over frontend files.
0 typed · 14 plain JS — the untyped files are share/server/60/rewrite_fun.js, share/server/60/rewrite_fun_ast_bypass.js, share/server/dispatch-quickjs.js, share/server/dreyfus.js, share/server/filter.js, share/server/loop.js (+8 more).
What to do
Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up.
React / JS · Code Health — Near-exact copy-pasted blocks of substantial extent across the frontend (the D4 clone algorithm over JS/TS tokens, D-386): a block is reported only where its copies still agree on most of their own identifiers and literals, or were renamed as they were pasted but kept most of their constants, and where the copies carry enough code to stand on their own or the copied extent reaches 30 lines — so a re-implementation sharing neither names nor values, and a small pasted declaration, are both found and deliberately not reported, and a clean R10 is not a claim that nothing was copied.
Method: Near-exact copy-pasted blocks of substantial extent across the frontend (the D4 clone algorithm REDACTED over JS/TS tokens). Masking finds the candidates; a block is reported when its copies still agree on most of their own identifiers and literals, or when a renamed copy still agrees on most of its constants, AND the copies carry enough code to stand on their own — or when the copied extent reaches 30 lines. So a re-implementation sharing neither names nor values, and a small pasted declaration, are deliberately not counted. Deterministic.
share/server/dispatch-quickjs.js:14 · share/server/loop.js:16 — the two spans are one implementation copied and then locally edited — 565 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — share/server/dispatch-quickjs.js:14
share/server/60/rewrite_fun.js:19 · share/server/60/rewrite_fun_ast_bypass.js:25 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — share/server/60/rewrite_fun.js:19
share/server/dreyfus.js:43 · share/server/nouveau.js:89 · share/server/views.js:108 — the 3 copies are spread across 3 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a REDACTED of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a REDACTED of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — share/server/dreyfus.js:43
share/server/dreyfus.js:13 · share/server/nouveau.js:13 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a REDACTED of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a REDACTED of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — share/server/dreyfus.js:13
What to do
Act on each finding's own remediation rather than one rule: the move depends on what recurs. Where the copies are executable blocks, give the shared part one home and call it from each site; where they are declarations, a listing, a specialisation already delegating to its base, or one shape repeated per entity, there is no call site and the move is a shared type, a generated set or a factory — sometimes there is nothing to extract.
React / JS · Code Health — Per-function cyclomatic/cognitive complexity from the token-level function scanner (D-386) — real branching, not a regex heuristic.
Method: Per-function cyclomatic/cognitive complexity from a token-level function scanner (real branching, not a regex heuristic), computed over every frontend function. Deterministic.
runShow has cyclomatic complexity 16 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat REDACTED of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — share/server/render.js:237
fitnessAndQualityParsed has cyclomatic complexity 15 and cognitive complexity 23; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat REDACTED of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — share/server/mimeparse.js:90
resolveModule has cyclomatic complexity 11 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat REDACTED of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — share/server/util.js:13
What to do
Break down the listed branch-heavy functions; aim P95 cyclomatic ≤ 5.
Do you agree with this assessment?
R3 · Large Files10.0 / 10Exemplary✓ Tool-verified
React / JS · Code Health — How many source files exceed the large-file threshold.
Method: Components/modules exceeding the large-file threshold, counted exhaustively across the frontend source tree. Deterministic.
React / JS · Architecture — Import cycles in the module graph (D-386) — files that can only be understood and changed together.
Method: Import cycles in the module graph, detected exhaustively over JS/TS imports (the same cycle detection as the .NET coupling dimension). Deterministic.
Other · Code Health — Whether any branch is dead by construction — a switch arm whose label can never equal a case-normalised subject, or an `else if` whose predicate the arm above has already swallowed.
Method: Roslyn syntax + semantics: switch labels compared against the subject's own case normaliser, and if/else-if chains checked for a literal an earlier arm's containment test already swallows. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a loop that shortens a string until it fits a length budget has a floor — one with none grinds the value down to the empty string, or past it into a negative-length `Substring`.
Method: Roslyn syntax + semantics: while/do loops whose body's only effect on a string is to drop its last character, checked for whether anything — a direct comparison on the length, a body guard, a break — bounds that length below. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `while`/`do` loop whose body’s one assignment to a value is `x = x.slice(0, -1)` or `x = x.slice|substring|substr(0, x.length - 1)`, driven by a condition that reads `x.length` only as a term of a larger expression — never compared directly, never tested for truthiness, and with no other read of `x` — and whose body has no `break`, `return`, `throw` or `if` naming `x`. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a type's disposal matches what it OWNS — releasing what it created, leaving alone what it was handed, and not declaring a finalizer for state that has nothing unmanaged to finalize.
Method: Roslyn syntax + semantics: every assignment to a disposable field is read to decide whether the type CREATED the value or was handed it, and the type's disposal is checked against that answer — an injected interface it disposes, a value it constructed and never releases, a finalizer on a type holding nothing unmanaged, and a disposable local whose every reference is a plain member read. A value handed to a container that disposes its contents (a parent control's `Controls` collection, a component `IContainer`) is released by that container and is not reported; generated code is out of population. On a repository with no .NET source the same ownership questions are read in JavaScript/TypeScript off the engine’s own token stream (test, vendored, generated and minified paths not): a class declaring `dispose()`, `[Symbol.dispose]()` or `[Symbol.asyncDispose]()` that disposes a field it was handed through a constructor parameter typed as a repository interface or resolved by a dependency-injection container; that assigns a field only ever from `new X(…)` of a disposable class and neither releases it anywhere in the class nor names it in its disposal member or a method that member calls, nor hands it to anything else; and a `const`/`let` local built from literals only whose every reference opens a statement operating on a non-release member of it. A class is disposable when every repository declaration of its name declares or inherits a disposal member, or when it is a documented library disposable (`vscode` EventEmitter, CancellationTokenSource and Disposable; three.js geometries, materials, textures, render targets, renderers, controls and composers). The finalizer arm has no JavaScript counterpart: a class cannot declare one. Dart is read for the owned-and-never-released arm: a Flutter `State` (or a class declaring `dispose()`/`close()`) whose library-private field is written only with direct creations of a framework controller, `FocusNode`, `StreamController` or periodic `Timer` (or a `.listen(…)` into a field declared `StreamSubscription`), which nothing in the class or its library releases (`dispose`/`close`/`cancel`) and which is never handed on except as a named argument. Ruby is read for the owned-and-never-released arm and the abandoned-local arm: a class declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose instance variable is written only with a blockless core descriptor creation (`File.open`/`new`, `Tempfile`, `Dir.open`, `IO.popen`, the `socket` and `openssl` socket classes) that no method of the class closes and that is never handed on (passed, returned, stored, exposed by `attr_reader`, delegated) — a class whose superclass or mixin lies outside the repository is not judged — and a blockless creation read through and dropped (`File.open(path).read`) or held in a local that is never closed, returned, passed or stored (a `&:read` block-pass, an `autoclose: false` borrow and a `fileno` hand-over are not abandonment). PHP is read for the same two arms: a class (not a trait, and not one using a trait) declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose `private` property (or a `final` class's `protected` one) is written only with a direct core `fopen`, `tmpfile`, `popen`, `proc_open`, `fsockopen`, `stream_socket_client`/`server` or `opendir` that nothing in the class closes (`fclose`, `pclose`, `closedir`, `unset`, a reset to `null`) and that is never handed on, and a handle held in a function's local, or read through as the argument of a reader, that is never closed, returned, passed, captured or stored; a `php://` stream, `curl_init`, `SplFileObject`, `PDO` and a function the repository declares under the core name are not read. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a `when` guard is free of side effects — a guard that increments a counter or assigns while deciding whether its arm matches applies that change during PATTERN MATCHING, on an arm that may not be selected, and skips it entirely when a short-circuit to its left answers first.
Method: Roslyn syntax: `when` guards on case labels and switch-expression arms, read for a mutation (`++`/`--`/assignment) sitting in a position the guard's own `&&`/`||`/`??`/`?:`/`?.` can skip. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether the work a diagnostic log line costs is paid only when that line is wanted — C# evaluates a call's arguments BEFORE the call, so a trace/debug message joined or projected out of a collection is built in full on every pass, and then discarded by a sink the shipped configuration leaves switched off.
Method: Roslyn syntax: log calls at a diagnostic level (a `Log`-prefixed method naming Trace/Debug/Verbose, or a bare `Debug`/`Trace`/`Verbose` on a receiver named for a logger), whose argument list is read for a call whose cost scales with a sequence — a LINQ operator, a materialisation, `string.Join`, a serializer — with no enclosing level check or conditional-compilation region. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `debug`/`trace`/`verbose` call on a receiver named for a logger, or a `log`-prefixed method naming the level, whose argument calls an array operator (`map`/`filter`/`reduce`/`sort`/…), `Array.from`, `Object.keys/values/entries`, `JSON.stringify`/`util.inspect` over anything but a literal, or an array `join` — outside any arrow or function passed as an argument, which the logger calls only when the level is on — with no enclosing `if`, `&&` or `?:` whose condition names a level, a level string, or the `NODE_ENV`/`__DEV__`/`DEV` build switch. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X27 · Collection changed while being enumerated10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether an enhanced `for` leaves the collection it is walking alone — a body that adds to or removes from the very collection the loop is iterating invalidates the fail-fast iterator it is holding, so the next `next()` throws `ConcurrentModificationException` and the remaining elements are never seen. Whether a walk over an ETS table leaves the key it stands on alone — Erlang's own lists and maps are values no body can change, but an ETS key traversal asks the table for the key after the current one, so on a `set`, `bag` or `duplicate_bag` that is not fixed with `ets:safe_fixtable/2`, deleting the current key and then calling `ets:next/2` (or `ets:prev/2`) from it raises `badarg` and the rest of the table is never visited. Whether a `for` loop leaves the `dict`, `set` or `deque` it is walking alone — CPython's iterators over those check that the collection has not changed size since the loop began, so a body that removes from (or empties) the very collection the loop is walking makes the next step raise `RuntimeError: dictionary changed size during iteration` and the remaining items are never seen.
Method: Roslyn syntax + semantics: `foreach` statements whose body calls a structural mutator (`Add`/`Remove`/`Clear`/`Insert`/…) on the very expression the loop is enumerating. Two arms. ARM A — the source is a concrete fragile BCL collection, or a live `Keys`/`Values` view over one, and the mutator resolves to that same collection's own member; concurrent and immutable collections and arrays are outside the population by construction, since their enumerators survive a structural change. ARM B — the source is an argument-less accessor CALL on a receiver whose body is in source: the accessor must return a stored field VERBATIM and a sibling member must structurally change that same field, both read off the implementations rather than from the members' names. A mutation the loop provably exits immediately after (`break`/`return`/`throw`/`goto`), or one written inside a nested loop or a lambda, is counted and never reported. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X28 · Index access outside its own emptiness guard10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a condition that tests a value for emptiness indexes that same value only where the test holds — an `||` written one parenthesis too far to the left leaves an index access outside the guard beside it, so the empty case the guard exists to anticipate reaches the index and throws.
Method: Roslyn syntax only, no semantic model: the OUTERMOST `&&`/`||` of every boolean condition, read for a symbol the condition tests for emptiness (`string.IsNullOrEmpty`/`IsNullOrWhiteSpace`, a `Length`/`Count` comparison against a literal, `Any()`, a `Length`/`Count` pattern, or a comparison against `""`) and ALSO indexes. Each `symbol[...]` access is placed by a boolean-reachability walk from the access up to the outermost connective: an access is COVERED when some enclosing step has it in the right operand and the left operand, under the truth value that step forces, proves the symbol non-empty — a recursion over `&&`/`||` whose true- and false-directions are asymmetric. A finding needs BOTH an uncovered access and a covered one on the same symbol in the same condition, which is the agreeing twin that separates a misplaced parenthesis from an unrelated length test. Bare index accesses with no emptiness test in the condition are neither counted nor reported; a non-identifier receiver and a lambda nested inside the condition are outside the population. Deterministic, provable per finding. Advisory.
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. (×37) — src/smoosh/src/smoosh_persist.erl:118, src/nouveau/src/nouveau_util.erl:197, src/mem3/src/mem3_httpd.erl:35, …
`catch _Tag:_Err` 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. — src/couch_scanner/src/couch_scanner_util.erl:180
`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. — src/couch_scanner/src/couch_scanner_util.erl:229
`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. — src/couch/src/couch_auth_cache.erl:123
Other · Code Health — Whether log calls use message templates (queryable) rather than interpolated strings.
Method: Roslyn syntax scan: every log call-site counted; interpolated-string first-argument violations flagged. Population is all log calls, not estimated. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `trace`/`debug`/`info`/`warn`/`error`/`fatal`/`verbose`/`silly`/`http`/`log` call on a receiver named for a logger, in a package whose own or an enclosing `package.json` declares a logger that carries values as fields (pino, pino-http, nestjs-pino, Fastify, winston, bunyan, tslog, LogTape, roarr), whose first deciding argument is a template literal with substitutions; an object-literal fields argument is stepped over, a plain string message clears the call. Python is read the same way: a `debug`/`info`/`warning`/`error`/`exception`/`critical`/`log` call on a logger in a file that imports the standard library’s `logging` or structlog (loguru, which formats at the call, is not judged), whose message is a whole f-string with a non-constant field; a `%`-formatted, `.format()`-ed or concatenated message is not convicted, as in C#. PHP is read the same way: a PSR-3 level call (`emergency`…`debug`, `log`) on a logger (`$logger`, `$this->logger`, Laravel’s `Log::`, `logger()`, `\Drupal::logger()`) in a package whose `composer.json` requires a PSR-3 logger or a framework that hands one out (psr/log, Monolog, Laravel, Symfony, Drupal, CakePHP), or a file that imports one, whose message is a double-quoted string interpolating a variable; a single-quoted message clears the call, and `sprintf` or `.` concatenation is not convicted, as in C#. Dart is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on Sentry’s structured logger (`Sentry.logger`) whose message is a whole string literal interpolating a value (`$name`, `${…}`); the `Sentry.logger.fmt` template API clears the call. Dart that logs only through loggers with one message and no fields (package:logging, package:logger, talker, dart:developer) is not applicable rather than a reach gap. Ruby is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on the console gem’s `Console` (declared by a Gemfile, gemspec or Gemfile.lock, or required) or, where SemanticLogger, Ougai or dry-logger is declared or required, on a receiver named for a logger (`logger`, `@logger`, `Rails.logger`, `log`), whose first deciding argument is, as the whole argument, a double-quoted string interpolating a non-constant value (`#{…}`, `#@ivar`); a plain literal clears the call, keyword arguments are the fields, and a block, `%`-format or `+` concatenation is not convicted. Ruby that logs only through the standard Logger (Rails.logger) is not applicable rather than a reach gap. Deterministic.
`warn` at line 386 is handed a message assembled at the call — a string concatenated with a value, or `String.format` — through SLF4J or log4j 2, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.warn("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or `log.atInfo().addKeyValue("order_id", orderId).log("order moved")` with SLF4J 2's fluent API. An exception goes last, as the throwable argument, not into the text. — extra/nouveau/src/main/java/org/apache/couchdb/nouveau/core/IndexManager.java:386
Other · Code Health — Whether Java packages are null-marked and not undermined by heavy nullness suppression — a package under `@NullMarked` (or `@NonNullApi`, `@ParametersAreNonnullByDefault`, `@NonNullByDefault`, or a NullAway/Checker Framework configuration naming it) makes an unannotated reference exclude null, and `@SuppressWarnings("NullAway")`, `("nullness")`, `("null")` and `castToNonNull(…)` are what silence it.
Method: Roslyn compiler-options scan: NullableContextOptions per project; null-forgiving (!) suppression density per 1k syntax nodes. Deterministic, adoption plus suppression penalty.
0/8 of this repository's Java package directories are under a non-null default: a `package-info.java` declaring `@NullMarked` (JSpecify) or `@NonNullApi`, `@ParametersAreNonnullByDefault`, `@NonNullByDefault`, `@DefaultQualifier(NonNull.class)`; a `module-info.java` declaring `@NullMarked`; every type in it `@NullMarked`; or a build that runs NullAway with the package in `AnnotatedPackages`, or the Checker Framework's `NullnessChecker`. Elsewhere every reference admits null and no checker warns on the dereference that throws a `NullPointerException`.
What to do
Declare the default where Java declares it: `@NullMarked` (org.jspecify.annotations) in each package's `package-info.java`, or once in `module-info.java`, and REDACTED NullAway (Error Prone) or the Checker Framework so the declaration is enforced. Then annotate the real exceptions `@Nullable` and resolve the suppressions rather than adding to them: a `@SuppressWarnings("NullAway")` or `castToNonNull(x)` on a value the checker could show to be null is a `NullPointerException` waiting for the path that makes it true — where the value genuinely cannot be null, say something the checker can see instead (a null check, `Objects.requireNonNull`, a non-null field initialised in the constructor).
Do you agree with this assessment?
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.
Unscored — 2 check(s) recorded observations but carry no score
These checks ran and found something, but they do not carry a score — either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.
X10 Duplicated predicate — 9 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X31 Test-only surface in a production module — 11 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 4 control(s) we could not find positive evidence for
These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase — the thing it grades applies; we just could not see it. Excluded from the score either way.
C3 Audit Trail — Not assessed: these audit controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks audit controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C4 Data Retention — Not assessed: these retention controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks retention controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C5 Data-Subject Rights — Not assessed: these data-subject rights controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks data-subject rights controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 67 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.
AC7 A11y enforcement — 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 Java imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; 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; this repository's Python imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's.
AX2 Stateful singletons — No container singleton was found, so there is no shared instance for concurrent requests to race on. No class in this Java code is a Spring, JSR-330 or CDI singleton bean. No function in this Python code is served by a threaded web framework (a Flask, Bottle or FastAPI route, a Django or Pyramid view), so no module is shared between request threads. Elixir processes share no mutable memory — state lives in a process's own mailbox — so there is no shared object to race on. 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
AX7 Slice cohesion — not applicable — not a vertical-slice architecture
AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
AXR1 Runtime accessibility — docker build failed (exit 1) — [0m - InvalidDefaultArgInFrom: Default value for ARG ${COUCHDB_IMAGE} results in empty or invalid base image name (line 2) REDACTED:2 -------------------- 1 | ARG COUCHDB_IMAGE 2 | >>> FROM ${COUCHDB_IMAGE} 3 | 4 | # Install SpiderMonkey 128 and tell CouchDB to use it in configure -------------------- ERROR: failed to solve: base name (${COUCHDB_IMAGE}) should not be blank; runtime evidence skipped This is a statement about this REDACTED, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
C1 Data Protection — Not assessed: these personal data controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks personal data controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C2 Access Controls — Not assessed: these authorization controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks authorization controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
D10 Test Quality — ~81695 lines of test source are present (.exs, .ex, .erl, .py) 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
D12 Dependency Hygiene — Not scored — 3 Mix dependency declaration(s) were read for PINNING discipline (1 defect(s) reported), but the outdated/retired signal needs the Hex registry, which had no lockfile-resolved dependency to be asked about, so this dimension's own question is only partly answered. NOT a finding that these dependencies are current or healthy, and not a finding that they are all USED — whether a declaration is unused is ungraded, because a Hex app name does not determine the modules it provides and a large idiomatic class of BEAM dependencies is correctly declared and never referenced in source.
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.
D21 Naming Consistency — Naming consistency is measured on C# and TypeScript only; Elixir, Erlang, Java, JavaScript, Python not measured.
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"]`.
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.
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.
D36 Supply-chain Provenance & Signing — No CI/build pipeline found (.github/.forgejo/.gitea workflows, .circleci, .buildkite, .woodpecker, .teamcity, .gitlab-ci.yml, .travis.yml, bitbucket-pipelines.yml, .drone.yml, .cirrus.yml, .woodpecker.yml, appveyor.yml, azure-pipelines*.yml, .pipelines/, .vsts-ci/, .azuredevops/, Jenkinsfile); there is no build to attest provenance for.
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.
D39 IL Efficiency — D39 measures the IL emitted by a .NET build; this repository has no .NET solution or project files, so the dimension does not apply.
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.
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 (184 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
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'.
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 — no coverage report found on disk — produce a coverage report in a standard format (`rebar3 do eunit --cover, cover` (or covertool for Cobertura XML)) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures, or wire coverage collection into CI, to enable this cross-layer check
PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for `erlperf:REDACTED`/`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: Elixir and Erlang has no async/await function colour, so there is no asynchronous code for a blocking call to stall.
R11 Import Boundaries — No recognizable feature-sliced/layered src layout — boundary rules not applicable.
R4 Test Coverage — the JS/TS workspace (14 production file(s)) has no JavaScript/TypeScript test, but it is 5.73% of this repository's production source and the other 94.27% carries 81,695 line(s) of test code this pass cannot read — an incidental frontend's reachability is not the repository's test posture, so it is not scored as one
R5 Dependency Freshness — no package-lock.json — dependency freshness not measured (would require an npm lockfile); JS/npm CVEs are scored in D30 (Dependency Vulnerabilities), which answers every ecosystem
R6 Tooling — no package.json in the repository — test/lint/typecheck wiring is read from package.json scripts (corroborated against CI), so this project's own toolchain isn't measured here
R7 Dead Code — Not measured — no application, tooling or test entry point was detected, so no file can be shown to be reachable or unreachable. Declare an entry (package.json main/module/exports, src/index.*, or an index.html script) to enable reachability.
R8 Dependency Hygiene — Not measured — no package.json declares any dependency, so there is nothing to check imports against (imports may resolve through a host runtime rather than node).
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
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
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
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 — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X22 Contradicted release guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X24 Document value interpolated into markup unescaped — 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 — the code was read and holds no site of this kind, so there is nothing for this check to judge
X29 Per-element action decided by a fixed element — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X30 Support guard that admits what it rejects — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X7 Silent fallback defaults — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
Appendix A — Findings (grouped)
The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.
Orphaned knowledge src/weatherreport/src/weatherreport_getopt.erl:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge src/couch_mrview/src/couch_mrview_debug.erl:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge src/fabric/src/fabric_doc_open.erl:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge src/couch_index/src/couch_index.erl:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
FileTooLong: src/chttpd_db.erl src/chttpd/src/chttpd_db.erl— FileTooLong — 2619 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 83 functions. The bar is 500 significant lines; this is 2119 over it, 5.24× 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/couch_db.erl src/couch/src/couch_db.erl— FileTooLong — 2051 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 147 functions. The bar is 500 significant lines; this is 1551 over it, 4.10× 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/mango_cursor_view.erl src/mango/src/mango_cursor_view.erl— FileTooLong — 1671 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 31 functions. The bar is 500 significant lines; this is 1171 over it, 3.34× 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/chttpd.erl src/chttpd/src/chttpd.erl— FileTooLong — 1374 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 101 functions. The bar is 500 significant lines; this is 874 over it, 2.75× 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/couch_replicator_scheduler.erl src/couch_replicator/src/couch_replicator_scheduler.erl— FileTooLong — 1331 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 71 functions. The bar is 500 significant lines; this is 831 over it, 2.66× 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/couch_httpd.erl src/couch/src/couch_httpd.erl— FileTooLong — 1273 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 100 functions. The bar is 500 significant lines; this is 773 over it, 2.55× 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/mem3_rep.erl src/mem3/src/mem3_rep.erl— FileTooLong — 1212 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 44 functions. The bar is 500 significant lines; this is 712 over it, 2.42× 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/couch_httpd_db.erl src/couch/src/couch_httpd_db.erl— FileTooLong — 1204 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 704 over it, 2.41× 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/fabric_doc_update.erl src/fabric/src/fabric_doc_update.erl— FileTooLong — 1188 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 35 functions. The bar is 500 significant lines; this is 688 over it, 2.38× 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/couch_replicator_scheduler_job.erl src/couch_replicator/src/couch_replicator_scheduler_job.erl— FileTooLong — 1155 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 41 functions. The bar is 500 significant lines; this is 655 over it, 2.31× 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/mango_selector.erl src/mango/src/mango_selector.erl— FileTooLong — 1148 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 648 over it, 2.30× 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/couch_btree.erl src/couch/src/couch_btree.erl— FileTooLong — 1141 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 63 functions. The bar is 500 significant lines; this is 641 over it, 2.28× 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/couch_mrview_util.erl src/couch_mrview/src/couch_mrview_util.erl— FileTooLong — 1132 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 94 functions. The bar is 500 significant lines; this is 632 over it, 2.26× 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/mango_cursor_text.erl src/mango/src/mango_cursor_text.erl— FileTooLong — 1089 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 589 over it, 2.18× 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/couch_debug.erl src/couch/src/couch_debug.erl— FileTooLong — 1064 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 64 functions. The bar is 500 significant lines; this is 564 over it, 2.13× 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/mango_cursor.erl src/mango/src/mango_cursor.erl— FileTooLong — 1019 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 519 over it, 2.04× 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/couch_bt_engine.erl src/couch/src/couch_bt_engine.erl— FileTooLong — 1009 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 89 functions. The bar is 500 significant lines; this is 509 over it, 2.02× 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/couch_multidb_changes.erl src/couch/src/couch_multidb_changes.erl— FileTooLong — 989 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 489 over it, 1.98× 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/fabric_view_changes.erl src/fabric/src/fabric_view_changes.erl— FileTooLong — 985 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 36 functions. The bar is 500 significant lines; this is 485 over it, 1.97× 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/couch_server.erl src/couch/src/couch_server.erl— FileTooLong — 964 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 55 functions. The bar is 500 significant lines; this is 464 over it, 1.93× 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/couch_replicator_api_wrap.erl src/couch_replicator/src/couch_replicator_api_wrap.erl— FileTooLong — 959 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 40 functions. The bar is 500 significant lines; this is 459 over it, 1.92× 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/couch_query_servers.erl src/couch/src/couch_query_servers.erl— FileTooLong — 868 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 64 functions. The bar is 500 significant lines; this is 368 over it, 1.74× 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/couch_replicator_doc_processor.erl src/couch_replicator/src/couch_replicator_doc_processor.erl— FileTooLong — 840 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 40 functions. The bar is 500 significant lines; this is 340 over it, 1.68× 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/couch_db_updater.erl src/couch/src/couch_db_updater.erl— FileTooLong — 837 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 34 functions. The bar is 500 significant lines; this is 337 over it, 1.67× 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/couch_file.erl src/couch/src/couch_file.erl— FileTooLong — 834 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 71 functions. The bar is 500 significant lines; this is 334 over it, 1.67× 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.
TodoComment test/view_server/query_server_spec.rb:613— # TODO we can make real ddocs up there. — 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 test/elixir/test/all_docs_test.exs:11— # TODO: do we need to bring this in? — 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 test/elixir/test/basics_test.exs:200— # TODO: enable chunked encoding — 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 test/elixir/test/basics_test.exs:292— # TODO: make protocol check use defined protocol value — 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 test/elixir/test/basics_test.exs:371— # 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 test/elixir/test/mango/07_text_custom_field_list_test.exs:54— # 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 test/elixir/test/mango/07_text_custom_field_list_test.exs:89— # 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 test/elixir/test/mango/07_text_custom_field_list_test.exs:117— # 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 test/elixir/test/mango/07_text_custom_field_list_test.exs:141— # 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 test/elixir/test/changes_async_test.exs:502— # TODO: retry_part — 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 test/elixir/test/config_test.exs:12— # TODO: switch this to _local when that's landed — 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 test/elixir/test/config_test.exs:73— # TODO: port sever_port tests from config.js — 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 test/elixir/test/replication_test.exs:9— # TODO: Parameterize these — 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 test/elixir/test/replication_test.exs:604— # TODO: In JS we re-fetch _changes with since_seq, is that — 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 test/elixir/test/rewrite_test.exs:339— # TODO: port the two "bugged" tests from rewrite.js — 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 test/elixir/test/support/friend_docs.ex:280— # TODO: this function is not defined in the Python version of this module? — 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 test/elixir/test/support/limit_docs.ex:106— # TODO: this function is not defined in the Python version of this module? — 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 test/elixir/test/support/mango_database.ex:98— # TODO: make this use batches if necessary — 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 test/elixir/lib/step/config.ex:16— # TODO we would need to access config file here — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment src/rexi/src/rexi_buffer.erl:62— %% TODO Leverage os_mon to discover available memory in the system — 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/rexi/src/rexi_server.erl:82— % TODO: Compatibility clause. This is left to handle mixed cluster — 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/rexi/src/rexi_sup.erl:25— % TODO: Compatibility clause rexi_server. This was used by — 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/mango/src/mango_cursor_nouveau.erl:310— % TODO: respect R query parameter (same as json indexes) — 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/mango/src/mango_cursor_text.erl:340— % TODO: respect R query parameter (same as json indexes) — 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/mango/src/mango_cursor_view.erl:208— % TODO remove selector. It supports older nodes during version upgrades. — 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.
Swallowed exception (caught, then discarded) src/smoosh/src/smoosh_persist.erl:118— `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/nouveau/src/nouveau_util.erl:197— `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/mem3/src/mem3_httpd.erl:35— `catch _:_` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) src/mem3/src/mem3_rep.erl:1017— `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/mem3/src/mem3_shards.erl:220— `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/mango/src/mango_httpd.erl:253— `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/mango/src/mango_native_proc.erl:452— `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/mango/src/mango_selector.erl:427— `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/mango/src/mango_selector.erl:447— `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/mango/src/mango_selector.erl:469— `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/mango/src/mango_selector.erl:530— `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/mango/src/mango_selector_text.erl:433— `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/ken/src/ken_server.erl:309— `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/ken/src/ken_server.erl:328— `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/ken/src/ken_server.erl:341— `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/fabric/src/fabric.erl:711— `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/fabric/src/fabric_bench.erl:120— `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/fabric/src/fabric_rpc.erl:441— `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/fabric/src/fabric_rpc.erl:448— `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/fabric/src/fabric_view_all_docs.erl:295— `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/fabric/src/fabric_view_changes.erl:853— `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/dreyfus/src/dreyfus_util.erl:313— `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/couch_scanner/src/couch_scanner_util.erl:119— `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/couch_scanner/src/couch_scanner_util.erl:108— `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/couch_scanner/src/couch_scanner_util.erl:180— `catch _Tag:_Err` 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.
Duplicated block (5 lines × 2) src/chttpd/src/chttpd_auth_request.erl:157— src/chttpd/src/chttpd_auth_request.erl:157-161 | src/couch/src/couch_db.erl:768-772 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (5 lines × 2) src/chttpd/src/chttpd_rewrite.erl:420— src/chttpd/src/chttpd_rewrite.erl:420-424 | src/couch/src/couch_httpd_rewrite.erl:416-420 — before extracting anything, compare `src/chttpd/src/chttpd_rewrite.erl` and `src/couch/src/couch_httpd_rewrite.erl` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 197 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 2) src/config/src/config_util.erl:47— src/config/src/config_util.erl:47-51 | src/couch/src/couch_util.erl:382-386 — before extracting anything, compare `src/config/src/config_util.erl` and `src/couch/src/couch_util.erl` as WHOLE FILES: this scan already matched 5 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 2) src/couch/src/couch_btree.erl:1223— src/couch/src/couch_btree.erl:1223-1228 | src/couch/src/couch_btree.erl:1238-1242 — both copies are in the same file, so extract the 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/couch_log/src/couch_log_trunc_io_fmt.erl:194— src/couch_log/src/couch_log_trunc_io_fmt.erl:194-198 | src/couch_log/src/couch_log_trunc_io_fmt.erl:205-209 — both copies are in the same file, so extract the 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/couch_mrview/src/couch_mrview_debug.erl:424— src/couch_mrview/src/couch_mrview_debug.erl:424-428 | src/couch_mrview/src/couch_mrview_debug.erl:467-472 — both copies are in the same file, so extract the 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/fabric/src/fabric_db_create.erl:116— src/fabric/src/fabric_db_create.erl:116-120 | src/fabric/src/fabric_db_delete.erl:44-48 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (5 lines × 2) src/mango/src/mango_idx_nouveau.erl:169— src/mango/src/mango_idx_nouveau.erl:169-173 | src/mango/src/mango_idx_text.erl:176-180 — before extracting anything, compare `src/mango/src/mango_idx_nouveau.erl` and `src/mango/src/mango_idx_text.erl` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 288 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/chttpd/src/chttpd.erl:652— src/chttpd/src/chttpd.erl:652-656 | src/couch/src/couch_httpd.erl:591-595 — before extracting anything, compare `src/chttpd/src/chttpd.erl` and `src/couch/src/couch_httpd.erl` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 199 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 2) src/chttpd/src/chttpd.erl:800— src/chttpd/src/chttpd.erl:800-804 | src/couch/src/couch_httpd.erl:736-740 — before extracting anything, compare `src/chttpd/src/chttpd.erl` and `src/couch/src/couch_httpd.erl` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 199 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 2) src/chttpd/src/chttpd_show.erl:328— src/chttpd/src/chttpd_show.erl:328-332 | src/couch_mrview/src/couch_mrview_show.erl:377-381 — before extracting anything, compare `src/chttpd/src/chttpd_show.erl` and `src/couch_mrview/src/couch_mrview_show.erl` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 51 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 2) src/couch_epi/src/couch_epi_data_gen.erl:200— src/couch_epi/src/couch_epi_data_gen.erl:200-204 | src/couch_epi/src/couch_epi_functions_gen.erl:224-228 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (5 lines × 2) src/mango/src/mango_cursor_nouveau.erl:167— src/mango/src/mango_cursor_nouveau.erl:167-171 | src/mango/src/mango_cursor_text.erl:172-176 — before extracting anything, compare `src/mango/src/mango_cursor_nouveau.erl` and `src/mango/src/mango_cursor_text.erl` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 109 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/mango/src/mango_idx_nouveau.erl:146— src/mango/src/mango_idx_nouveau.erl:146-150 | src/mango/src/mango_idx_text.erl:153-157 — before extracting anything, compare `src/mango/src/mango_idx_nouveau.erl` and `src/mango/src/mango_idx_text.erl` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 288 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/mango/src/mango_idx_nouveau.erl:313— src/mango/src/mango_idx_nouveau.erl:313-317 | src/mango/src/mango_idx_text.erl:321-325 — before extracting anything, compare `src/mango/src/mango_idx_nouveau.erl` and `src/mango/src/mango_idx_text.erl` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 288 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/chttpd/src/chttpd.erl:102— src/chttpd/src/chttpd.erl:102-106 | src/couch/src/couch_httpd.erl:60-64 — before extracting anything, compare `src/chttpd/src/chttpd.erl` and `src/couch/src/couch_httpd.erl` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 199 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 2) src/couch_log/src/couch_log_trunc_io.erl:359— src/couch_log/src/couch_log_trunc_io.erl:359-363 | src/couch_log/src/couch_log_trunc_io.erl:372-376 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) src/couch_log/src/couch_log_util.erl:40— src/couch_log/src/couch_log_util.erl:40-44 | src/mem3/src/mem3_util.erl:345-349 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (5 lines × 2) src/couch_scanner/src/couch_scanner_plugin_conflict_finder.erl:177— src/couch_scanner/src/couch_scanner_plugin_conflict_finder.erl:177-181 | src/couch_scanner/src/couch_scanner_plugin_ddoc_features.erl:224-228 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (5 lines × 2) src/ets_lru/src/ets_lru.erl:310— src/ets_lru/src/ets_lru.erl:310-314 | src/ets_lru/src/ets_lru.erl:327-331 — both copies are in the same file, so extract the 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/mango/src/mango_cursor.erl:440— src/mango/src/mango_cursor.erl:440-444 | src/mango/src/mango_cursor_special.erl:44-48 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (6 lines × 2) src/chttpd/src/chttpd_show.erl:145— src/chttpd/src/chttpd_show.erl:145-150 | src/couch_mrview/src/couch_mrview_show.erl:146-155 — before extracting anything, compare `src/chttpd/src/chttpd_show.erl` and `src/couch_mrview/src/couch_mrview_show.erl` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 51 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 2) src/couch/src/couch_base32.erl:43— src/couch/src/couch_base32.erl:43-48 | src/couch/src/couch_base32.erl:56-61 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) src/couch/src/couch_bt_engine_compactor.erl:557— src/couch/src/couch_bt_engine_compactor.erl:557-562 | src/couch/src/couch_db_split.erl:530-535 — 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/couch/src/couch_bt_engine_compactor.erl:615— src/couch/src/couch_bt_engine_compactor.erl:615-620 | src/couch/src/couch_bt_engine_compactor.erl:717-722 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) src/couch/src/couch_httpd_multipart.erl:143— src/couch/src/couch_httpd_multipart.erl:143-148 | src/couch/src/couch_httpd_multipart.erl:207-212 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) src/couch_replicator/src/couch_replicator_fabric.erl:131— src/couch_replicator/src/couch_replicator_fabric.erl:131-136 | src/fabric/src/fabric_view_reduce.erl:172-177 — before extracting anything, compare `src/couch_replicator/src/couch_replicator_fabric.erl` and `src/fabric/src/fabric_view_reduce.erl` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 2) src/dreyfus/src/dreyfus_util.erl:467— src/dreyfus/src/dreyfus_util.erl:467-472 | src/nouveau/src/nouveau_util.erl:178-183 — before extracting anything, compare `src/dreyfus/src/dreyfus_util.erl` and `src/nouveau/src/nouveau_util.erl` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 50 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 2) src/chttpd/src/chttpd_db.erl:2124— src/chttpd/src/chttpd_db.erl:2124-2129 | src/couch/src/couch_httpd_db.erl:1205-1210 — before extracting anything, compare `src/chttpd/src/chttpd_db.erl` and `src/couch/src/couch_httpd_db.erl` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 93 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 2) src/chttpd/src/chttpd_rewrite.erl:404— src/chttpd/src/chttpd_rewrite.erl:404-409 | src/couch/src/couch_httpd_rewrite.erl:400-405 — before extracting anything, compare `src/chttpd/src/chttpd_rewrite.erl` and `src/couch/src/couch_httpd_rewrite.erl` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 197 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 2) src/config/src/config.erl:115— src/config/src/config.erl:115-120 | src/couch/src/couch_util.erl:441-446 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (6 lines × 2) src/couch_replicator/src/couch_replicator_scheduler.erl:812— src/couch_replicator/src/couch_replicator_scheduler.erl:812-818 | src/couch_replicator/src/couch_replicator_share.erl:282-287 — 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/fabric/src/fabric_ring.erl:45— src/fabric/src/fabric_ring.erl:45-50 | src/fabric/src/fabric_view.erl:461-466 — 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/mango/src/mango_idx_nouveau.erl:182— src/mango/src/mango_idx_nouveau.erl:182-187 | src/mango/src/mango_idx_text.erl:189-194 — before extracting anything, compare `src/mango/src/mango_idx_nouveau.erl` and `src/mango/src/mango_idx_text.erl` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 288 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/fabric/src/fabric_view_changes.erl:187— src/fabric/src/fabric_view_changes.erl:187-192 | src/fabric/src/fabric_view_changes.erl:201-206 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) src/dreyfus/src/dreyfus_fabric_info.erl:56— src/dreyfus/src/dreyfus_fabric_info.erl:56-61 | src/nouveau/src/nouveau_fabric_info.erl:74-79 — before extracting anything, compare `src/dreyfus/src/dreyfus_fabric_info.erl` and `src/nouveau/src/nouveau_fabric_info.erl` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 2) src/couch_pse_tests/src/cpse_test_read_write_docs.erl:108— src/couch_pse_tests/src/cpse_test_read_write_docs.erl:108-113 | src/couch_pse_tests/src/cpse_test_read_write_docs.erl:237-242 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
TooManyFunctions: fabric_util src/fabric/src/fabric_util.erl:13— TooManyFunctions — 47 functions. The bar is 30 functions; this is 17 over it, 1.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: couch_log_trunc_io_fmt src/couch_log/src/couch_log_trunc_io_fmt.erl:23— TooManyFunctions — 44 functions. The bar is 30 functions; this is 14 over it, 1.47× 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: couch_key_tree src/couch/src/couch_key_tree.erl:48— TooManyFunctions — 40 functions. The bar is 30 functions; this is 10 over it, 1.33× 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: mango_native_proc src/mango/src/mango_native_proc.erl:13— TooManyFunctions — 38 functions. The bar is 30 functions; this is 8 over it, 1.27× 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: couch_bt_engine_header src/couch/src/couch_bt_engine_header.erl:13— TooManyFunctions — 36 functions. The bar is 30 functions; this is 6 over it, 1.20× 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: weatherreport_getopt src/weatherreport/src/weatherreport_getopt.erl:11— TooManyFunctions — 36 functions. The bar is 30 functions; this is 6 over it, 1.20× 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: couch_doc src/couch/src/couch_doc.erl:13— 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: mango_util src/mango/src/mango_util.erl:13— TooManyFunctions — 34 functions. The bar is 30 functions; this is 4 over it, 1.13× 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: mem3_sync src/mem3/src/mem3_sync.erl:13— 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: setup src/setup/src/setup.erl:13— 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: smoosh_channel src/smoosh/src/smoosh_channel.erl:13— 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: couch_scanner_server src/couch_scanner/src/couch_scanner_server.erl:18— 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.
TooManyFunctions: jwtf src/jwtf/src/jwtf.erl:18— 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.
TooManyFunctions: couch_httpd_vhost src/couch/src/couch_httpd_vhost.erl:13— TooManyFunctions — 31 functions. The bar is 30 functions; this is 1 over it, 1.03× 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: couch_epi_functions_gen src/couch_epi/src/couch_epi_functions_gen.erl:13— TooManyFunctions — 31 functions. The bar is 30 functions; this is 1 over it, 1.03× 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.
Duplicated block (8 lines × 2) src/config/src/config_util.erl:68— src/config/src/config_util.erl:68-75 | src/couch/src/couch_util.erl:370-377 — before extracting anything, compare `src/config/src/config_util.erl` and `src/couch/src/couch_util.erl` as WHOLE FILES: this scan already matched 5 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 2) src/couch/src/couch_base32.erl:108— src/couch/src/couch_base32.erl:108-115 | src/couch/src/couch_base32.erl:121-128 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) src/couch/src/couch_base32.erl:117— src/couch/src/couch_base32.erl:117-124 | src/couch/src/couch_base32.erl:134-141 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) src/couch_mrview/src/couch_mrview.erl:689— src/couch_mrview/src/couch_mrview.erl:689-696 | src/couch_mrview/src/couch_mrview.erl:709-716 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) src/couch_scanner/src/couch_scanner_checkpoint.erl:48— src/couch_scanner/src/couch_scanner_checkpoint.erl:48-55 | src/mem3/src/mem3_reshard_store.erl:157-164 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (8 lines × 2) src/dreyfus/src/dreyfus_util.erl:437— src/dreyfus/src/dreyfus_util.erl:437-444 | src/nouveau/src/nouveau_util.erl:148-155 — before extracting anything, compare `src/dreyfus/src/dreyfus_util.erl` and `src/nouveau/src/nouveau_util.erl` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 50 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 2) src/fabric/src/fabric_db_create.erl:132— src/fabric/src/fabric_db_create.erl:132-139 | src/fabric/src/fabric_db_delete.erl:60-67 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (8 lines × 2) src/mem3/src/mem3_shards.erl:423— src/mem3/src/mem3_shards.erl:423-430 | src/mem3/src/mem3_shards.erl:433-440 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) src/chttpd/src/chttpd_db.erl:2462— src/chttpd/src/chttpd_db.erl:2462-2469 | src/couch/src/couch_httpd_db.erl:1388-1395 — before extracting anything, compare `src/chttpd/src/chttpd_db.erl` and `src/couch/src/couch_httpd_db.erl` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 93 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 2) src/fabric/src/fabric_rpc.erl:842— src/fabric/src/fabric_rpc.erl:842-849 | src/rexi/src/rexi_server.erl:178-185 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (8 lines × 2) src/dreyfus/src/dreyfus_util.erl:421— src/dreyfus/src/dreyfus_util.erl:421-428 | src/nouveau/src/nouveau_util.erl:246-253 — before extracting anything, compare `src/dreyfus/src/dreyfus_util.erl` and `src/nouveau/src/nouveau_util.erl` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 50 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 2) src/mango/src/mango_idx_view.erl:440— src/mango/src/mango_idx_view.erl:440-447 | src/mango/src/mango_idx_view.erl:455-462 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) src/couch_pse_tests/src/cpse_test_fold_docs.erl:140— src/couch_pse_tests/src/cpse_test_fold_docs.erl:140-147 | src/couch_pse_tests/src/cpse_test_fold_docs.erl:193-200 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) src/couch_pse_tests/src/cpse_test_purge_docs.erl:286— src/couch_pse_tests/src/cpse_test_purge_docs.erl:286-293 | src/couch_pse_tests/src/cpse_test_purge_docs.erl:303-310 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) src/b64url/src/b64url.erl:52— src/b64url/src/b64url.erl:52-61 | src/exxhash/src/exxhash.erl:39-48 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (10 lines × 2) src/chttpd/src/chttpd_auth.erl:89— src/chttpd/src/chttpd_auth.erl:89-98 | src/couch/src/couch_db_plugin.erl:85-94 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (10 lines × 2) src/chttpd/src/chttpd_db.erl:2296— src/chttpd/src/chttpd_db.erl:2296-2305 | src/couch/src/couch_httpd_db.erl:1286-1295 — before extracting anything, compare `src/chttpd/src/chttpd_db.erl` and `src/couch/src/couch_httpd_db.erl` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 93 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (10 lines × 2) src/chttpd/src/chttpd_db.erl:2427— src/chttpd/src/chttpd_db.erl:2427-2436 | src/couch/src/couch_httpd_db.erl:1355-1364 — before extracting anything, compare `src/chttpd/src/chttpd_db.erl` and `src/couch/src/couch_httpd_db.erl` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 93 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (10 lines × 2) src/mango/src/mango_cursor_nouveau.erl:127— src/mango/src/mango_cursor_nouveau.erl:127-136 | src/mango/src/mango_cursor_text.erl:132-141 — before extracting anything, compare `src/mango/src/mango_cursor_nouveau.erl` and `src/mango/src/mango_cursor_text.erl` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 109 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/mem3/src/mem3_reshard.erl:553— src/mem3/src/mem3_reshard.erl:553-562 | src/mem3/src/mem3_reshard.erl:565-574 — both copies are in the same file, so extract the 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/mem3/src/mem3_reshard_api.erl:92— src/mem3/src/mem3_reshard_api.erl:92-101 | src/mem3/src/mem3_reshard_api.erl:110-119 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) src/dreyfus/src/dreyfus_fabric_group1.erl:145— src/dreyfus/src/dreyfus_fabric_group1.erl:145-154 | src/dreyfus/src/dreyfus_fabric_search.erl:284-293 — before extracting anything, compare `src/dreyfus/src/dreyfus_fabric_group1.erl` and `src/dreyfus/src/dreyfus_fabric_search.erl` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 35 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/mango/src/mango_idx_view.erl:466— src/mango/src/mango_idx_view.erl:466-475 | src/mango/src/mango_idx_view.erl:481-490 — both copies are in the same file, so extract the 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/ets_lru/src/ets_lru.erl:174— src/ets_lru/src/ets_lru.erl:174-183 | src/ets_lru/src/ets_lru.erl:191-200 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) src/fabric/src/fabric_time_seq.erl:106— src/fabric/src/fabric_time_seq.erl:106-115 | src/fabric/src/fabric_time_seq.erl:182-191 — both copies are in the same file, so extract the 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/couch_pse_tests/src/cpse_test_compaction.erl:40— src/couch_pse_tests/src/cpse_test_compaction.erl:40-49 | src/couch_pse_tests/src/cpse_test_compaction.erl:53-62 — both copies are in the same file, so extract the 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/chttpd/src/chttpd.erl:113— src/chttpd/src/chttpd.erl:113-121 | src/couch/src/couch_httpd.erl:69-77 — before extracting anything, compare `src/chttpd/src/chttpd.erl` and `src/couch/src/couch_httpd.erl` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 199 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (9 lines × 2) src/chttpd/src/chttpd_db.erl:1169— src/chttpd/src/chttpd_db.erl:1169-1177 | src/chttpd/src/chttpd_view.erl:83-91 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (9 lines × 2) src/config/src/config_util.erl:21— src/config/src/config_util.erl:21-29 | src/couch/src/couch_util.erl:277-285 — before extracting anything, compare `src/config/src/config_util.erl` and `src/couch/src/couch_util.erl` as WHOLE FILES: this scan already matched 5 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (9 lines × 2) src/config/src/config_util.erl:56— src/config/src/config_util.erl:56-64 | src/couch/src/couch_util.erl:302-310 — before extracting anything, compare `src/config/src/config_util.erl` and `src/couch/src/couch_util.erl` as WHOLE FILES: this scan already matched 5 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (9 lines × 2) src/couch_replicator/src/couch_replicator_httpc.erl:313— src/couch_replicator/src/couch_replicator_httpc.erl:313-321 | src/couch_replicator/src/couch_replicator_httpc.erl:331-339 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) src/mango/src/mango_cursor_nouveau.erl:235— src/mango/src/mango_cursor_nouveau.erl:235-243 | src/mango/src/mango_cursor_text.erl:243-251 — before extracting anything, compare `src/mango/src/mango_cursor_nouveau.erl` and `src/mango/src/mango_cursor_text.erl` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 109 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/setup/src/setup.erl:151— src/setup/src/setup.erl:151-159 | src/setup/src/setup.erl:318-326 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) src/chttpd/src/chttpd.erl:564— src/chttpd/src/chttpd.erl:564-572 | src/couch/src/couch_httpd.erl:528-536 — before extracting anything, compare `src/chttpd/src/chttpd.erl` and `src/couch/src/couch_httpd.erl` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 199 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (9 lines × 2) src/chttpd/src/chttpd_sup.erl:161— src/chttpd/src/chttpd_sup.erl:161-169 | src/couch/src/couch_sup.erl:159-167 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (9 lines × 2) src/couch_epi/src/couch_epi_data_gen.erl:147— src/couch_epi/src/couch_epi_data_gen.erl:147-155 | src/couch_epi/src/couch_epi_functions_gen.erl:158-166 — 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) src/couch/src/couch_passwords.erl:113— src/couch/src/couch_passwords.erl:113-121 | src/couch/src/couch_passwords.erl:123-131 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) src/couch_pse_tests/src/cpse_test_attachments.erl:28— src/couch_pse_tests/src/cpse_test_attachments.erl:28-36 | src/couch_pse_tests/src/cpse_test_attachments.erl:81-89 — both copies are in the same file, so extract the 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/chttpd/src/chttpd.erl:844— src/chttpd/src/chttpd.erl:844-850 | src/couch/src/couch_httpd.erl:834-840 — before extracting anything, compare `src/chttpd/src/chttpd.erl` and `src/couch/src/couch_httpd.erl` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 199 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (7 lines × 2) src/couch/src/couch_query_servers.erl:778— src/couch/src/couch_query_servers.erl:778-785 | src/couch/src/couch_query_servers.erl:794-800 — both copies are in the same file, so extract the 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/dreyfus/src/dreyfus_fabric_cleanup.erl:27— src/dreyfus/src/dreyfus_fabric_cleanup.erl:27-33 | src/nouveau/src/nouveau_fabric_cleanup.erl:27-33 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (7 lines × 2) src/dreyfus/src/dreyfus_util.erl:209— src/dreyfus/src/dreyfus_util.erl:209-217 | src/dreyfus/src/dreyfus_util.erl:222-228 — both copies are in the same file, so extract the 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/chttpd/src/chttpd_rewrite.erl:349— src/chttpd/src/chttpd_rewrite.erl:349-355 | src/couch/src/couch_httpd_rewrite.erl:345-351 — before extracting anything, compare `src/chttpd/src/chttpd_rewrite.erl` and `src/couch/src/couch_httpd_rewrite.erl` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 197 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (7 lines × 2) src/couch_replicator/src/couch_replicator_scheduler.erl:721— src/couch_replicator/src/couch_replicator_scheduler.erl:721-727 | src/mem3/src/mem3_reshard.erl:600-606 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (7 lines × 2) src/mango/src/mango_cursor_nouveau.erl:265— src/mango/src/mango_cursor_nouveau.erl:265-271 | src/mango/src/mango_cursor_text.erl:273-279 — before extracting anything, compare `src/mango/src/mango_cursor_nouveau.erl` and `src/mango/src/mango_cursor_text.erl` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 109 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (7 lines × 2) src/mango/src/mango_idx_nouveau.erl:263— src/mango/src/mango_idx_nouveau.erl:263-269 | src/mango/src/mango_idx_text.erl:268-274 — before extracting anything, compare `src/mango/src/mango_idx_nouveau.erl` and `src/mango/src/mango_idx_text.erl` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 288 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (7 lines × 2) src/mango/src/mango_idx_nouveau.erl:41— src/mango/src/mango_idx_nouveau.erl:41-47 | src/mango/src/mango_idx_text.erl:41-47 — before extracting anything, compare `src/mango/src/mango_idx_nouveau.erl` and `src/mango/src/mango_idx_text.erl` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 288 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (7 lines × 2) src/chttpd/src/chttpd_db.erl:2142— src/chttpd/src/chttpd_db.erl:2142-2148 | src/couch/src/couch_httpd_db.erl:1221-1227 — before extracting anything, compare `src/chttpd/src/chttpd_db.erl` and `src/couch/src/couch_httpd_db.erl` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 93 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (7 lines × 2) src/couch_pse_tests/src/cpse_test_fold_changes.erl:63— src/couch_pse_tests/src/cpse_test_fold_changes.erl:63-69 | src/couch_pse_tests/src/cpse_test_fold_changes.erl:77-83 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11 lines × 2) src/chttpd/src/chttpd_rewrite.erl:487— src/chttpd/src/chttpd_rewrite.erl:487-497 | src/couch/src/couch_httpd_rewrite.erl:489-499 — before extracting anything, compare `src/chttpd/src/chttpd_rewrite.erl` and `src/couch/src/couch_httpd_rewrite.erl` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 197 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (11 lines × 2) src/chttpd/src/chttpd_show.erl:317— src/chttpd/src/chttpd_show.erl:317-327 | src/couch_mrview/src/couch_mrview_show.erl:366-376 — before extracting anything, compare `src/chttpd/src/chttpd_show.erl` and `src/couch_mrview/src/couch_mrview_show.erl` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 51 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (11 lines × 2) src/couch_index/src/couch_index_server.erl:282— src/couch_index/src/couch_index_server.erl:282-292 | src/couch_index/src/couch_index_server.erl:338-348 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11 lines × 2) src/mango/src/mango_native_proc.erl:202— src/mango/src/mango_native_proc.erl:202-212 | src/mango/src/mango_native_proc.erl:367-377 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11 lines × 2) src/mem3/src/mem3_reshard_httpd.erl:54— src/mem3/src/mem3_reshard_httpd.erl:54-64 | src/mem3/src/mem3_reshard_httpd.erl:200-210 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11 lines × 2) src/chttpd/src/chttpd_show.erl:305— src/chttpd/src/chttpd_show.erl:305-315 | src/couch_mrview/src/couch_mrview_show.erl:354-364 — before extracting anything, compare `src/chttpd/src/chttpd_show.erl` and `src/couch_mrview/src/couch_mrview_show.erl` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 51 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (11 lines × 2) src/couch_pse_tests/src/cpse_test_purge_replication.erl:151— src/couch_pse_tests/src/cpse_test_purge_replication.erl:151-161 | src/couch_pse_tests/src/cpse_test_purge_replication.erl:164-174 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (15 lines × 2) src/couch/src/couch_native_process.erl:467— src/couch/src/couch_native_process.erl:467-481 | src/mango/src/mango_json.erl:94-108 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (15 lines × 2) src/couch_mrview/src/couch_mrview_http.erl:365— src/couch_mrview/src/couch_mrview_http.erl:365-379 | src/couch_replicator/src/couch_replicator_httpd_util.erl:141-155 — before extracting anything, compare `src/couch_mrview/src/couch_mrview_http.erl` and `src/couch_replicator/src/couch_replicator_httpd_util.erl` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 33 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (15 lines × 2) src/dreyfus/src/dreyfus_index.erl:125— src/dreyfus/src/dreyfus_index.erl:125-139 | src/nouveau/src/nouveau_util.erl:77-91 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (15 lines × 2) src/fabric/src/fabric_view_map.erl:99— src/fabric/src/fabric_view_map.erl:99-113 | src/fabric/src/fabric_view_reduce.erl:101-115 — before extracting anything, compare `src/fabric/src/fabric_view_map.erl` and `src/fabric/src/fabric_view_reduce.erl` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 64 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 (15 lines × 2) src/mango/src/mango_idx_nouveau.erl:375— src/mango/src/mango_idx_nouveau.erl:375-389 | src/mango/src/mango_idx_text.erl:388-402 — before extracting anything, compare `src/mango/src/mango_idx_nouveau.erl` and `src/mango/src/mango_idx_text.erl` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 288 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 (15 lines × 2) src/mango/src/mango_idx_nouveau.erl:152— src/mango/src/mango_idx_nouveau.erl:152-166 | src/mango/src/mango_idx_text.erl:159-173 — before extracting anything, compare `src/mango/src/mango_idx_nouveau.erl` and `src/mango/src/mango_idx_text.erl` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 288 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (14 lines × 2) src/chttpd/src/chttpd_rewrite.erl:434— src/chttpd/src/chttpd_rewrite.erl:434-447 | src/couch/src/couch_httpd_rewrite.erl:436-449 — before extracting anything, compare `src/chttpd/src/chttpd_rewrite.erl` and `src/couch/src/couch_httpd_rewrite.erl` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 197 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (14 lines × 2) src/chttpd/src/chttpd_rewrite.erl:516— src/chttpd/src/chttpd_rewrite.erl:516-529 | src/couch/src/couch_httpd_rewrite.erl:518-531 — before extracting anything, compare `src/chttpd/src/chttpd_rewrite.erl` and `src/couch/src/couch_httpd_rewrite.erl` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 197 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (14 lines × 2) src/chttpd/src/chttpd_show.erl:84— src/chttpd/src/chttpd_show.erl:84-97 | src/couch_mrview/src/couch_mrview_show.erl:82-95 — before extracting anything, compare `src/chttpd/src/chttpd_show.erl` and `src/couch_mrview/src/couch_mrview_show.erl` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 51 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (14 lines × 2) src/couch_mrview/src/couch_mrview.erl:412— src/couch_mrview/src/couch_mrview.erl:412-425 | src/couch_mrview/src/couch_mrview.erl:441-454 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (14 lines × 2) src/mango/src/mango_cursor_nouveau.erl:216— src/mango/src/mango_cursor_nouveau.erl:216-229 | src/mango/src/mango_cursor_text.erl:224-237 — before extracting anything, compare `src/mango/src/mango_cursor_nouveau.erl` and `src/mango/src/mango_cursor_text.erl` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 109 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (14 lines × 2) src/mem3/src/mem3_rep.erl:503— src/mem3/src/mem3_rep.erl:503-516 | src/mem3/src/mem3_rep.erl:575-588 — both copies are in the same file, so extract the 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/config/src/config_util.erl:31— src/config/src/config_util.erl:31-42 | src/couch/src/couch_util.erl:287-298 — before extracting anything, compare `src/config/src/config_util.erl` and `src/couch/src/couch_util.erl` as WHOLE FILES: this scan already matched 5 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (12 lines × 2) src/mango/src/mango_idx_nouveau.erl:198— src/mango/src/mango_idx_nouveau.erl:198-209 | src/mango/src/mango_idx_text.erl:203-214 — before extracting anything, compare `src/mango/src/mango_idx_nouveau.erl` and `src/mango/src/mango_idx_text.erl` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 288 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/dreyfus/src/dreyfus_util.erl:322— src/dreyfus/src/dreyfus_util.erl:322-333 | src/nouveau/src/nouveau_util.erl:206-217 — before extracting anything, compare `src/dreyfus/src/dreyfus_util.erl` and `src/nouveau/src/nouveau_util.erl` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 50 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (12 lines × 2) src/chttpd/src/chttpd_db.erl:103— src/chttpd/src/chttpd_db.erl:103-114 | src/couch/src/couch_httpd_db.erl:76-87 — before extracting anything, compare `src/chttpd/src/chttpd_db.erl` and `src/couch/src/couch_httpd_db.erl` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 93 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (12 lines × 2) src/couch_pse_tests/src/cpse_test_copy_purge_infos.erl:59— src/couch_pse_tests/src/cpse_test_copy_purge_infos.erl:59-70 | src/couch_pse_tests/src/cpse_test_fold_purge_infos.erl:40-51 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (12 lines × 2) src/couch_pse_tests/src/cpse_test_fold_purge_infos.erl:51— src/couch_pse_tests/src/cpse_test_fold_purge_infos.erl:51-62 | src/couch_pse_tests/src/cpse_test_fold_purge_infos.erl:82-93 — both copies are in the same file, so extract the 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 × 3) src/couch/src/couch_base32.erl:98— src/couch/src/couch_base32.erl:98-104 | src/couch/src/couch_base32.erl:109-115 | src/couch/src/couch_base32.erl:122-128 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (7 lines × 3) src/couch_event/src/couch_event_listener.erl:131— src/couch_event/src/couch_event_listener.erl:131-137 | src/couch_event/src/couch_event_listener.erl:143-149 | src/couch_event/src/couch_event_listener.erl:155-161 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (7 lines × 3) src/dreyfus/src/dreyfus_fabric_info.erl:92— src/dreyfus/src/dreyfus_fabric_info.erl:92-98 | src/fabric/src/fabric_group_info.erl:83-89 | src/nouveau/src/nouveau_fabric_info.erl:110-116 — before extracting anything, compare `src/dreyfus/src/dreyfus_fabric_info.erl` and `src/fabric/src/fabric_group_info.erl` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 51 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (7 lines × 3) src/couch/src/couch_base32.erl:34— src/couch/src/couch_base32.erl:34-40 | src/couch/src/couch_base32.erl:47-53 | src/couch/src/couch_base32.erl:62-68 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (7 lines × 3) src/couch_pse_tests/src/cpse_test_fold_purge_infos.erl:129— src/couch_pse_tests/src/cpse_test_fold_purge_infos.erl:129-135 | src/couch_pse_tests/src/cpse_test_fold_purge_infos.erl:146-152 | src/couch_pse_tests/src/cpse_test_fold_purge_infos.erl:160-166 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (7 lines × 3) src/couch_pse_tests/src/cpse_test_purge_replication.erl:127— src/couch_pse_tests/src/cpse_test_purge_replication.erl:127-133 | src/couch_pse_tests/src/cpse_test_purge_replication.erl:154-160 | src/couch_pse_tests/src/cpse_test_purge_replication.erl:167-173 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (13 lines × 2) src/couch/src/couch_att.erl:612— src/couch/src/couch_att.erl:612-624 | src/couch/src/couch_att.erl:672-684 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (13 lines × 2) src/couch_replicator/src/couch_replicator_fabric.erl:142— src/couch_replicator/src/couch_replicator_fabric.erl:142-154 | src/fabric/src/fabric_view_all_docs.erl:276-288 — before extracting anything, compare `src/couch_replicator/src/couch_replicator_fabric.erl` and `src/fabric/src/fabric_view_all_docs.erl` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (13 lines × 2) src/mango/src/mango_idx_nouveau.erl:211— src/mango/src/mango_idx_nouveau.erl:211-223 | src/mango/src/mango_idx_text.erl:216-228 — before extracting anything, compare `src/mango/src/mango_idx_nouveau.erl` and `src/mango/src/mango_idx_text.erl` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 288 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (13 lines × 2) src/chttpd/src/chttpd_rewrite.erl:291— src/chttpd/src/chttpd_rewrite.erl:291-303 | src/couch/src/couch_httpd_rewrite.erl:287-299 — before extracting anything, compare `src/chttpd/src/chttpd_rewrite.erl` and `src/couch/src/couch_httpd_rewrite.erl` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 197 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (13 lines × 2) src/couch_pse_tests/src/cpse_test_fold_purge_infos.erl:122— src/couch_pse_tests/src/cpse_test_fold_purge_infos.erl:122-134 | src/couch_pse_tests/src/cpse_test_fold_purge_infos.erl:154-166 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8–9 lines × 2) src/chttpd/src/chttpd_db.erl:2131— src/chttpd/src/chttpd_db.erl:2131-2139 | src/couch/src/couch_httpd_db.erl:1212-1219 — before extracting anything, compare `src/chttpd/src/chttpd_db.erl` and `src/couch/src/couch_httpd_db.erl` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 93 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (8–9 lines × 2) src/couch/src/couch_att.erl:404— src/couch/src/couch_att.erl:404-411 | src/couch/src/couch_att.erl:416-424 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8–9 lines × 2) src/couch/src/couch_key_tree.erl:261— src/couch/src/couch_key_tree.erl:261-268 | src/couch/src/couch_key_tree.erl:583-591 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8–9 lines × 2) src/couch_mrview/src/couch_mrview_http.erl:382— src/couch_mrview/src/couch_mrview_http.erl:382-390 | src/couch_replicator/src/couch_replicator_httpd_util.erl:158-165 — before extracting anything, compare `src/couch_mrview/src/couch_mrview_http.erl` and `src/couch_replicator/src/couch_replicator_httpd_util.erl` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 33 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (8–9 lines × 2) src/fabric/src/fabric_view_all_docs.erl:251— src/fabric/src/fabric_view_all_docs.erl:251-258 | src/fabric/src/fabric_view_map.erl:190-198 — before extracting anything, compare `src/fabric/src/fabric_view_all_docs.erl` and `src/fabric/src/fabric_view_map.erl` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 39 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 3) src/couch/src/couch_base32.erl:31— src/couch/src/couch_base32.erl:31-35 | src/couch/src/couch_base32.erl:43-47 | src/couch/src/couch_base32.erl:56-60 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (5 lines × 3) src/couch_replicator/src/couch_replicator_fabric.erl:132— src/couch_replicator/src/couch_replicator_fabric.erl:132-136 | src/fabric/src/fabric_view_all_docs.erl:261-265 | src/fabric/src/fabric_view_reduce.erl:173-177 — before extracting anything, compare `src/couch_replicator/src/couch_replicator_fabric.erl` and `src/fabric/src/fabric_view_all_docs.erl` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 3) src/dreyfus/src/dreyfus_fabric_info.erl:84— src/dreyfus/src/dreyfus_fabric_info.erl:84-88 | src/fabric/src/fabric_group_info.erl:75-79 | src/nouveau/src/nouveau_fabric_info.erl:102-106 — before extracting anything, compare `src/dreyfus/src/dreyfus_fabric_info.erl` and `src/fabric/src/fabric_group_info.erl` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 51 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 3) src/couch/src/couch_httpd_vhost.erl:407— src/couch/src/couch_httpd_vhost.erl:407-411 | src/couch/src/couch_uuids.erl:75-79 | src/jwtf/src/jwtf_keystore.erl:72-76 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
Duplicated block (5 lines × 3) src/couch_replicator/src/couch_replicator_auth.erl:167— src/couch_replicator/src/couch_replicator_auth.erl:167-171 | src/couch_replicator/src/couch_replicator_connection.erl:267-271 | src/couch_replicator/src/couch_replicator_scheduler.erl:401-405 — 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.
FixmeComment src/couch/test/eunit/couch_flags_tests.erl:57— %% FIXME after we upgrade couch_epi — 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.
FixmeComment src/couch/test/eunit/couchdb_update_conflicts_tests.erl:183— %% FIXME: server restart won't work from test side — 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.
FixmeComment src/couch/test/eunit/couchdb_views_tests.erl:671— %% FIXME we need to grab monitor earlier — 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.
FixmeComment src/couch/src/couch_httpd_multipart.erl:41— %% FIXME: How to remove the knowledge about this message? — 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.
Duplicated block (31 lines × 2) src/chttpd/src/chttpd.erl:133— src/chttpd/src/chttpd.erl:133-163 | src/couch/src/couch_httpd.erl:87-117 — before extracting anything, compare `src/chttpd/src/chttpd.erl` and `src/couch/src/couch_httpd.erl` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 199 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (31 lines × 2) src/chttpd/src/chttpd_db.erl:1768— src/chttpd/src/chttpd_db.erl:1768-1798 | src/couch/src/couch_httpd_db.erl:896-926 — before extracting anything, compare `src/chttpd/src/chttpd_db.erl` and `src/couch/src/couch_httpd_db.erl` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 93 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (31 lines × 2) src/fabric/src/fabric_ring.erl:241— src/fabric/src/fabric_ring.erl:241-271 | src/fabric/src/fabric_view.erl:468-498 — 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 (31 lines × 2) src/mango/src/mango_cursor_nouveau.erl:95— src/mango/src/mango_cursor_nouveau.erl:95-125 | src/mango/src/mango_cursor_text.erl:100-130 — before extracting anything, compare `src/mango/src/mango_cursor_nouveau.erl` and `src/mango/src/mango_cursor_text.erl` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 109 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (16 lines × 2) src/chttpd/src/chttpd_rewrite.erl:499— src/chttpd/src/chttpd_rewrite.erl:499-514 | src/couch/src/couch_httpd_rewrite.erl:501-516 — before extracting anything, compare `src/chttpd/src/chttpd_rewrite.erl` and `src/couch/src/couch_httpd_rewrite.erl` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 197 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (16 lines × 2) src/dreyfus/src/dreyfus_fabric_info.erl:93— src/dreyfus/src/dreyfus_fabric_info.erl:93-108 | src/fabric/src/fabric_group_info.erl:84-99 — before extracting anything, compare `src/dreyfus/src/dreyfus_fabric_info.erl` and `src/fabric/src/fabric_group_info.erl` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 51 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (16 lines × 2) src/dreyfus/src/dreyfus_util.erl:446— src/dreyfus/src/dreyfus_util.erl:446-461 | src/nouveau/src/nouveau_util.erl:157-172 — before extracting anything, compare `src/dreyfus/src/dreyfus_util.erl` and `src/nouveau/src/nouveau_util.erl` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 50 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (16 lines × 2) src/mango/src/mango_idx_nouveau.erl:271— src/mango/src/mango_idx_nouveau.erl:271-286 | src/mango/src/mango_idx_text.erl:276-291 — before extracting anything, compare `src/mango/src/mango_idx_nouveau.erl` and `src/mango/src/mango_idx_text.erl` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 288 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 × 3) src/b64url/src/b64url.erl:53— src/b64url/src/b64url.erl:53-61 | src/couch/src/couch_cfile.erl:221-229 | src/exxhash/src/exxhash.erl:40-48 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
Duplicated block (9 lines × 3) src/couch_mrview/src/couch_mrview_http.erl:422— src/couch_mrview/src/couch_mrview_http.erl:422-430 | src/couch_replicator/src/couch_replicator_httpd_util.erl:108-116 | src/mango/src/mango_httpd.erl:321-329 — before extracting anything, compare `src/couch_mrview/src/couch_mrview_http.erl` and `src/couch_replicator/src/couch_replicator_httpd_util.erl` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 33 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (9 lines × 3) src/fabric/src/fabric_db_doc_count.erl:25— src/fabric/src/fabric_db_doc_count.erl:25-33 | src/fabric/src/fabric_db_uuids.erl:25-33 | src/fabric/src/fabric_design_doc_count.erl:25-33 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
Duplicated block (9 lines × 3) src/mem3/src/mem3_reshard.erl:542— src/mem3/src/mem3_reshard.erl:542-550 | src/mem3/src/mem3_reshard.erl:554-562 | src/mem3/src/mem3_reshard.erl:566-574 — 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.
Hotspot: src/chttpd/src/chttpd.erl src/chttpd/src/chttpd.erl:1021— src/chttpd/src/chttpd.erl changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 56 in chttpd.error_info at line 1021. 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-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-12 01:29:44 -05:00' --until='2026-11-10 01:29:44 -05:00' --full-history --no-merges -- src/chttpd/src/chttpd.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.
Hotspot: src/chttpd/src/chttpd_auth_request.erl src/chttpd/src/chttpd_auth_request.erl:32— src/chttpd/src/chttpd_auth_request.erl changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 30 in chttpd_auth_request.authorize_request_int at line 32. 2 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-12 01:29:44 -05:00' --until='2026-11-10 01:29:44 -05:00' --full-history --no-merges -- src/chttpd/src/chttpd_auth_request.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.
Hotspot: src/fabric/src/fabric_doc_update.erl src/fabric/src/fabric_doc_update.erl:86— src/fabric/src/fabric_doc_update.erl changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in fabric_doc_update.handle_message at line 86. 1 of those changes was a fix/bug commit, and the other 1 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-12 01:29:44 -05:00' --until='2026-11-10 01:29:44 -05:00' --full-history --no-merges -- src/fabric/src/fabric_doc_update.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.
HackComment test/elixir/test/mango/13_stable_update_test.exs:38— # Hack to prevent auto-indexer from foiling update=False test — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
HackComment src/mem3/src/mem3_sync_event.erl:62— % Hack around rpc:multicall/4 so that we can — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
HackComment src/fabric/src/fabric_db_meta.erl:105— % Hack to reuse fabric_ring:is_progress_possible/1 — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
D4 · Code Duplication· Members sharing a duplicated core (4 members, 50+ identical tokens) · ×3
Members sharing a duplicated core (4 members, 50+ identical tokens) src/couch_replicator/src/couch_replicator_fabric.erl:95— src/couch_replicator/src/couch_replicator_fabric.erl:95-140 | src/fabric/src/fabric_view_all_docs.erl:193-274 | src/fabric/src/fabric_view_map.erl:147-224 | src/fabric/src/fabric_view_reduce.erl:133-186 — These 4 members share a duplicated core: a REDACTED of at least 50 identical tokens appears in every one of them. That REDACTED 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/couch_pse_tests/src/cpse_test_attachments.erl:27— src/couch_pse_tests/src/cpse_test_attachments.erl:27-73 | src/couch_pse_tests/src/cpse_test_read_write_docs.erl:42-84 | src/couch_pse_tests/src/cpse_test_read_write_docs.erl:131-172 | src/couch_pse_tests/src/cpse_test_read_write_docs.erl:174-213 — These 4 members share a duplicated core: a REDACTED of at least 50 identical tokens appears in every one of them. That REDACTED 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/couch_pse_tests/src/cpse_test_fold_docs.erl:88— src/couch_pse_tests/src/cpse_test_fold_docs.erl:88-137 | src/couch_pse_tests/src/cpse_test_fold_docs.erl:139-190 | src/couch_pse_tests/src/cpse_test_fold_docs.erl:192-243 | src/couch_pse_tests/src/cpse_test_fold_docs.erl:245-314 — These 4 members share a duplicated core: a REDACTED of at least 50 identical tokens appears in every one of them. That REDACTED 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.
Duplicated block (13 lines × 3) src/mango/src/mango_idx_nouveau.erl:54— src/mango/src/mango_idx_nouveau.erl:54-66 | src/mango/src/mango_idx_text.erl:54-66 | src/mango/src/mango_idx_view.erl:59-71 — before extracting anything, compare `src/mango/src/mango_idx_nouveau.erl` and `src/mango/src/mango_idx_text.erl` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 288 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (13 lines × 3) src/couch_pse_tests/src/cpse_test_compaction.erl:170— src/couch_pse_tests/src/cpse_test_compaction.erl:170-182 | src/couch_pse_tests/src/cpse_test_compaction.erl:211-223 | src/couch_pse_tests/src/cpse_test_compaction.erl:257-269 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (13 lines × 3) src/couch_pse_tests/src/cpse_test_purge_docs.erl:72— src/couch_pse_tests/src/cpse_test_purge_docs.erl:72-84 | src/couch_pse_tests/src/cpse_test_purge_docs.erl:405-417 | src/couch_pse_tests/src/cpse_test_purge_docs.erl:427-439 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (6 lines × 3) src/couch_pse_tests/src/cpse_test_compaction.erl:274— src/couch_pse_tests/src/cpse_test_compaction.erl:274-279 | src/couch_pse_tests/src/cpse_test_copy_purge_infos.erl:58-63 | src/couch_pse_tests/src/cpse_test_fold_purge_infos.erl:39-44 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
Duplicated block (6 lines × 3) src/couch_pse_tests/src/cpse_test_fold_docs.erl:115— src/couch_pse_tests/src/cpse_test_fold_docs.erl:115-120 | src/couch_pse_tests/src/cpse_test_fold_docs.erl:128-133 | src/couch_pse_tests/src/cpse_test_fold_docs.erl:276-281 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (6 lines × 3) src/couch_pse_tests/src/cpse_test_read_write_docs.erl:87— src/couch_pse_tests/src/cpse_test_read_write_docs.erl:87-92 | src/couch_pse_tests/src/cpse_test_read_write_docs.erl:132-137 | src/couch_pse_tests/src/cpse_test_read_write_docs.erl:175-180 — 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.
(anonymous).ddoc (cognitive 32) share/server/dispatch-quickjs.js:60— (anonymous).ddoc has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (22 pts), ternaries 1 (6 pts), loops 2 (4 pts) (nesting depth added 20). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
(anonymous).ddoc (cognitive 32) share/server/loop.js:69— (anonymous).ddoc has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (22 pts), ternaries 1 (6 pts), loops 2 (4 pts) (nesting depth added 20). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Duplicated block (24 lines × 2) src/mango/src/mango_idx_nouveau.erl:105— src/mango/src/mango_idx_nouveau.erl:105-128 | src/mango/src/mango_idx_text.erl:105-128 — before extracting anything, compare `src/mango/src/mango_idx_nouveau.erl` and `src/mango/src/mango_idx_text.erl` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 288 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 (24 lines × 2) src/mango/src/mango_idx_nouveau.erl:288— src/mango/src/mango_idx_nouveau.erl:288-311 | src/mango/src/mango_idx_text.erl:293-316 — before extracting anything, compare `src/mango/src/mango_idx_nouveau.erl` and `src/mango/src/mango_idx_text.erl` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 288 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/chttpd/src/chttpd_rewrite.erl:382— src/chttpd/src/chttpd_rewrite.erl:382-398 | src/couch/src/couch_httpd_rewrite.erl:378-394 — before extracting anything, compare `src/chttpd/src/chttpd_rewrite.erl` and `src/couch/src/couch_httpd_rewrite.erl` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 197 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (17 lines × 2) src/couch_log/src/couch_log_writer_file.erl:74— src/couch_log/src/couch_log_writer_file.erl:74-90 | src/couch_log/src/couch_log_writer_stderr.erl:31-47 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (15 lines × 3) src/dreyfus/src/dreyfus_fabric_group1.erl:109— src/dreyfus/src/dreyfus_fabric_group1.erl:109-123 | src/dreyfus/src/dreyfus_fabric_group2.erl:128-142 | src/dreyfus/src/dreyfus_fabric_search.erl:193-207 — before extracting anything, compare `src/dreyfus/src/dreyfus_fabric_group1.erl` and `src/dreyfus/src/dreyfus_fabric_group2.erl` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 55 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (15 lines × 3) src/dreyfus/src/dreyfus_fabric_info.erl:66— src/dreyfus/src/dreyfus_fabric_info.erl:66-80 | src/fabric/src/fabric_group_info.erl:57-71 | src/nouveau/src/nouveau_fabric_info.erl:84-98 — before extracting anything, compare `src/dreyfus/src/dreyfus_fabric_info.erl` and `src/fabric/src/fabric_group_info.erl` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 51 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (9–10 lines × 3) src/mango/src/mango_doc.erl:213— src/mango/src/mango_doc.erl:213-222 | src/mango/src/mango_doc.erl:297-305 | src/mango/src/mango_doc.erl:330-338 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (9–10 lines × 3) src/couch_pse_tests/src/cpse_test_purge_docs.erl:32— src/couch_pse_tests/src/cpse_test_purge_docs.erl:32-41 | src/couch_pse_tests/src/cpse_test_purge_seqs.erl:31-40 | src/couch_pse_tests/src/cpse_test_purge_seqs.erl:71-79 — before extracting anything, compare `src/couch_pse_tests/src/cpse_test_purge_docs.erl` and `src/couch_pse_tests/src/cpse_test_purge_seqs.erl` as WHOLE FILES: this scan already matched 4 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.
Duplicated block (9–10 lines × 2) src/couch_log/src/couch_log_trunc_io.erl:398— src/couch_log/src/couch_log_trunc_io.erl:398-406 | src/couch_log/src/couch_log_trunc_io.erl:408-417 — both copies are in the same file, so extract the 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–10 lines × 2) src/fabric/src/fabric_db_info.erl:124— src/fabric/src/fabric_db_info.erl:124-133 | src/fabric/src/fabric_group_info.erl:149-157 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (8 lines × 3) src/mango/src/mango_idx_nouveau.erl:96— src/mango/src/mango_idx_nouveau.erl:96-103 | src/mango/src/mango_idx_text.erl:96-103 | src/mango/src/mango_idx_view.erl:102-109 — before extracting anything, compare `src/mango/src/mango_idx_nouveau.erl` and `src/mango/src/mango_idx_text.erl` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 288 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 3) src/dreyfus/src/dreyfus_fabric_info.erl:112— src/dreyfus/src/dreyfus_fabric_info.erl:112-119 | src/fabric/src/fabric_group_info.erl:102-109 | src/nouveau/src/nouveau_fabric_info.erl:133-140 — before extracting anything, compare `src/dreyfus/src/dreyfus_fabric_info.erl` and `src/fabric/src/fabric_group_info.erl` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 51 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (11 lines × 4) src/couch_replicator/src/couch_replicator_fabric.erl:34— src/couch_replicator/src/couch_replicator_fabric.erl:34-45 | src/fabric/src/fabric_view_all_docs.erl:37-47 | src/fabric/src/fabric_view_map.erl:65-76 | src/fabric/src/fabric_view_reduce.erl:57-68 — before extracting anything, compare `src/couch_replicator/src/couch_replicator_fabric.erl` and `src/fabric/src/fabric_view_all_docs.erl` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (11 lines × 4) src/couch_pse_tests/src/cpse_test_purge_docs.erl:89— src/couch_pse_tests/src/cpse_test_purge_docs.erl:89-99 | src/couch_pse_tests/src/cpse_test_purge_docs.erl:119-129 | src/couch_pse_tests/src/cpse_test_purge_docs.erl:153-163 | src/couch_pse_tests/src/cpse_test_purge_docs.erl:334-344 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (12–13 lines × 2) src/couch_dist/certs/certs.exs:73— src/couch_dist/certs/certs.exs:73-85 | src/couch_dist/certs/certs.exs:91-102 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12–13 lines × 2) src/couch_pse_tests/src/cpse_test_fold_purge_infos.erl:110— src/couch_pse_tests/src/cpse_test_fold_purge_infos.erl:110-122 | src/couch_pse_tests/src/cpse_test_fold_purge_infos.erl:140-151 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Handler temporal coupling: couch_httpd_vhost clause `handle_config_change/5#413` src/couch/src/couch_httpd_vhost.erl:414— `couch_httpd_vhost` clause `handle_config_change/5#413` makes a synchronous `gen_server`/`gen_statem:call` round-trip to a peer process 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, react by casting a follow-up message (fire-and-forget), or resolve the needed state locally.
Handler temporal coupling: couch_log_sup clause `handle_config_change/5#57` src/couch_log/src/couch_log_sup.erl:72— `couch_log_sup` clause `handle_config_change/5#57` makes a synchronous `gen_server`/`gen_statem:call` round-trip to a peer process 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, react by casting a follow-up message (fire-and-forget), or resolve the needed state locally.
Outbound HTTP without resilience build-aux/logfile-uploader.py:106— `requests.post(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience build-aux/logfile-uploader.py:117— `requests.put(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
mango_selector.match (cyclomatic 59) src/mango/src/mango_selector.erl:366— mango_selector.match has cyclomatic complexity 59 (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.
mango_selector.norm_ops (cyclomatic 58) src/mango/src/mango_selector.erl:67— mango_selector.norm_ops has cyclomatic complexity 58 (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.
couch_log_trunc_io.print (cyclomatic 54) src/couch_log/src/couch_log_trunc_io.erl:111— couch_log_trunc_io.print has cyclomatic complexity 54 (threshold 15). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
mem3_reshard_httpd.handle_reshard_req (cyclomatic 53) src/mem3/src/mem3_reshard_httpd.erl:33— mem3_reshard_httpd.handle_reshard_req has cyclomatic complexity 53 (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.
couch_mrview_util.validate_args_int (cyclomatic 50) src/couch_mrview/src/couch_mrview_util.erl:604— couch_mrview_util.validate_args_int has cyclomatic complexity 50 (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.
mango_selector_text.convert (cyclomatic 49) src/mango/src/mango_selector_text.erl:37— mango_selector_text.convert has cyclomatic complexity 49 (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.
couch_server.handle_call (cyclomatic 44) src/couch/src/couch_server.erl:548— couch_server.handle_call has cyclomatic complexity 44 (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.
mango_idx_view.range (cyclomatic 40) src/mango/src/mango_idx_view.erl:421— mango_idx_view.range has cyclomatic complexity 40 (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.
couch_ejson_size.encoded_size (cyclomatic 32) src/couch/src/couch_ejson_size.erl:19— couch_ejson_size.encoded_size 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.
couch_native_process.ddoc (cyclomatic 30) src/couch/src/couch_native_process.erl:228— couch_native_process.ddoc has cyclomatic complexity 30 (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.
mem3_reshard.handle_call (cyclomatic 30) src/mem3/src/mem3_reshard.erl:221— mem3_reshard.handle_call has cyclomatic complexity 30 (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.
couch_replicator_auth_ibm.handle_info (cyclomatic 28) src/couch_replicator/src/couch_replicator_auth_ibm.erl:217— couch_replicator_auth_ibm.handle_info 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.
chttpd_db.parse_changes_query (cyclomatic 27) src/chttpd/src/chttpd_db.erl:2293— chttpd_db.parse_changes_query has cyclomatic complexity 27 (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.
couch_replicator_scheduler_job.handle_info (cyclomatic 27) src/couch_replicator/src/couch_replicator_scheduler_job.erl:285— couch_replicator_scheduler_job.handle_info has cyclomatic complexity 27 (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.
couch_changes.filter (cyclomatic 25) src/couch/src/couch_changes.erl:228— couch_changes.filter has cyclomatic complexity 25 (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.
couch_log_formatter.do_format (cyclomatic 25) src/couch_log/src/couch_log_formatter.erl:87— couch_log_formatter.do_format has cyclomatic complexity 25 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: couch_log_formatter.format_reason (cyclomatic 34) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
(anonymous) (cyclomatic 25) share/server/mimeparse.js:19— (anonymous) has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 1 of the 25 points is its own statement and the rest belongs to 8 function items inside it that branch (fitnessAndQualityParsed, parseMediaRange, parseMimeType, …). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
couch_file.handle_call (cyclomatic 24) src/couch/src/couch_file.erl:533— couch_file.handle_call 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.
mem3_reshard_api.pick_shards (cyclomatic 24) src/mem3/src/mem3_reshard_api.erl:182— mem3_reshard_api.pick_shards has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
mango_httpd.handle_index_req (cyclomatic 22) src/mango/src/mango_httpd.erl:54— mango_httpd.handle_index_req 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.
fabric_view_all_docs.go (cyclomatic 21) src/fabric/src/fabric_view_all_docs.erl:24— fabric_view_all_docs.go 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.
mango_native_proc.handle_call (cyclomatic 21) src/mango/src/mango_native_proc.erl:57— mango_native_proc.handle_call 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.
mango_doc.rem_field (cyclomatic 20) src/mango/src/mango_doc.erl:418— mango_doc.rem_field 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.
couch_native_process.run (cyclomatic 19) src/couch/src/couch_native_process.erl:130— couch_native_process.run 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.
couch_log_trunc_io.alist_start (cyclomatic 18) src/couch_log/src/couch_log_trunc_io.erl:386— couch_log_trunc_io.alist_start has cyclomatic complexity 18 (threshold 15). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages. This is NOT this file's highest cyclomatic complexity: couch_log_trunc_io.alist (cyclomatic 21) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
fabric_streams.handle_stream_start (cyclomatic 18) src/fabric/src/fabric_streams.erl:116— fabric_streams.handle_stream_start 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.
ken_server.should_start_job (cyclomatic 18) src/ken/src/ken_server.erl:415— ken_server.should_start_job 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.
couch_db_updater.handle_info (cyclomatic 17) src/couch/src/couch_db_updater.erl:178— couch_db_updater.handle_info 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.
smoosh_server.get_priority (cyclomatic 17) src/smoosh/src/smoosh_server.erl:435— smoosh_server.get_priority 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.
couch_btree.modify_kvnode (cyclomatic 16) src/couch/src/couch_btree.erl:739— couch_btree.modify_kvnode 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.
couch_db.prep_and_validate_replicated_updates (cyclomatic 16) src/couch/src/couch_db.erl:1192— couch_db.prep_and_validate_replicated_updates 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.
couch_doc.validate_docid (cyclomatic 16) src/couch/src/couch_doc.erl:242— couch_doc.validate_docid 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.
couch_httpd_multipart.maybe_send_data (cyclomatic 16) src/couch/src/couch_httpd_multipart.erl:141— couch_httpd_multipart.maybe_send_data 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.
couch_httpd_multipart.mp_parse_atts (cyclomatic 16) src/couch/src/couch_httpd_multipart.erl:83— couch_httpd_multipart.mp_parse_atts 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.
dreyfus_httpd.handle_search_req (cyclomatic 16) src/dreyfus/src/dreyfus_httpd.erl:36— dreyfus_httpd.handle_search_req 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. This is NOT this file's highest cyclomatic complexity: dreyfus_httpd.parse_json_index_param (cyclomatic 23) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
fabric_view_all_docs.handle_message (cyclomatic 16) src/fabric/src/fabric_view_all_docs.erl:193— fabric_view_all_docs.handle_message 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.
mango_doc.set_field (cyclomatic 16) src/mango/src/mango_doc.erl:480— mango_doc.set_field 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.
(anonymous).runShow (cyclomatic 16) share/server/render.js:237— (anonymous).runShow has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
No dependency lockfile committed (mix.exs) — mix.exs declares 3 dependencies but no lockfile (mix.lock or rebar.lock) is committed beside it, so `mix deps.get` resolves versions afresh on every machine and every CI REDACTED — two builds of this commit are not guaranteed to be the same build. Commit the lockfile.
couch_httpd.error_headers (cognitive 51) src/couch/src/couch_httpd.erl:1083— couch_httpd.error_headers has cognitive complexity 51 (threshold 15). Drivers by points: match/switch 14 (50 pts), if/else 1 (nesting depth added 36). 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.
couch_server.handle_call (cognitive 42) src/couch/src/couch_server.erl:548— couch_server.handle_call has cognitive complexity 42 (threshold 15). Drivers by points: match/switch 23 (32 pts), loops 3 (7 pts), boolean chains 1, error handling 1, if/else 1 (nesting depth added 13). 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.
chttpd.error_headers (cognitive 41) src/chttpd/src/chttpd.erl:1170— chttpd.error_headers has cognitive complexity 41 (threshold 15). Drivers by points: match/switch 13 (41 pts) (nesting depth added 28). 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.
couch_log_trunc_io.print (cognitive 39) src/couch_log/src/couch_log_trunc_io.erl:111— couch_log_trunc_io.print has cognitive complexity 39 (threshold 15). Drivers by points: match/switch 19 (29 pts), boolean chains 8, error handling 1 (2 pts) (nesting depth added 11). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
couch_mrview_util.validate_args_int (cognitive 39) src/couch_mrview/src/couch_mrview_util.erl:604— couch_mrview_util.validate_args_int has cognitive complexity 39 (threshold 15). Drivers by points: match/switch 36, boolean chains 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.
couch_httpd_multipart.maybe_send_data (cognitive 29) src/couch/src/couch_httpd_multipart.erl:141— couch_httpd_multipart.maybe_send_data has cognitive complexity 29 (threshold 15). Drivers by points: match/switch 11 (20 pts), loops 2 (5 pts), if/else 3, 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.
LuceneIndex.toDocument (cognitive 28) extra/nouveau/src/main/java/org/apache/couchdb/nouveau/lucene/LuceneIndex.java:412— LuceneIndex.toDocument has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (14 pts), ternaries 3 (9 pts), error handling 1 (4 pts), loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
chttpd_db.parse_changes_query (cognitive 27) src/chttpd/src/chttpd_db.erl:2293— chttpd_db.parse_changes_query has cognitive complexity 27 (threshold 15). Drivers by points: match/switch 14 (19 pts), error handling 4 (8 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.
couch_db.prep_and_validate_replicated_updates (cognitive 26) src/couch/src/couch_db.erl:1192— couch_db.prep_and_validate_replicated_updates has cognitive complexity 26 (threshold 15). Drivers by points: match/switch 11 (21 pts), loops 3 (5 pts) (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.
mem3_reshard_httpd.handle_reshard_req (cognitive 26) src/mem3/src/mem3_reshard_httpd.erl:33— mem3_reshard_httpd.handle_reshard_req has cognitive complexity 26 (threshold 15). Drivers by points: match/switch 17 (25 pts), loops 1 (nesting depth added 8). 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.
couch_db_updater.handle_info (cognitive 25) src/couch/src/couch_db_updater.erl:178— couch_db_updater.handle_info has cognitive complexity 25 (threshold 15). Drivers by points: match/switch 8 (11 pts), error handling 3 (7 pts), loops 3 (5 pts), if/else 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
mango_selector.match (cognitive 24) src/mango/src/mango_selector.erl:366— mango_selector.match has cognitive complexity 24 (threshold 15). Drivers by points: match/switch 10 (13 pts), error handling 6, boolean chains 3, loops 1 (2 pts) (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.
mem3_reshard_api.pick_shards (cognitive 23) src/mem3/src/mem3_reshard_api.erl:182— mem3_reshard_api.pick_shards has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 5, boolean chains 4 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
(anonymous)::fitnessAndQualityParsed (cognitive 23) share/server/mimeparse.js:90— (anonymous)::fitnessAndQualityParsed has cognitive complexity 23 (threshold 15). Drivers by points: if/else 3 (9 pts), ternaries 2 (6 pts), boolean chains 4, loops 2 (4 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
couch_replicator_auth_ibm.handle_info (cognitive 22) src/couch_replicator/src/couch_replicator_auth_ibm.erl:217— couch_replicator_auth_ibm.handle_info has cognitive complexity 22 (threshold 15). Drivers by points: match/switch 13 (20 pts), if/else 2 (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.
dreyfus_httpd.handle_search_req (cognitive 22) src/dreyfus/src/dreyfus_httpd.erl:36— dreyfus_httpd.handle_search_req has cognitive complexity 22 (threshold 15). Drivers by points: match/switch 9 (17 pts), loops 1 (4 pts), boolean chains 1 (nesting depth added 11). 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.
fabric_view.possibly_embed_doc (cognitive 22) src/fabric/src/fabric_view.erl:185— fabric_view.possibly_embed_doc has cognitive complexity 22 (threshold 15). Drivers by points: match/switch 10 (21 pts), boolean chains 1 (nesting depth added 11). 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.
couch_native_process.ddoc (cognitive 21) src/couch/src/couch_native_process.erl:228— couch_native_process.ddoc has cognitive complexity 21 (threshold 15). Drivers by points: match/switch 13 (14 pts), error handling 7 (nesting depth added 1). 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.
fabric_doc_atts.middleman_loop (cognitive 20) src/fabric/src/fabric_doc_atts.erl:128— fabric_doc_atts.middleman_loop has cognitive complexity 20 (threshold 15). Drivers by points: match/switch 7 (12 pts), loops 2 (5 pts), if/else 2, boolean chains 1 (nesting depth added 8). 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.
(anonymous).runShow (cognitive 19) share/server/render.js:237— (anonymous).runShow has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 9, if/else 6 (7 pts), loops 1 (2 pts), error handling 1 (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
couch_file.init (cognitive 18) src/couch/src/couch_file.erl:453— couch_file.init has cognitive complexity 18 (threshold 15). Drivers by points: match/switch 9 (18 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.
fabric_doc_update.force_reply (cognitive 18) src/fabric/src/fabric_doc_update.erl:233— fabric_doc_update.force_reply has cognitive complexity 18 (threshold 15). Drivers by points: match/switch 7 (16 pts), loops 1 (2 pts) (nesting depth added 10). 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.
mango_httpd.handle_index_req (cognitive 18) src/mango/src/mango_httpd.erl:54— mango_httpd.handle_index_req has cognitive complexity 18 (threshold 15). Drivers by points: match/switch 13 (17 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.
linter.line_length_checker (cognitive 18) src/docs/ext/linter.py:201— linter.line_length_checker has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 4, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
chttpd.absolute_uri (cognitive 17) src/chttpd/src/chttpd.erl:689— chttpd.absolute_uri has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 11 (17 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.
couch_file.verify_checksum (cognitive 17) src/couch/src/couch_file.erl:898— couch_file.verify_checksum has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 11 (17 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.
couch_mrview_util.get_view_index_state (cognitive 17) src/couch_mrview/src/couch_mrview_util.erl:187— couch_mrview_util.get_view_index_state has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 6 (10 pts), error handling 4 (6 pts), boolean chains 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.
couch_replicator_httpc.process_stream_response (cognitive 17) src/couch_replicator/src/couch_replicator_httpc.erl:215— couch_replicator_httpc.process_stream_response has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 4 (7 pts), error handling 2 (6 pts), boolean chains 3, if/else 1 (nesting depth added 7). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
couch_replicator_scheduler_job.handle_info (cognitive 17) src/couch_replicator/src/couch_replicator_scheduler_job.erl:285— couch_replicator_scheduler_job.handle_info has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 9 (10 pts), error handling 4 (6 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.
fabric_db_create.go (cognitive 17) src/fabric/src/fabric_db_create.erl:21— fabric_db_create.go has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 7 (17 pts) (nesting depth added 10). 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.
ken_server.should_start_job (cognitive 17) src/ken/src/ken_server.erl:415— ken_server.should_start_job has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 6 (10 pts), boolean chains 5, if/else 2 (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.
mango_doc.rem_field (cognitive 17) src/mango/src/mango_doc.erl:418— mango_doc.rem_field has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 8 (13 pts), boolean chains 2, error handling 2 (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.
Range.equals (cognitive 17) extra/nouveau/src/main/java/org/apache/couchdb/nouveau/api/Range.java:106— Range.equals has cognitive complexity 17 (threshold 15). Drivers by points: if/else 14 (17 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
couch_btree.make_group_fun (cognitive 16) src/couch/src/couch_btree.erl:185— couch_btree.make_group_fun 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.
couch_httpd_multipart.mp_parse_atts (cognitive 16) src/couch/src/couch_httpd_multipart.erl:83— couch_httpd_multipart.mp_parse_atts has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 9 (14 pts), boolean chains 2 (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.
fabric_view_all_docs.go (cognitive 16) src/fabric/src/fabric_view_all_docs.erl:24— fabric_view_all_docs.go has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 13 (16 pts) (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.
mem3_shards.changes_callback (cognitive 16) src/mem3/src/mem3_shards.erl:378— mem3_shards.changes_callback has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 4 (7 pts), if/else 1 (5 pts), loops 1 (4 pts) (nesting depth added 10). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
setup_httpd.handle_setup_req (cognitive 16) src/setup/src/setup_httpd.erl:18— setup_httpd.handle_setup_req has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 8 (16 pts) (nesting depth added 8). 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.
IndexManager.with (cognitive 16) extra/nouveau/src/main/java/org/apache/couchdb/nouveau/core/IndexManager.java:115— IndexManager.with has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (10 pts), boolean chains 3, match/switch 1 (2 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
linter.validate (cognitive 16) src/docs/ext/linter.py:64— linter.validate has cognitive complexity 16 (threshold 15). Drivers by points: loops 5 (8 pts), if/else 2 (5 pts), error handling 1 (3 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.
(anonymous).runProvides (cognitive 16) share/server/render.js:78— (anonymous).runProvides has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 4). Of this number, 13 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
compileFunction (cognitive 16) share/server/util.js:61— compileFunction has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (9 pts), error handling 2 (3 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 3). Of this number, 10 points are the body's own statements and 6 belong to 2 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
Change coupling: fabric_view_map.erl ↔ fabric_view_reduce.erl src/fabric/src/fabric_view_map.erl:1— `src/fabric/src/fabric_view_map.erl` and `src/fabric/src/fabric_view_reduce.erl` change together 69% of the time (9 of the 13 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) 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 9 shared commits counted here, the most recent 3 are `eb89864d` Speed up views with ICU sort keys; `82321a57` Improve fabric streams cleanup on error and timeouts; `fe0c8936` Improve worker cleanup on early coordinator exit — REDACTED `git show` on any of them.
Near-duplicate member pair (45 shared lines) src/chttpd/src/chttpd.erl:102— src/chttpd/src/chttpd.erl:102-177 | src/couch/src/couch_httpd.erl:60-129 — These two members are variants of one another: 45 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication· Edited copy of a member (17 corresponding lines) · ×1
Edited copy of a member (17 corresponding lines) src/dreyfus/src/dreyfus_fabric_info.erl:48— src/dreyfus/src/dreyfus_fabric_info.erl:48-64 | src/nouveau/src/nouveau_fabric_info.erl:66-82 — 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 (10 corresponding lines) · ×1
Edited copy of a member (10 corresponding lines) src/mango/src/mango_idx_nouveau.erl:169— src/mango/src/mango_idx_nouveau.erl:169-178 | src/mango/src/mango_idx_text.erl:176-185 — 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· Members sharing a duplicated core (6 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (6 members, 50+ identical tokens) src/nouveau/src/nouveau_api.erl:85— src/nouveau/src/nouveau_api.erl:85-96 | src/nouveau/src/nouveau_api.erl:101-114 | src/nouveau/src/nouveau_api.erl:116-137 | src/nouveau/src/nouveau_api.erl:139-157 | src/nouveau/src/nouveau_api.erl:159-187 | src/nouveau/src/nouveau_api.erl:292-303 — These 6 members share a duplicated core: a REDACTED of at least 50 identical tokens appears in every one of them. That REDACTED is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
Duplicated block (76–90 lines × 2) src/chttpd/src/chttpd.erl:1172— src/chttpd/src/chttpd.erl:1172-1247 | src/couch/src/couch_httpd.erl:1087-1176 — before extracting anything, compare `src/chttpd/src/chttpd.erl` and `src/couch/src/couch_httpd.erl` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 199 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (55–58 lines × 2) src/mango/src/mango_idx_nouveau.erl:319— src/mango/src/mango_idx_nouveau.erl:319-373 | src/mango/src/mango_idx_text.erl:329-386 — before extracting anything, compare `src/mango/src/mango_idx_nouveau.erl` and `src/mango/src/mango_idx_text.erl` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 288 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 (45 lines × 2) src/chttpd/src/chttpd_rewrite.erl:242— src/chttpd/src/chttpd_rewrite.erl:242-286 | src/couch/src/couch_httpd_rewrite.erl:238-282 — before extracting anything, compare `src/chttpd/src/chttpd_rewrite.erl` and `src/couch/src/couch_httpd_rewrite.erl` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 197 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (37 lines × 2) src/mango/src/mango_idx_nouveau.erl:225— src/mango/src/mango_idx_nouveau.erl:225-261 | src/mango/src/mango_idx_text.erl:230-266 — before extracting anything, compare `src/mango/src/mango_idx_nouveau.erl` and `src/mango/src/mango_idx_text.erl` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 288 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 (32–33 lines × 2) src/mango/src/mango_cursor_nouveau.erl:183— src/mango/src/mango_cursor_nouveau.erl:183-214 | src/mango/src/mango_cursor_text.erl:190-222 — before extracting anything, compare `src/mango/src/mango_cursor_nouveau.erl` and `src/mango/src/mango_cursor_text.erl` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 109 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 (29 lines × 2) src/chttpd/src/chttpd_rewrite.erl:450— src/chttpd/src/chttpd_rewrite.erl:450-478 | src/couch/src/couch_httpd_rewrite.erl:452-480 — before extracting anything, compare `src/chttpd/src/chttpd_rewrite.erl` and `src/couch/src/couch_httpd_rewrite.erl` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 197 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (28–29 lines × 2) src/couch/src/couch_btree.erl:754— src/couch/src/couch_btree.erl:754-781 | src/couch/src/couch_btree.erl:796-824 — both copies are in the same file, so extract the 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 (23 lines × 2) src/dreyfus/src/dreyfus_fabric_group1.erl:52— src/dreyfus/src/dreyfus_fabric_group1.erl:52-74 | src/dreyfus/src/dreyfus_fabric_group2.erl:57-79 — before extracting anything, compare `src/dreyfus/src/dreyfus_fabric_group1.erl` and `src/dreyfus/src/dreyfus_fabric_group2.erl` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 55 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (20–22 lines × 2) src/chttpd/src/chttpd.erl:710— src/chttpd/src/chttpd.erl:710-731 | src/couch/src/couch_httpd.erl:666-685 — before extracting anything, compare `src/chttpd/src/chttpd.erl` and `src/couch/src/couch_httpd.erl` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 199 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (4–22 lines × 4) src/fabric/src/fabric_db_doc_count.erl:36— src/fabric/src/fabric_db_doc_count.erl:36-57 | src/fabric/src/fabric_db_uuids.erl:37-40 | src/fabric/src/fabric_design_doc_count.erl:36-57 | src/fabric/src/fabric_time_seq.erl:45-48 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once.
Duplicated block (20–21 lines × 2) src/dreyfus/src/dreyfus_util.erl:155— src/dreyfus/src/dreyfus_util.erl:155-175 | src/dreyfus/src/dreyfus_util.erl:179-198 — both copies are in the same file, so extract the 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 (20 lines × 2) src/chttpd/src/chttpd_rewrite.erl:306— src/chttpd/src/chttpd_rewrite.erl:306-325 | src/couch/src/couch_httpd_rewrite.erl:302-321 — before extracting anything, compare `src/chttpd/src/chttpd_rewrite.erl` and `src/couch/src/couch_httpd_rewrite.erl` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 197 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (19 lines × 2) src/fabric/src/fabric_view_map.erl:45— src/fabric/src/fabric_view_map.erl:45-63 | src/fabric/src/fabric_view_reduce.erl:37-55 — before extracting anything, compare `src/fabric/src/fabric_view_map.erl` and `src/fabric/src/fabric_view_reduce.erl` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 64 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 (4–18 lines × 4) src/couch_replicator/src/couch_replicator_fabric.erl:96— src/couch_replicator/src/couch_replicator_fabric.erl:96-99 | src/fabric/src/fabric_view_all_docs.erl:197-214 | src/fabric/src/fabric_view_map.erl:151-167 | src/fabric/src/fabric_view_reduce.erl:134-137 — before extracting anything, compare `src/couch_replicator/src/couch_replicator_fabric.erl` and `src/fabric/src/fabric_view_all_docs.erl` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (15–17 lines × 2) src/chttpd/src/chttpd_show.erl:211— src/chttpd/src/chttpd_show.erl:211-227 | src/chttpd/src/chttpd_show.erl:230-244 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (14–17 lines × 2) src/couch/src/couch_bt_engine_compactor.erl:566— src/couch/src/couch_bt_engine_compactor.erl:566-582 | src/couch/src/couch_db_split.erl:541-554 — 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 (16–17 lines × 2) src/mem3/src/mem3_shards.erl:90— src/mem3/src/mem3_shards.erl:90-105 | src/mem3/src/mem3_shards.erl:122-138 — both copies are in the same file, so extract the 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 (15–16 lines × 2) src/chttpd/src/chttpd.erl:694— src/chttpd/src/chttpd.erl:694-708 | src/couch/src/couch_httpd.erl:647-662 — before extracting anything, compare `src/chttpd/src/chttpd.erl` and `src/couch/src/couch_httpd.erl` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 199 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (10–15 lines × 2) src/chttpd/src/chttpd_db.erl:1129— src/chttpd/src/chttpd_db.erl:1129-1143 | src/chttpd/src/chttpd_view.erl:33-42 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (14 lines × 3) src/dreyfus/src/dreyfus_util.erl:138— src/dreyfus/src/dreyfus_util.erl:138-151 | src/dreyfus/src/dreyfus_util.erl:155-168 | src/dreyfus/src/dreyfus_util.erl:179-192 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (11–13 lines × 2) src/weatherreport/src/weatherreport_getopt.erl:193— src/weatherreport/src/weatherreport_getopt.erl:193-203 | src/weatherreport/src/weatherreport_getopt.erl:282-294 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11–12 lines × 3) src/couch_mrview/src/couch_mrview_updater.erl:377— src/couch_mrview/src/couch_mrview_updater.erl:377-388 | src/dreyfus/src/dreyfus_index_updater.erl:191-201 | src/nouveau/src/nouveau_index_updater.erl:293-303 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
Duplicated block (9–12 lines × 3) src/nouveau/src/nouveau_api.erl:106— src/nouveau/src/nouveau_api.erl:106-114 | src/nouveau/src/nouveau_api.erl:126-137 | src/nouveau/src/nouveau_api.erl:149-157 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (11–12 lines × 2) src/couch/src/couch_btree.erl:187— src/couch/src/couch_btree.erl:187-197 | src/couch/src/couch_btree.erl:218-229 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9–12 lines × 2) src/nouveau/src/nouveau_api.erl:88— src/nouveau/src/nouveau_api.erl:88-96 | src/nouveau/src/nouveau_api.erl:176-187 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8–11 lines × 2) src/chttpd/src/chttpd_show.erl:182— src/chttpd/src/chttpd_show.erl:182-192 | src/chttpd/src/chttpd_show.erl:195-202 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10–11 lines × 2) src/couch/src/couch_btree.erl:247— src/couch/src/couch_btree.erl:247-256 | src/couch/src/couch_btree.erl:259-269 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7–10 lines × 3) src/dreyfus/src/dreyfus_fabric_group1.erl:79— src/dreyfus/src/dreyfus_fabric_group1.erl:79-85 | src/dreyfus/src/dreyfus_fabric_group2.erl:91-100 | src/dreyfus/src/dreyfus_fabric_search.erl:156-162 — before extracting anything, compare `src/dreyfus/src/dreyfus_fabric_group1.erl` and `src/dreyfus/src/dreyfus_fabric_group2.erl` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 55 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (7–10 lines × 2) src/couch/src/couch_db_split.erl:524— src/couch/src/couch_db_split.erl:524-533 | src/couch/src/couch_db_split.erl:538-544 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8–9 lines × 3) src/couch_log/src/couch_log_trunc_io.erl:399— src/couch_log/src/couch_log_trunc_io.erl:399-406 | src/couch_log/src/couch_log_trunc_io.erl:409-416 | src/couch_log/src/couch_log_trunc_io.erl:419-427 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (3–7 lines × 3) src/dreyfus/src/dreyfus_fabric_group1.erl:34— src/dreyfus/src/dreyfus_fabric_group1.erl:34-40 | src/dreyfus/src/dreyfus_fabric_group2.erl:36-42 | src/dreyfus/src/dreyfus_fabric_info.erl:23-25 — before extracting anything, compare `src/dreyfus/src/dreyfus_fabric_group1.erl` and `src/dreyfus/src/dreyfus_fabric_group2.erl` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 55 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 4) src/couch/src/couch_bt_engine_compactor.erl:557— src/couch/src/couch_bt_engine_compactor.erl:557-561 | src/couch/src/couch_bt_engine_compactor.erl:566-570 | src/couch/src/couch_db_split.erl:530-534 | src/couch/src/couch_db_split.erl:541-545 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (18 lines × 2) src/mango/src/mango_idx_nouveau.erl:77— src/mango/src/mango_idx_nouveau.erl:77-94 | src/mango/src/mango_idx_text.erl:77-94 — before extracting anything, compare `src/mango/src/mango_idx_nouveau.erl` and `src/mango/src/mango_idx_text.erl` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 288 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 × 6) src/nouveau/src/nouveau_api.erl:88— src/nouveau/src/nouveau_api.erl:88-96 | src/nouveau/src/nouveau_api.erl:106-114 | src/nouveau/src/nouveau_api.erl:127-137 | src/nouveau/src/nouveau_api.erl:149-157 | src/nouveau/src/nouveau_api.erl:177-187 | src/nouveau/src/nouveau_api.erl:295-303 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (24–25 lines × 2) src/couch_dist/certs/certs.exs:124— src/couch_dist/certs/certs.exs:124-147 | src/couch_dist/certs/certs.exs:177-201 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication· Members sharing a duplicated core (9 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (9 members, 50+ identical tokens) src/couch_pse_tests/src/cpse_test_read_write_docs.erl:42— src/couch_pse_tests/src/cpse_test_read_write_docs.erl:42-84 | src/couch_pse_tests/src/cpse_test_read_write_docs.erl:86-105 | src/couch_pse_tests/src/cpse_test_read_write_docs.erl:107-129 | src/couch_pse_tests/src/cpse_test_read_write_docs.erl:131-172 | src/couch_pse_tests/src/cpse_test_read_write_docs.erl:174-213 | src/couch_pse_tests/src/cpse_test_read_write_docs.erl:215-234 | src/couch_pse_tests/src/cpse_test_read_write_docs.erl:236-260 | src/couch_pse_tests/src/cpse_test_read_write_docs.erl:262-282 | src/couch_pse_tests/src/cpse_test_read_write_docs.erl:284-306 — These 9 members share a duplicated core: a REDACTED of at least 50 identical tokens appears in every one of them. That REDACTED 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 9 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 9 times.
D4 · Code Duplication· Members sharing a duplicated core (5 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (5 members, 50+ identical tokens) src/couch_pse_tests/src/cpse_test_fold_changes.erl:46— src/couch_pse_tests/src/cpse_test_fold_changes.erl:46-56 | src/couch_pse_tests/src/cpse_test_fold_changes.erl:58-70 | src/couch_pse_tests/src/cpse_test_fold_changes.erl:72-84 | src/couch_pse_tests/src/cpse_test_fold_changes.erl:99-110 | src/couch_pse_tests/src/cpse_test_fold_changes.erl:112-123 — These 5 members share a duplicated core: a REDACTED of at least 50 identical tokens appears in every one of them. That REDACTED is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
Duplicated block (22–23 lines × 2) src/couch_pse_tests/src/cpse_test_compaction.erl:185— src/couch_pse_tests/src/cpse_test_compaction.erl:185-206 | src/couch_pse_tests/src/cpse_test_compaction.erl:226-248 — both copies are in the same file, so extract the 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 (20–21 lines × 3) src/couch_pse_tests/src/cpse_test_read_write_docs.erl:64— src/couch_pse_tests/src/cpse_test_read_write_docs.erl:64-83 | src/couch_pse_tests/src/cpse_test_read_write_docs.erl:150-170 | src/couch_pse_tests/src/cpse_test_read_write_docs.erl:191-211 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (16 lines × 4) src/couch_pse_tests/src/cpse_test_attachments.erl:46— src/couch_pse_tests/src/cpse_test_attachments.erl:46-61 | src/couch_pse_tests/src/cpse_test_read_write_docs.erl:65-80 | src/couch_pse_tests/src/cpse_test_read_write_docs.erl:152-167 | src/couch_pse_tests/src/cpse_test_read_write_docs.erl:193-208 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (12–13 lines × 3) src/couch_pse_tests/src/cpse_test_purge_docs.erl:36— src/couch_pse_tests/src/cpse_test_purge_docs.erl:36-48 | src/couch_pse_tests/src/cpse_test_purge_docs.erl:97-108 | src/couch_pse_tests/src/cpse_test_purge_seqs.erl:35-46 — before extracting anything, compare `src/couch_pse_tests/src/cpse_test_purge_docs.erl` and `src/couch_pse_tests/src/cpse_test_purge_seqs.erl` as WHOLE FILES: this scan already matched 4 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.
Duplicated block (12 lines × 3) src/couch_pse_tests/src/cpse_test_purge_docs.erl:90— src/couch_pse_tests/src/cpse_test_purge_docs.erl:90-101 | src/couch_pse_tests/src/cpse_test_purge_docs.erl:120-131 | src/couch_pse_tests/src/cpse_test_purge_docs.erl:335-346 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (10 lines × 4) src/couch_pse_tests/src/cpse_test_purge_docs.erl:92— src/couch_pse_tests/src/cpse_test_purge_docs.erl:92-101 | src/couch_pse_tests/src/cpse_test_purge_docs.erl:122-131 | src/couch_pse_tests/src/cpse_test_purge_docs.erl:187-196 | src/couch_pse_tests/src/cpse_test_purge_docs.erl:337-346 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (10 lines × 3) src/couch_pse_tests/src/cpse_test_purge_docs.erl:105— src/couch_pse_tests/src/cpse_test_purge_docs.erl:105-114 | src/couch_pse_tests/src/cpse_test_purge_docs.erl:139-148 | src/couch_pse_tests/src/cpse_test_purge_docs.erl:201-210 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (7–9 lines × 8) src/couch_pse_tests/src/cpse_test_read_write_docs.erl:94— src/couch_pse_tests/src/cpse_test_read_write_docs.erl:94-101 | src/couch_pse_tests/src/cpse_test_read_write_docs.erl:118-125 | src/couch_pse_tests/src/cpse_test_read_write_docs.erl:139-147 | src/couch_pse_tests/src/cpse_test_read_write_docs.erl:182-188 | src/couch_pse_tests/src/cpse_test_read_write_docs.erl:222-229 | src/couch_pse_tests/src/cpse_test_read_write_docs.erl:246-253 | src/couch_pse_tests/src/cpse_test_read_write_docs.erl:270-277 | src/couch_pse_tests/src/cpse_test_read_write_docs.erl:292-299 — all 8 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (16–18 lines × 2) src/couch_pse_tests/src/cpse_test_purge_docs.erl:127— src/couch_pse_tests/src/cpse_test_purge_docs.erl:127-144 | src/couch_pse_tests/src/cpse_test_purge_seqs.erl:75-90 — before extracting anything, compare `src/couch_pse_tests/src/cpse_test_purge_docs.erl` and `src/couch_pse_tests/src/cpse_test_purge_seqs.erl` as WHOLE FILES: this scan already matched 4 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.
Duplicated block (7–8 lines × 2) src/couch_pse_tests/src/cpse_test_fold_changes.erl:38— src/couch_pse_tests/src/cpse_test_fold_changes.erl:38-44 | src/couch_pse_tests/src/cpse_test_fold_changes.erl:90-97 — both copies are in the same file, so extract the 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 × 6) src/couch_pse_tests/src/cpse_test_purge_docs.erl:42— src/couch_pse_tests/src/cpse_test_purge_docs.erl:42-49 | src/couch_pse_tests/src/cpse_test_purge_docs.erl:103-109 | src/couch_pse_tests/src/cpse_test_purge_docs.erl:198-205 | src/couch_pse_tests/src/cpse_test_purge_docs.erl:231-238 | src/couch_pse_tests/src/cpse_test_purge_seqs.erl:41-47 | src/couch_pse_tests/src/cpse_test_purge_seqs.erl:55-61 — before extracting anything, compare `src/couch_pse_tests/src/cpse_test_purge_docs.erl` and `src/couch_pse_tests/src/cpse_test_purge_seqs.erl` as WHOLE FILES: this scan already matched 4 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.
Duplicated block (7 lines × 5) src/couch_pse_tests/src/cpse_test_purge_docs.erl:88— src/couch_pse_tests/src/cpse_test_purge_docs.erl:88-94 | src/couch_pse_tests/src/cpse_test_purge_docs.erl:118-124 | src/couch_pse_tests/src/cpse_test_purge_docs.erl:152-158 | src/couch_pse_tests/src/cpse_test_purge_docs.erl:333-339 | src/couch_pse_tests/src/cpse_test_purge_docs.erl:363-369 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (6 lines × 9) src/couch_pse_tests/src/cpse_test_read_write_docs.erl:54— src/couch_pse_tests/src/cpse_test_read_write_docs.erl:54-60 | src/couch_pse_tests/src/cpse_test_read_write_docs.erl:96-102 | src/couch_pse_tests/src/cpse_test_read_write_docs.erl:120-126 | src/couch_pse_tests/src/cpse_test_read_write_docs.erl:142-148 | src/couch_pse_tests/src/cpse_test_read_write_docs.erl:184-189 | src/couch_pse_tests/src/cpse_test_read_write_docs.erl:224-230 | src/couch_pse_tests/src/cpse_test_read_write_docs.erl:248-254 | src/couch_pse_tests/src/cpse_test_read_write_docs.erl:272-278 | src/couch_pse_tests/src/cpse_test_read_write_docs.erl:294-300 — all 9 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (6 lines × 5) src/couch_pse_tests/src/cpse_test_fold_changes.erl:50— src/couch_pse_tests/src/cpse_test_fold_changes.erl:50-55 | src/couch_pse_tests/src/cpse_test_fold_changes.erl:64-69 | src/couch_pse_tests/src/cpse_test_fold_changes.erl:78-83 | src/couch_pse_tests/src/cpse_test_fold_changes.erl:104-109 | src/couch_pse_tests/src/cpse_test_fold_changes.erl:117-122 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (6 lines × 4) src/couch_pse_tests/src/cpse_test_fold_docs.erl:115— src/couch_pse_tests/src/cpse_test_fold_docs.erl:115-120 | src/couch_pse_tests/src/cpse_test_fold_docs.erl:164-169 | src/couch_pse_tests/src/cpse_test_fold_docs.erl:217-222 | src/couch_pse_tests/src/cpse_test_fold_docs.erl:276-281 — 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.
Low cohesion: couch_quickjs_scanner_plugin (LCOM4 4) src/couch_quickjs/src/couch_quickjs_scanner_plugin.erl:13— couch_quickjs_scanner_plugin's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this REDACTED (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Type Safety — 0 typed · 14 plain JS — the untyped files are share/server/60/rewrite_fun.js, share/server/60/rewrite_fun_ast_bypass.js, share/server/dispatch-quickjs.js, share/server/dreyfus.js, share/server/filter.js, share/server/loop.js (+8 more).
R10 · Code Duplication· Duplicated block with local edits (84 matched lines × 2 locations) · ×1
Duplicated block with local edits (84 matched lines × 2 locations) share/server/dispatch-quickjs.js:14— share/server/dispatch-quickjs.js:14 · share/server/loop.js:16 — the two spans are one implementation copied and then locally edited — 565 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Duplicated block (27 lines × 2 locations) share/server/60/rewrite_fun.js:19— share/server/60/rewrite_fun.js:19 · share/server/60/rewrite_fun_ast_bypass.js:25 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
Duplicated block (17 lines × 3 locations) share/server/dreyfus.js:43— share/server/dreyfus.js:43 · share/server/nouveau.js:89 · share/server/views.js:108 — the 3 copies are spread across 3 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a REDACTED of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a REDACTED of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (12 lines × 2 locations) share/server/dreyfus.js:13— share/server/dreyfus.js:13 · share/server/nouveau.js:13 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a REDACTED of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a REDACTED of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Complex function runShow (cyclomatic 16, cognitive 19) share/server/render.js:237— runShow has cyclomatic complexity 16 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat REDACTED of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function fitnessAndQualityParsed (cyclomatic 15, cognitive 23) share/server/mimeparse.js:90— fitnessAndQualityParsed has cyclomatic complexity 15 and cognitive complexity 23; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat REDACTED of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function resolveModule (cyclomatic 11, cognitive 13) share/server/util.js:13— resolveModule has cyclomatic complexity 11 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat REDACTED of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Orphaned file src/couch_pse_tests/src/cpse_util.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/couch/src/couch_httpd_vhost.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/dreyfus/src/clouseau_rpc.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/couch_pse_tests/src/cpse_test_fold_docs.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 REDACTED: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/couch_replicator/src/couch_replicator_connect.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/couch_pse_tests/src/cpse_test_read_write_docs.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/couch_pse_tests/src/cpse_test_compaction.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/couch/src/couch_flags_config.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/ddoc_cache/src/ddoc_cache_entry.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/weatherreport/src/weatherreport_node.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/couch_scanner/src/couch_scanner_plugin_conflict_finder.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/couch_replicator/src/couch_replicator_httpc_pool.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/chttpd/src/chttpd_view.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 .credo.exs: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/couch_pse_tests/src/cpse_test_purge_replication.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/couch_dist/certs/certs.exs: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/couch_pse_tests/src/cpse_test_fold_changes.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 dev/pbkdf2.py: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/couch_index/src/couch_index_debug.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/couch/src/couch_sup.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/couch/include/couch_db.hrl: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/couch/src/couch_partition.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/couch/src/couch_flags.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/weatherreport/src/weatherreport_check.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.
+ 11 more in this group — see findings.md.
X31 · Test-only surface in a production module· Test-only surface in a production module · ×11
Test-only surface in a production module src/couch/src/couch_disk_monitor.erl:24— `couch_disk_monitor:set_database_dir_percent_used/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/couch/src/couch_disk_monitor.erl:24— `couch_disk_monitor:set_view_index_dir_percent_used/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/couch/src/couch_ejson_compare.erl:26— `couch_ejson_compare:less_nif/2` 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/couch/src/couch_ejson_compare.erl:26— `couch_ejson_compare:less_erl/2` 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/couch/src/couch_ejson_compare.erl:26— `couch_ejson_compare:compare_strings_nif/2` 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/couch/src/couch_ejson_compare.erl:26— `couch_ejson_compare:get_sort_key_nif/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/couch/src/couch_flags_config.erl:24— `couch_flags_config:parse_flags_term/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/couch_dist/src/couch_dist.erl:28— `couch_dist:no_tls/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/couch_dist/src/couch_dist.erl:28— `couch_dist:get_init_args/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/couch_epi/src/couch_epi_sup.erl:41— `couch_epi_sup:plugin_childspecs/3` 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/fabric/src/fabric_view_changes.erl:22— `fabric_view_changes:decode_seq/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.
Duplicated predicate src/chttpd/src/chttpd_db.erl:1959— `(Method == 'PUT') or (Method == 'DELETE')` appears character-identically in 3 files — src/chttpd/src/chttpd_db.erl, src/couch/src/couch_httpd_db.erl, src/couch/src/couch_httpd_misc_handlers.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/chttpd/src/chttpd_show.erl:186— `Method =:= 'GET' orelse Method =:= 'OPTIONS'` appears character-identically in 2 files — src/chttpd/src/chttpd_show.erl, src/couch_mrview/src/couch_mrview_show.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/chttpd/src/chttpd.erl:128— `get_value(keyfile, ServerOpts0) == undefined orelse couch_util` appears character-identically in 2 files — src/chttpd/src/chttpd.erl, src/couch/src/couch_httpd.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/chttpd/src/chttpd_db.erl:2422— `is_binary(ExplicitRev) or is_list(ExplicitRev)` appears character-identically in 2 files — src/chttpd/src/chttpd_db.erl, src/couch/src/couch_httpd_db.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/couch_scanner/src/couch_scanner_plugin_conflict_finder.erl:144— `is_binary(PrevDbName) andalso DbName =/= PrevDbName` appears character-identically in 2 files — src/couch_scanner/src/couch_scanner_plugin_conflict_finder.erl, src/couch_scanner/src/couch_scanner_plugin_ddoc_features.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/chttpd/src/chttpd_db.erl:2136— `is_integer(From) andalso is_integer(To) andalso To < From` appears character-identically in 2 files — src/chttpd/src/chttpd_db.erl, src/couch/src/couch_httpd_db.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/chttpd/src/chttpd_db.erl:1946— `is_list(Ranges) andalso length(Ranges) < 10` appears character-identically in 2 files — src/chttpd/src/chttpd_db.erl, src/couch/src/couch_httpd_db.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 share/server/60/rewrite_fun.js:32— `decl.type == "FunctionDeclaration" && decl.id == null` appears character-identically in 2 files — share/server/60/rewrite_fun.js, share/server/60/rewrite_fun_ast_bypass.js. 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 share/server/60/rewrite_fun.js:26— `idx >= 0 && decl.type !== "FunctionDeclaration"` appears character-identically in 2 files — share/server/60/rewrite_fun.js, share/server/60/rewrite_fun_ast_bypass.js. 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.
Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 56 significant file(s) lose their only recent owner: src/couch/src/couch_httpd_db.erl, src/mem3/src/mem3_rep.erl, src/fabric/src/fabric_view_changes.erl, src/couch_mrview/src/couch_mrview_util.erl, src/couch/src/couch_btree.erl, src/couch/src/couch_bt_engine.erl, src/couch/src/couch_server.erl, src/couch/src/couch_db_engine.erl (+48 more). Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #2 — If anonymized user #2 becomes unavailable, 15 significant file(s) lose their only recent owner: extra/nouveau/src/main/java/org/apache/couchdb/nouveau/lucene/LuceneIndex.java, src/couch_replicator/src/couch_replicator_auth_ibm.erl, extra/nouveau/src/main/java/org/apache/couchdb/nouveau/core/IndexManager.java, src/nouveau/src/nouveau_api.erl, src/jwtf/src/jwtf.erl, src/nouveau/src/nouveau_fabric_search.erl, extra/nouveau/src/main/java/org/apache/couchdb/nouveau/core/Index.java, src/couch/src/couch_secrets.erl (+7 more). Pair on, review, or document these before any departure.
D16 · Bus Factor· Further sole-owners (lower concentration) · ×1
Further sole-owners (lower concentration) — 2 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 (74 single-owned of 309 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; 309 of the 553 production source files in this repository met that bar). They are 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/mango/src/mango_cursor_special.erl, src/mango/src/mango_idx_special.erl, src/couch_pse_tests/src/cpse_test_get_set_props.erl.
D28 · Secrets (history)· Rotate the exposed credentials · ×1
D34 · Knowledge Freshness· Further orphaned files (smaller) · ×1
Further orphaned files (smaller) — 36 smaller file(s) also have no living knowledge — folded into the freshness score and metrics rather than raised one row each — most significant first: src/couch_pse_tests/src/cpse_util.erl, src/couch/src/couch_httpd_vhost.erl, src/dreyfus/src/clouseau_rpc.erl, src/couch_pse_tests/src/cpse_test_fold_docs.erl, REDACTED, src/couch_replicator/src/couch_replicator_connect.erl, src/couch_pse_tests/src/cpse_test_read_write_docs.erl, src/couch_pse_tests/src/cpse_test_compaction.erl (and 28 more) (40 orphaned of 335 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; 335 of the 553 production source files in this repository met that bar). Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway.
README/code drift src/couch_scanner/README.md:16— src/couch_scanner/README.md links to `src/couch_scanner_ddoc_features.erl`, but `src/couch_scanner/src/couch_scanner_ddoc_features.erl` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
Logging is not universal — Only 2/5 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `.`, `src/docs`, `src/weatherreport`.
No SAST — No static application security testing detected. For this repository's stack, add dialyzer or elvis — this repository has no CI pipeline yet, so REDACTED it locally to clear the existing findings, then make it a step of the first workflow you add so a regression fails the build. What was searched, so you can tell an absence from a miss: the 0 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
Interpolated log message defeats structured logging extra/nouveau/src/main/java/org/apache/couchdb/nouveau/core/IndexManager.java:386— `warn` at line 386 is handed a message assembled at the call — a string concatenated with a value, or `String.format` — through SLF4J or log4j 2, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.warn("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or `log.atInfo().addKeyValue("order_id", orderId).log("order moved")` with SLF4J 2's fluent API. An exception goes last, as the throwable argument, not into the text.
X5 · Nullable reference types· Java packages are not null-marked everywhere · ×1
Java packages are not null-marked everywhere — 0/8 of this repository's Java package directories are under a non-null default: a `package-info.java` declaring `@NullMarked` (JSpecify) or `@NonNullApi`, `@ParametersAreNonnullByDefault`, `@NonNullByDefault`, `@DefaultQualifier(NonNull.class)`; a `module-info.java` declaring `@NullMarked`; every type in it `@NullMarked`; or a build that runs NullAway with the package in `AnnotatedPackages`, or the Checker Framework's `NullnessChecker`. Elsewhere every reference admits null and no checker warns on the dereference that throws a `NullPointerException`.
Dependency hygiene PARTLY measured — Mix pinning read, dependency currency not (Hex registry unreachable) — This repository's Mix dependencies were read for PINNING discipline: 3 declaration(s) across 1 mix.exs (0 of them runtime), checked against 0 package(s) pinned in the committed lockfile. 1 pinning defect(s) are reported as separate rows below. That is only PART of dependency hygiene, so this dimension is NOT SCORED: whether any of these packages has a newer or retired release is the dependency-CURRENCY question, and answering it needs the Hex registry — and this repository has no direct Hex dependency resolved by a committed lockfile to ask about. A clean pinning pass is NOT an all-clear for these dependencies, and it is not a finding that they are all USED: whether a declaration is unused is not graded, because a Hex app name does not determine the modules it provides and a large idiomatic class of BEAM dependencies (runtime adapters, codec plugins, protocol implementations, OTP applications the release starts) is correctly declared and never referenced in source. Known CVEs in the same graph are a separate question again, reported under D30 wherever the manifest is OSV-readable.
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 REDACTED 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.
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.
provenance: not applicable — No CI/build pipeline found (.github/.forgejo/.gitea workflows, .circleci, .buildkite, .woodpecker, .teamcity, .gitlab-ci.yml, .travis.yml, bitbucket-pipelines.yml, .drone.yml, .cirrus.yml, .woodpecker.yml, appveyor.yml, azure-pipelines*.yml, .pipelines/, .vsts-ci/, .azuredevops/, Jenkinsfile); there is no build to attest provenance for.
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.
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.
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.
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.
Run 01a1c4dd-d462-765c-b4a3-d15d37aa86c8 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 58 · Warnings: 516 · Recommendations: 70 · Info: 1 — Appendix A · all findings · full markdown report.
Generated by the Canine Code Analyzer: deterministic code-health analysis. 10-11-2026 @ 09:50 UTC.
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.