Public report of Bobris/BTDB, published 16 November 2026. It has the same score, grades and number of
findings as the full report. The details of security findings (where they are in the code, which known
vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive reportMeasured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.11.4). Assert signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey →
Signed and filed in the standard's public register, 16 November 2026, 18:45 UTC · Survey ID cd_4b387e845e6444ffbf334dafc2e9e25f
Bobris/BTDB
Measured 16 November 2026, 18:44 UTC, at code version 20f45c8
Code coverage is not measured: No coverage collector is wired up.
Supply-chain provenance & signing is not measured: Supply-chain provenance is not scored (this pipeline releases no artifact), but its build steps or GitHub Actions workflows have integrity defects, or nothing watches its dependency set for published advisories.
CAI scoreWeak
CriticalWeakAdequateStrongExemplary
The score is built from these lenses. Each lens grades one area of the code, such as how easy it is to change or how well it is protected. The weakest lens counts most, so one weak area pulls the score down instead of being averaged away.
A large codebase: 123,247 lines of product code in 32 projects, tests not counted · Estimated rebuild effort: about 7.4 person-years · Weakest lens: Security and Compliance, 37.3
Findings by how serious they are
74 critical1799 serious216 minor
5 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
16 November 2026, 18:44 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 ▸
77of 77 dimensions measured by tools.
2055of 2089 findings point to an exact file and line, so you can open each one in the code. The other 34 concern the repository as a whole, such as missing documentation.
77dimensions across 6 lenses, read from 123,247 lines of product code in 32 projects.
Bobris/BTDB falls short of our standard for production, in part because we found no access checks on the code's endpoints or handlers. It scores 49.4 out of 100 and is rated Weak, and ten of its 74 critical findings are security problems.
Security and Compliance, at 37.3, is the weakest lens and counts most in the score. The best first step is adding access checks, worth about 9.1 points. Keeping the encryption keys in a vault comes next, worth about 5.2 points. Raising Security and Compliance to 70 would lift the score to about 60.0.
Six pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with. Three settings leave the servers or containers unsafe, and thirty-five errors are caught and ignored, so failures can go unnoticed. Pinning each tool to an exact version, correcting the unsafe settings and handling or logging the ignored errors would close these risks. The password or key in the code's history needs replacing, with the old one switched off. The 12 sets of compiler warnings switched off in projects need turning back on in the build file.
The product code is 123,247 lines, about €1,100,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.
If Security and Compliance rose from 37.3 to 70, the lowest score rated Strong, the score would rise from 49.4 to about 60.0.
Code composition: what the lines of code are
Business logic 26%Supporting code 18%Tests 53%Code analyzers 3%
Rebuild cost: about €1,100,000 · Estimate
Cost to rebuild
€350,000 to €1,800,000, for 5,805 to 18,999 hours of work, about 7.4 person-years for 4 to 15 engineers
Difficulty of the problem
High, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor
×0.7 at a score of 49. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
Size
Large: 123,247 lines of product code, of which 20% is declarations and boilerplate, 20% straight logic and 60% logic with branches
Comment lines
The estimate prices 118,553 lines. Comment lines count towards the size of 123,247 lines but aren't priced as work.
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.
Top priorities
The three actions that raise the score most for the work they take. The full ranked list is in the Roadmap.
1
Protect endpoints by default-deny: [Authorize] + role/policy authorization, or imperative guard methods (throw-on-violation) called from every handler.
Raises the score by about 9.1 points · Medium effort · Access Controls
2
Strengthen data-at-rest protection: vault your keys (Azure Key Vault / AWS KMS / IDataProtector key ring) and encrypt the most sensitive columns (EF HasConversion encryption or provider-native column encryption) — partial coverage still leaves gaps.
Raises the score by about 5.2 points · Medium effort · Data Protection
3
Resolve the 1 No network policy finding(s) in Network Egress Confinement.
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 €1,100,000 to build again, about 7.4 person-years of work. Its weakest lens is Security and Compliance, at 37.3 (Weak). Security and Compliance is about how well the product is protected, and how it handles personal data. Because the weakest lens counts most in the score, work on Security and Compliance also moves the score most.
Based on: the rebuild estimate · the Security and Compliance grade · how much each lens counts
What to do: Start with the Security and Compliance actions in Top priorities.
If you do one thing first · First action
Protect endpoints by default-deny: [Authorize] + role/policy authorization, or imperative guard methods (throw-on-violation) called from every handler. Of all the actions in this report, it raises the score most for the work it takes: about 9.1 points for medium effort. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 5.7 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 6% to 13% on every change. The history of the code shows how much it changes: about 207,596 lines over the last 90 days, which is about 841,917 lines a year. At that pace, the extra work comes to an estimated 119.4 to 716.5 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of our own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.
Architecture — module dependency graph
Project dependencies, layered top-to-bottom; arrows show direction. Any dashed red edge points upward or sideways, which only happens where the projects form a dependency cycle. A graph without cycles has none.
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.
55 modules, with 138 dependencies between them. 3 loops run through 12 of the modules, marked above the diagonal.
The table shows the 40 modules with the most connections; 15 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.
BTDB.BTreeLib uses BTDB.Allocators, so a change to BTDB.Allocators can break BTDB.BTreeLib, while a change to BTDB.BTreeLib can't break BTDB.Allocators.
Position
Below the diagonal: BTDB.BTreeLib uses a module listed above it, which is the healthy direction.
BTDB.BTreeLib uses BTDB.Collections, so a change to BTDB.Collections can break BTDB.BTreeLib, while a change to BTDB.BTreeLib can't break BTDB.Collections.
Position
Below the diagonal: BTDB.BTreeLib uses a module listed above it, which is the healthy direction.
9→13 BTDB.BTreeLib uses BTDB.KVDBLayerpart of a loop✕
Connections
10 pairs of types, where a type in BTDB.BTreeLib uses a type in BTDB.KVDBLayer.
BTDB.BTreeLib uses BTDB.StreamLayer, so a change to BTDB.StreamLayer can break BTDB.BTreeLib, while a change to BTDB.BTreeLib can't break BTDB.StreamLayer.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
64 pairs of types, where a type in BTDB.IL.Caching uses a type in BTDB.IL. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
BTDB.IL.Caching uses BTDB.Collections, so a change to BTDB.Collections can break BTDB.IL.Caching, while a change to BTDB.IL.Caching can't break BTDB.Collections.
Position
Below the diagonal: BTDB.IL.Caching uses a module listed above it, which is the healthy direction.
BTDB.KVDBLayer.BTreeMem uses BTDB.Collections, so a change to BTDB.Collections can break BTDB.KVDBLayer.BTreeMem, while a change to BTDB.KVDBLayer.BTreeMem can't break BTDB.Collections.
Position
Below the diagonal: BTDB.KVDBLayer.BTreeMem uses a module listed above it, which is the healthy direction.
12→13 BTDB.KVDBLayer.BTreeMem uses BTDB.KVDBLayerpart of a loop✕
Connections
13 pairs of types, where a type in BTDB.KVDBLayer.BTreeMem uses a type in BTDB.KVDBLayer.
BTDB.KVDBLayer.BTreeMem uses BTDB.KVDBLayer, so a change to BTDB.KVDBLayer can break BTDB.KVDBLayer.BTreeMem, while a change to BTDB.KVDBLayer.BTreeMem can't break BTDB.KVDBLayer.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
BTDB.KVDBLayer uses BTDB.Allocators, so a change to BTDB.Allocators can break BTDB.KVDBLayer, while a change to BTDB.KVDBLayer can't break BTDB.Allocators.
Position
Below the diagonal: BTDB.KVDBLayer uses a module listed above it, which is the healthy direction.
BTDB.KVDBLayer uses BTDB.Collections, so a change to BTDB.Collections can break BTDB.KVDBLayer, while a change to BTDB.KVDBLayer can't break BTDB.Collections.
Position
Below the diagonal: BTDB.KVDBLayer uses a module listed above it, which is the healthy direction.
BTDB.KVDBLayer uses BTDB.KVDBLayer.BTreeMem, so a change to BTDB.KVDBLayer.BTreeMem can break BTDB.KVDBLayer, while a change to BTDB.KVDBLayer can't break BTDB.KVDBLayer.BTreeMem.
Position
Below the diagonal: BTDB.KVDBLayer uses a module listed above it, which is the healthy direction.
13→15 BTDB.KVDBLayer uses BTDB.StreamLayerpart of a loop✕
Connections
35 pairs of types, where a type in BTDB.KVDBLayer uses a type in BTDB.StreamLayer. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
BTDB.KVDBLayer uses BTDB.StreamLayer, so a change to BTDB.StreamLayer can break BTDB.KVDBLayer, while a change to BTDB.KVDBLayer can't break BTDB.StreamLayer.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
BTDB.LSM.Format uses BTDB.LSM.Storage, so a change to BTDB.LSM.Storage can break BTDB.LSM.Format, while a change to BTDB.LSM.Format can't break BTDB.LSM.Storage.
Position
Below the diagonal: BTDB.LSM.Format uses a module listed above it, which is the healthy direction.
BTDB.LSM.Format uses BTDB.KVDBLayer, so a change to BTDB.KVDBLayer can break BTDB.LSM.Format, while a change to BTDB.LSM.Format can't break BTDB.KVDBLayer.
Position
Below the diagonal: BTDB.LSM.Format uses a module listed above it, which is the healthy direction.
14→20 BTDB.LSM.Format uses BTDB.LSM.Enginepart of a loop✕
Connections
10 pairs of types, where a type in BTDB.LSM.Format uses a type in BTDB.LSM.Engine.
BTDB.LSM.Format uses BTDB.LSM.Engine, so a change to BTDB.LSM.Engine can break BTDB.LSM.Format, while a change to BTDB.LSM.Format can't break BTDB.LSM.Engine.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
BTDB.StreamLayer uses BTDB.Collections, so a change to BTDB.Collections can break BTDB.StreamLayer, while a change to BTDB.StreamLayer can't break BTDB.Collections.
Position
Below the diagonal: BTDB.StreamLayer uses a module listed above it, which is the healthy direction.
BTDB.StreamLayer uses BTDB.KVDBLayer, so a change to BTDB.KVDBLayer can break BTDB.StreamLayer, while a change to BTDB.StreamLayer can't break BTDB.KVDBLayer.
Position
Below the diagonal: BTDB.StreamLayer uses a module listed above it, which is the healthy direction.
BTDB.AzureStorage uses BTDB.KVDBLayer, so a change to BTDB.KVDBLayer can break BTDB.AzureStorage, while a change to BTDB.AzureStorage can't break BTDB.KVDBLayer.
Position
Below the diagonal: BTDB.AzureStorage uses a module listed above it, which is the healthy direction.
BTDB.AzureStorage uses BTDB.StreamLayer, so a change to BTDB.StreamLayer can break BTDB.AzureStorage, while a change to BTDB.AzureStorage can't break BTDB.StreamLayer.
Position
Below the diagonal: BTDB.AzureStorage uses a module listed above it, which is the healthy direction.
BTDB.ChunkCache uses BTDB.KVDBLayer, so a change to BTDB.KVDBLayer can break BTDB.ChunkCache, while a change to BTDB.ChunkCache can't break BTDB.KVDBLayer.
Position
Below the diagonal: BTDB.ChunkCache uses a module listed above it, which is the healthy direction.
BTDB.ChunkCache uses BTDB.StreamLayer, so a change to BTDB.StreamLayer can break BTDB.ChunkCache, while a change to BTDB.ChunkCache can't break BTDB.StreamLayer.
Position
Below the diagonal: BTDB.ChunkCache uses a module listed above it, which is the healthy direction.
BTDB.KVDBLayer.ReadOnly uses BTDB.Collections, so a change to BTDB.Collections can break BTDB.KVDBLayer.ReadOnly, while a change to BTDB.KVDBLayer.ReadOnly can't break BTDB.Collections.
Position
Below the diagonal: BTDB.KVDBLayer.ReadOnly uses a module listed above it, which is the healthy direction.
BTDB.KVDBLayer.ReadOnly uses BTDB.KVDBLayer, so a change to BTDB.KVDBLayer can break BTDB.KVDBLayer.ReadOnly, while a change to BTDB.KVDBLayer.ReadOnly can't break BTDB.KVDBLayer.
Position
Below the diagonal: BTDB.KVDBLayer.ReadOnly uses a module listed above it, which is the healthy direction.
BTDB.KVDBLayer.ReadOnly uses BTDB.StreamLayer, so a change to BTDB.StreamLayer can break BTDB.KVDBLayer.ReadOnly, while a change to BTDB.KVDBLayer.ReadOnly can't break BTDB.StreamLayer.
Position
Below the diagonal: BTDB.KVDBLayer.ReadOnly uses a module listed above it, which is the healthy direction.
BTDB.LSM.Engine uses BTDB.LSM.Memory, so a change to BTDB.LSM.Memory can break BTDB.LSM.Engine, while a change to BTDB.LSM.Engine can't break BTDB.LSM.Memory.
Position
Below the diagonal: BTDB.LSM.Engine uses a module listed above it, which is the healthy direction.
BTDB.LSM.Engine uses BTDB.LSM.Format, so a change to BTDB.LSM.Format can break BTDB.LSM.Engine, while a change to BTDB.LSM.Engine can't break BTDB.LSM.Format.
Position
Below the diagonal: BTDB.LSM.Engine uses a module listed above it, which is the healthy direction.
BTDB.Serialization uses BTDB.Locks, so a change to BTDB.Locks can break BTDB.Serialization, while a change to BTDB.Serialization can't break BTDB.Locks.
Position
Below the diagonal: BTDB.Serialization uses a module listed above it, which is the healthy direction.
BTDB.Serialization uses BTDB.Collections, so a change to BTDB.Collections can break BTDB.Serialization, while a change to BTDB.Serialization can't break BTDB.Collections.
Position
Below the diagonal: BTDB.Serialization uses a module listed above it, which is the healthy direction.
BTDB.Serialization uses BTDB.StreamLayer, so a change to BTDB.StreamLayer can break BTDB.Serialization, while a change to BTDB.Serialization can't break BTDB.StreamLayer.
Position
Below the diagonal: BTDB.Serialization uses a module listed above it, which is the healthy direction.
BTDB.Serialization uses BTDB.ODBLayer, so a change to BTDB.ODBLayer can break BTDB.Serialization, while a change to BTDB.Serialization can't break BTDB.ODBLayer.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
BTDB.EventStoreLayer uses BTDB.Buffer, so a change to BTDB.Buffer can break BTDB.EventStoreLayer, while a change to BTDB.EventStoreLayer can't break BTDB.Buffer.
Position
Below the diagonal: BTDB.EventStoreLayer uses a module listed above it, which is the healthy direction.
BTDB.EventStoreLayer uses BTDB.Encrypted, so a change to BTDB.Encrypted can break BTDB.EventStoreLayer, while a change to BTDB.EventStoreLayer can't break BTDB.Encrypted.
Position
Below the diagonal: BTDB.EventStoreLayer uses a module listed above it, which is the healthy direction.
BTDB.EventStoreLayer uses BTDB.Collections, so a change to BTDB.Collections can break BTDB.EventStoreLayer, while a change to BTDB.EventStoreLayer can't break BTDB.Collections.
Position
Below the diagonal: BTDB.EventStoreLayer uses a module listed above it, which is the healthy direction.
45 pairs of types, where a type in BTDB.EventStoreLayer uses a type in BTDB.StreamLayer. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
BTDB.EventStoreLayer uses BTDB.StreamLayer, so a change to BTDB.StreamLayer can break BTDB.EventStoreLayer, while a change to BTDB.EventStoreLayer can't break BTDB.StreamLayer.
Position
Below the diagonal: BTDB.EventStoreLayer uses a module listed above it, which is the healthy direction.
BTDB.EventStoreLayer uses BTDB.Serialization, so a change to BTDB.Serialization can break BTDB.EventStoreLayer, while a change to BTDB.EventStoreLayer can't break BTDB.Serialization.
Position
Below the diagonal: BTDB.EventStoreLayer uses a module listed above it, which is the healthy direction.
22→24 BTDB.EventStoreLayer uses BTDB.FieldHandlerpart of a loop✕
Connections
8 pairs of types, where a type in BTDB.EventStoreLayer uses a type in BTDB.FieldHandler.
BTDB.EventStoreLayer uses BTDB.FieldHandler, so a change to BTDB.FieldHandler can break BTDB.EventStoreLayer, while a change to BTDB.EventStoreLayer can't break BTDB.FieldHandler.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
22→26 BTDB.EventStoreLayer uses BTDB.ODBLayerpart of a loop✕
Connections
3 pairs of types, where a type in BTDB.EventStoreLayer uses a type in BTDB.ODBLayer.
BTDB.EventStoreLayer uses BTDB.ODBLayer, so a change to BTDB.ODBLayer can break BTDB.EventStoreLayer, while a change to BTDB.EventStoreLayer can't break BTDB.ODBLayer.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
BTDB.Interpreter uses BTDB.StreamLayer, so a change to BTDB.StreamLayer can break BTDB.Interpreter, while a change to BTDB.Interpreter can't break BTDB.StreamLayer.
Position
Below the diagonal: BTDB.Interpreter uses a module listed above it, which is the healthy direction.
BTDB.Interpreter uses BTDB.Serialization, so a change to BTDB.Serialization can break BTDB.Interpreter, while a change to BTDB.Interpreter can't break BTDB.Serialization.
Position
Below the diagonal: BTDB.Interpreter uses a module listed above it, which is the healthy direction.
BTDB.FieldHandler uses BTDB.Buffer, so a change to BTDB.Buffer can break BTDB.FieldHandler, while a change to BTDB.FieldHandler can't break BTDB.Buffer.
Position
Below the diagonal: BTDB.FieldHandler uses a module listed above it, which is the healthy direction.
BTDB.FieldHandler uses BTDB.Encrypted, so a change to BTDB.Encrypted can break BTDB.FieldHandler, while a change to BTDB.FieldHandler can't break BTDB.Encrypted.
Position
Below the diagonal: BTDB.FieldHandler uses a module listed above it, which is the healthy direction.
BTDB.FieldHandler uses BTDB.Collections, so a change to BTDB.Collections can break BTDB.FieldHandler, while a change to BTDB.FieldHandler can't break BTDB.Collections.
Position
Below the diagonal: BTDB.FieldHandler uses a module listed above it, which is the healthy direction.
28 pairs of types, where a type in BTDB.FieldHandler uses a type in BTDB.StreamLayer. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
BTDB.FieldHandler uses BTDB.StreamLayer, so a change to BTDB.StreamLayer can break BTDB.FieldHandler, while a change to BTDB.FieldHandler can't break BTDB.StreamLayer.
Position
Below the diagonal: BTDB.FieldHandler uses a module listed above it, which is the healthy direction.
BTDB.FieldHandler uses BTDB.Serialization, so a change to BTDB.Serialization can break BTDB.FieldHandler, while a change to BTDB.FieldHandler can't break BTDB.Serialization.
Position
Below the diagonal: BTDB.FieldHandler uses a module listed above it, which is the healthy direction.
BTDB.FieldHandler uses BTDB.EventStoreLayer, so a change to BTDB.EventStoreLayer can break BTDB.FieldHandler, while a change to BTDB.FieldHandler can't break BTDB.EventStoreLayer.
Position
Below the diagonal: BTDB.FieldHandler uses a module listed above it, which is the healthy direction.
24→26 BTDB.FieldHandler uses BTDB.ODBLayerpart of a loop✕
Connections
3 pairs of types, where a type in BTDB.FieldHandler uses a type in BTDB.ODBLayer.
BTDB.FieldHandler uses BTDB.ODBLayer, so a change to BTDB.ODBLayer can break BTDB.FieldHandler, while a change to BTDB.FieldHandler can't break BTDB.ODBLayer.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
BTDB.EventStore2Layer uses BTDB.Buffer, so a change to BTDB.Buffer can break BTDB.EventStore2Layer, while a change to BTDB.EventStore2Layer can't break BTDB.Buffer.
Position
Below the diagonal: BTDB.EventStore2Layer uses a module listed above it, which is the healthy direction.
BTDB.EventStore2Layer uses BTDB.Encrypted, so a change to BTDB.Encrypted can break BTDB.EventStore2Layer, while a change to BTDB.EventStore2Layer can't break BTDB.Encrypted.
Position
Below the diagonal: BTDB.EventStore2Layer uses a module listed above it, which is the healthy direction.
BTDB.EventStore2Layer uses BTDB.IL, so a change to BTDB.IL can break BTDB.EventStore2Layer, while a change to BTDB.EventStore2Layer can't break BTDB.IL.
Position
Below the diagonal: BTDB.EventStore2Layer uses a module listed above it, which is the healthy direction.
BTDB.EventStore2Layer uses BTDB.Collections, so a change to BTDB.Collections can break BTDB.EventStore2Layer, while a change to BTDB.EventStore2Layer can't break BTDB.Collections.
Position
Below the diagonal: BTDB.EventStore2Layer uses a module listed above it, which is the healthy direction.
BTDB.EventStore2Layer uses BTDB.StreamLayer, so a change to BTDB.StreamLayer can break BTDB.EventStore2Layer, while a change to BTDB.EventStore2Layer can't break BTDB.StreamLayer.
Position
Below the diagonal: BTDB.EventStore2Layer uses a module listed above it, which is the healthy direction.
BTDB.EventStore2Layer uses BTDB.Serialization, so a change to BTDB.Serialization can break BTDB.EventStore2Layer, while a change to BTDB.EventStore2Layer can't break BTDB.Serialization.
Position
Below the diagonal: BTDB.EventStore2Layer uses a module listed above it, which is the healthy direction.
28 pairs of types, where a type in BTDB.EventStore2Layer uses a type in BTDB.EventStoreLayer. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
BTDB.EventStore2Layer uses BTDB.EventStoreLayer, so a change to BTDB.EventStoreLayer can break BTDB.EventStore2Layer, while a change to BTDB.EventStore2Layer can't break BTDB.EventStoreLayer.
Position
Below the diagonal: BTDB.EventStore2Layer uses a module listed above it, which is the healthy direction.
BTDB.EventStore2Layer uses BTDB.FieldHandler, so a change to BTDB.FieldHandler can break BTDB.EventStore2Layer, while a change to BTDB.EventStore2Layer can't break BTDB.FieldHandler.
Position
Below the diagonal: BTDB.EventStore2Layer uses a module listed above it, which is the healthy direction.
BTDB.ODBLayer uses BTDB.Collections, so a change to BTDB.Collections can break BTDB.ODBLayer, while a change to BTDB.ODBLayer can't break BTDB.Collections.
Position
Below the diagonal: BTDB.ODBLayer uses a module listed above it, which is the healthy direction.
49 pairs of types, where a type in BTDB.ODBLayer uses a type in BTDB.KVDBLayer. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
163 pairs of types, where a type in BTDB.ODBLayer uses a type in BTDB.StreamLayer. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
BTDB.ODBLayer uses BTDB.StreamLayer, so a change to BTDB.StreamLayer can break BTDB.ODBLayer, while a change to BTDB.ODBLayer can't break BTDB.StreamLayer.
Position
Below the diagonal: BTDB.ODBLayer uses a module listed above it, which is the healthy direction.
BTDB.ODBLayer uses BTDB.Serialization, so a change to BTDB.Serialization can break BTDB.ODBLayer, while a change to BTDB.ODBLayer can't break BTDB.Serialization.
Position
Below the diagonal: BTDB.ODBLayer uses a module listed above it, which is the healthy direction.
BTDB.ODBLayer uses BTDB.Interpreter, so a change to BTDB.Interpreter can break BTDB.ODBLayer, while a change to BTDB.ODBLayer can't break BTDB.Interpreter.
Position
Below the diagonal: BTDB.ODBLayer uses a module listed above it, which is the healthy direction.
105 pairs of types, where a type in BTDB.ODBLayer uses a type in BTDB.FieldHandler. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
BTDB.ODBLayer uses BTDB.FieldHandler, so a change to BTDB.FieldHandler can break BTDB.ODBLayer, while a change to BTDB.ODBLayer can't break BTDB.FieldHandler.
Position
Below the diagonal: BTDB.ODBLayer uses a module listed above it, which is the healthy direction.
59 pairs of types, where a type in BTDB.Replication uses a type in BTDB.KVDBLayer. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
BTDB.Replication uses BTDB.KVDBLayer, so a change to BTDB.KVDBLayer can break BTDB.Replication, while a change to BTDB.Replication can't break BTDB.KVDBLayer.
Position
Below the diagonal: BTDB.Replication uses a module listed above it, which is the healthy direction.
BTDB.Replication uses BTDB.StreamLayer, so a change to BTDB.StreamLayer can break BTDB.Replication, while a change to BTDB.Replication can't break BTDB.StreamLayer.
Position
Below the diagonal: BTDB.Replication uses a module listed above it, which is the healthy direction.
BTDB.Replication uses BTDB.ODBLayer, so a change to BTDB.ODBLayer can break BTDB.Replication, while a change to BTDB.Replication can't break BTDB.ODBLayer.
Position
Below the diagonal: BTDB.Replication uses a module listed above it, which is the healthy direction.
ODbDump.Visitor uses BTDB.KVDBLayer, so a change to BTDB.KVDBLayer can break ODbDump.Visitor, while a change to ODbDump.Visitor can't break BTDB.KVDBLayer.
Position
Below the diagonal: ODbDump.Visitor uses a module listed above it, which is the healthy direction.
ODbDump.Visitor uses BTDB.ODBLayer, so a change to BTDB.ODBLayer can break ODbDump.Visitor, while a change to ODbDump.Visitor can't break BTDB.ODBLayer.
Position
Below the diagonal: ODbDump.Visitor uses a module listed above it, which is the healthy direction.
BTDB.Replication.EventLog uses BTDB.Replication, so a change to BTDB.Replication can break BTDB.Replication.EventLog, while a change to BTDB.Replication.EventLog can't break BTDB.Replication.
Position
Below the diagonal: BTDB.Replication.EventLog uses a module listed above it, which is the healthy direction.
31 pairs of types, where a type in BTDB.LSM uses a type in BTDB.LSM.Engine. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
BTDB.LSM uses BTDB.Replication.EventLog, so a change to BTDB.Replication.EventLog can break BTDB.LSM, while a change to BTDB.LSM can't break BTDB.Replication.EventLog.
Position
Below the diagonal: BTDB.LSM uses a module listed above it, which is the healthy direction.
BTDB.Replication.Azure uses BTDB.KVDBLayer, so a change to BTDB.KVDBLayer can break BTDB.Replication.Azure, while a change to BTDB.Replication.Azure can't break BTDB.KVDBLayer.
Position
Below the diagonal: BTDB.Replication.Azure uses a module listed above it, which is the healthy direction.
BTDB.Replication.Azure uses BTDB.StreamLayer, so a change to BTDB.StreamLayer can break BTDB.Replication.Azure, while a change to BTDB.Replication.Azure can't break BTDB.StreamLayer.
Position
Below the diagonal: BTDB.Replication.Azure uses a module listed above it, which is the healthy direction.
BTDB.Replication.Azure uses BTDB.Replication, so a change to BTDB.Replication can break BTDB.Replication.Azure, while a change to BTDB.Replication.Azure can't break BTDB.Replication.
Position
Below the diagonal: BTDB.Replication.Azure uses a module listed above it, which is the healthy direction.
BTDB.Replication.Azure uses BTDB.Replication.EventLog, so a change to BTDB.Replication.EventLog can break BTDB.Replication.Azure, while a change to BTDB.Replication.Azure can't break BTDB.Replication.EventLog.
Position
Below the diagonal: BTDB.Replication.Azure uses a module listed above it, which is the healthy direction.
BTDB.Replication.EventSourcing uses BTDB.KVDBLayer, so a change to BTDB.KVDBLayer can break BTDB.Replication.EventSourcing, while a change to BTDB.Replication.EventSourcing can't break BTDB.KVDBLayer.
Position
Below the diagonal: BTDB.Replication.EventSourcing uses a module listed above it, which is the healthy direction.
BTDB.Replication.EventSourcing uses BTDB.EventStoreLayer, so a change to BTDB.EventStoreLayer can break BTDB.Replication.EventSourcing, while a change to BTDB.Replication.EventSourcing can't break BTDB.EventStoreLayer.
Position
Below the diagonal: BTDB.Replication.EventSourcing uses a module listed above it, which is the healthy direction.
BTDB.Replication.EventSourcing uses BTDB.EventStore2Layer, so a change to BTDB.EventStore2Layer can break BTDB.Replication.EventSourcing, while a change to BTDB.Replication.EventSourcing can't break BTDB.EventStore2Layer.
Position
Below the diagonal: BTDB.Replication.EventSourcing uses a module listed above it, which is the healthy direction.
BTDB.Replication.EventSourcing uses BTDB.ODBLayer, so a change to BTDB.ODBLayer can break BTDB.Replication.EventSourcing, while a change to BTDB.Replication.EventSourcing can't break BTDB.ODBLayer.
Position
Below the diagonal: BTDB.Replication.EventSourcing uses a module listed above it, which is the healthy direction.
BTDB.Replication.EventSourcing uses BTDB.Replication, so a change to BTDB.Replication can break BTDB.Replication.EventSourcing, while a change to BTDB.Replication.EventSourcing can't break BTDB.Replication.
Position
Below the diagonal: BTDB.Replication.EventSourcing uses a module listed above it, which is the healthy direction.
BTDB.Replication.EventSourcing uses BTDB.Replication.EventLog, so a change to BTDB.Replication.EventLog can break BTDB.Replication.EventSourcing, while a change to BTDB.Replication.EventSourcing can't break BTDB.Replication.EventLog.
Position
Below the diagonal: BTDB.Replication.EventSourcing uses a module listed above it, which is the healthy direction.
BTDB.Replication.Http uses BTDB.StreamLayer, so a change to BTDB.StreamLayer can break BTDB.Replication.Http, while a change to BTDB.Replication.Http can't break BTDB.StreamLayer.
Position
Below the diagonal: BTDB.Replication.Http uses a module listed above it, which is the healthy direction.
32 pairs of types, where a type in BTDB.Replication.Http uses a type in BTDB.Replication. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
BTDB.Replication.Http uses BTDB.Replication, so a change to BTDB.Replication can break BTDB.Replication.Http, while a change to BTDB.Replication.Http can't break BTDB.Replication.
Position
Below the diagonal: BTDB.Replication.Http uses a module listed above it, which is the healthy direction.
BTDB.Replication.Http uses BTDB.Replication.EventLog, so a change to BTDB.Replication.EventLog can break BTDB.Replication.Http, while a change to BTDB.Replication.Http can't break BTDB.Replication.EventLog.
Position
Below the diagonal: BTDB.Replication.Http uses a module listed above it, which is the healthy direction.
BTDB.BackendActions uses BTDB.ODBLayer, so a change to BTDB.ODBLayer can break BTDB.BackendActions, while a change to BTDB.BackendActions can't break BTDB.ODBLayer.
Position
Below the diagonal: BTDB.BackendActions uses a module listed above it, which is the healthy direction.
BTDB.BackendActions uses BTDB.Replication, so a change to BTDB.Replication can break BTDB.BackendActions, while a change to BTDB.BackendActions can't break BTDB.Replication.
Position
Below the diagonal: BTDB.BackendActions uses a module listed above it, which is the healthy direction.
BTDB.BackendActions uses BTDB.Replication.EventSourcing, so a change to BTDB.Replication.EventSourcing can break BTDB.BackendActions, while a change to BTDB.BackendActions can't break BTDB.Replication.EventSourcing.
Position
Below the diagonal: BTDB.BackendActions uses a module listed above it, which is the healthy direction.
DBBenchmark.LSM uses BTDB.LSM.Storage, so a change to BTDB.LSM.Storage can break DBBenchmark.LSM, while a change to DBBenchmark.LSM can't break BTDB.LSM.Storage.
Position
Below the diagonal: DBBenchmark.LSM uses a module listed above it, which is the healthy direction.
DBBenchmark.LSM uses BTDB.KVDBLayer, so a change to BTDB.KVDBLayer can break DBBenchmark.LSM, while a change to DBBenchmark.LSM can't break BTDB.KVDBLayer.
Position
Below the diagonal: DBBenchmark.LSM uses a module listed above it, which is the healthy direction.
EventLogBench uses BTDB.Replication.EventLog, so a change to BTDB.Replication.EventLog can break EventLogBench, while a change to EventLogBench can't break BTDB.Replication.EventLog.
Position
Below the diagonal: EventLogBench uses a module listed above it, which is the healthy direction.
EventLogBench uses BTDB.Replication.EventSourcing, so a change to BTDB.Replication.EventSourcing can break EventLogBench, while a change to EventLogBench can't break BTDB.Replication.EventSourcing.
Position
Below the diagonal: EventLogBench uses a module listed above it, which is the healthy direction.
AotActionsSmoke uses BTDB.EventStoreLayer, so a change to BTDB.EventStoreLayer can break AotActionsSmoke, while a change to AotActionsSmoke can't break BTDB.EventStoreLayer.
Position
Below the diagonal: AotActionsSmoke uses a module listed above it, which is the healthy direction.
AotActionsSmoke uses BTDB.ODBLayer, so a change to BTDB.ODBLayer can break AotActionsSmoke, while a change to AotActionsSmoke can't break BTDB.ODBLayer.
Position
Below the diagonal: AotActionsSmoke uses a module listed above it, which is the healthy direction.
AotActionsSmoke uses BTDB.Replication.EventLog, so a change to BTDB.Replication.EventLog can break AotActionsSmoke, while a change to AotActionsSmoke can't break BTDB.Replication.EventLog.
Position
Below the diagonal: AotActionsSmoke uses a module listed above it, which is the healthy direction.
AotActionsSmoke uses BTDB.Replication.EventSourcing, so a change to BTDB.Replication.EventSourcing can break AotActionsSmoke, while a change to AotActionsSmoke can't break BTDB.Replication.EventSourcing.
Position
Below the diagonal: AotActionsSmoke uses a module listed above it, which is the healthy direction.
33 pairs of types, where a type in AotActionsSmoke uses a type in BTDB.BackendActions. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
AotActionsSmoke uses BTDB.BackendActions, so a change to BTDB.BackendActions can break AotActionsSmoke, while a change to AotActionsSmoke can't break BTDB.BackendActions.
Position
Below the diagonal: AotActionsSmoke uses a module listed above it, which is the healthy direction.
BTDB.BackendActions.Testing uses BTDB.Replication.EventSourcing, so a change to BTDB.Replication.EventSourcing can break BTDB.BackendActions.Testing, while a change to BTDB.BackendActions.Testing can't break BTDB.Replication.EventSourcing.
Position
Below the diagonal: BTDB.BackendActions.Testing uses a module listed above it, which is the healthy direction.
BTDB.BackendActions.Testing uses BTDB.BackendActions, so a change to BTDB.BackendActions can break BTDB.BackendActions.Testing, while a change to BTDB.BackendActions.Testing can't break BTDB.BackendActions.
Position
Below the diagonal: BTDB.BackendActions.Testing uses a module listed above it, which is the healthy direction.
At a glance — Code Health · 62.9 · Adequate · gated by D2 ·
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
A02:2025 — Security Misconfiguration
50
High / Critical
A05:2025 — Injection
13
High / Critical
A07:2025 — Authentication Failures
2
High / Critical
Roadmap
Top priorities: Protect endpoints by default-deny: [Authorize] + role/policy authorization, or imperative guard methods (throw-on-violation) called from every handler; Strengthen data-at-rest protection: vault your keys (Azure Key Vault / AWS KMS / IDataProtector key ring) and encrypt the most sensitive columns (EF HasConversion encryption or provider-native column encryption) — partial coverage still leaves gaps; Resolve the 19 Deprecated finding(s) in Dependency Hygiene — start with BTDBTest.csproj (4), BTDB.SourceGenerator.Tests.csproj (3), BTDB.BackendActions.Test.csproj (2).
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Protect endpoints by default-deny: [Authorize] + role/policy authorization, or imperative guard methods (throw-on-violation) called from every handler.
Add a SAST step to CI running what this repository's stack ships: CodeQL's csharp pack, or a .NET security analyzer package — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.
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 — 74
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 — 1799
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 — 216
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 5
Something this survey could not settle
from the outside, and which could be critical or serious. Either a control was required and no
positive evidence of it exists in the repository — a backup job that nothing shows was ever restored from proves
nothing about restores — or our own analysis could not run over that part of the tree. This is not a clean
result. These are excluded from the score rather than awarded a pass, so the number on the cover neither
rewards nor penalises them: if you act on this survey without resolving them, you carry that risk yourself. Each
one is named under Limitations.
Methodology & how to trust this report
This survey is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. All 77 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 — 77 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, 2055 of 2089 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 run, not the code.
This report answers yes to all three. That's the bar to hold any assessment to.
Tools & methods
The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.
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 run also records its exact cause in diagnostics.md.
D8 Code Coverage — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. Coverage NOT MEASURED: `--collect:"XPlat Code Coverage"` names a data collector that ships in the `coverlet.collector` package, and this repository wires up none — no test project references it and no runsettings declares one. The absence of coverage here is therefore not evidence about the suite or about our analyzer environment: without a collector, `--collect` produces nothing even from a suite that builds and passes. Add a `coverlet.collector` PackageReference to the test project(s) (or commit the Cobertura/OpenCover/lcov report your CI produces) and real coverage will be measured. It is excluded from the score rather than counted as a near-zero defect. You can widen what we reach: add the `coverlet.collector` package to the test projects to enable coverage (or commit the Cobertura/OpenCover/lcov report your CI produces).
D10 Test Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The 3,163 test(s) behind this row are the ones the C# collector could read, and this repository also carries at least 1 test source file(s) (.py) that it cannot: it parses C# syntax and matches C# test attributes, so a vitest/jest/JUnit/pytest-style suite is invisible to it. Skipped tests, zero-assertion tests and the other quality signals on this row are UNMEASURED in that suite — their absence from the counts above is a gap in this analyzer's language coverage, not a finding that those tests are sound.
D11 Test Reliability — 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. Test reliability is scored on the 1 tier(s) that produced comparable repeat runs; 1 tier(s) did not, and are excluded from the measurement rather than counted (unit: measured (0 flaky); other: not included — too large to re-run within its budget). This is OUR limitation, not a defect in the repository.
D12 Dependency Hygiene — 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 npm dependencies as well as NuGet ones — manifest: package.json — and the counts on this row cover the NuGet side ONLY. This dimension reads dependency currency from `<PackageReference>` elements via `dotnet list package`; it does not read it, so the npm packages declared there were not checked for newer, deprecated or unmaintained releases. Their absence from the counts above is a gap in this analyzer's ecosystem coverage — not a finding that those dependencies are current.
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 package.json, but the licence verdict published here was taken over its NuGet package dependencies. Nothing was read about its npm dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
D16 Bus Factor — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. Single-maintainer repository — bus factor is not applicable (31 contributor(s) across 3361 commit(s) sampled, automation and bot accounts excluded). One of them holds 89% of the history; the other 30 hold 0.4% each on average, below the 5% at which there is somebody to hand the work to. That is a single maintainer with drive-by contributors, not a team whose knowledge has concentrated — so the bus factor is not applicable and there is nothing here for the owner to act on.
D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This kind did not reach the 95 % precision gate in three adjudicated runs (docs/plans/deterministic-engine/adjudication/D19-sample3-v3.md), so by the pre-registered fallback it publishes no row until a re-measurement shows it does. The candidates are counted here, not reported as findings, and the score does not include them.
D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
D30 Dependency Vulnerabilities — measured, with a gap in what it reached — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. The solution did not restore on the analyzer's .NET SDK (an SDK/target-framework/restore mismatch, common for an older codebase), so there was no restored dependency graph to scan. 2 of 3 declared ecosystem(s) (npm,osv) WERE scanned and every vulnerability they reported is included in this result; nuget was not, so this dimension's score covers less than the dependency surface this repository declares, and nothing here is evidence that nuget is free of known-vulnerable dependencies.
D32 Data Compliance (PII/GDPR) — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `AotActionsSmoke/Program.cs`, `AotActionsSmoke/Storage.cs`, `BTDB.BackendActions/ActionCoordinator.cs`, `BTDB.BackendActions/ActionPlanner.cs`, `BTDB.BackendActions/ActionWorker.cs`, … (+127 more) produced a parse error, so every rule in this engine's `gdpr.yml` was absent there. That absence is NOT a clean result: these rules detect personal data crossing a boundary into a log sink, a URL or browser storage, and a file that was never parsed cannot report any of the three. The rest of the tree analysed normally and its rows above stand; only these files are unaccounted for. You can widen what we reach: fix the syntax error (or exclude the file deliberately) and re-scan to cover it.
AX9 CQS / query purity — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 3 query handlers were classified, but the query-purity walk could not open any of their bodies: it recognises a value-returning entry point named Execute/Handle/Consume (±Async), or one implementing a member of the handler interface the type was classified on, and the handlers in this repository have neither. Scoring the set anyway would report every unopened handler as pure, so AX9 abstains instead of publishing a perfect score it did not measure.
AXR1 Runtime accessibility — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Render strategy: boot via ToolchainServer (BTDB.SourceGenerator.Sample). the service exited before it opened a port — `ASPNETCORE_URLS=http://127.0.0.1:0 ASPNETCORE_ENVIRONMENT=Development dotnet run --no-build --no-launch-profile --project 'BTDB.SourceGenerator.Sample.csproj'`: K3rdPartyDependency
Ok
Hello
(42, Hello); runtime evidence skipped (launch chosen because BTDB.SourceGenerator.Sample/BTDB.SourceGenerator.Sample.csproj is a Microsoft.NET.Sdk.Web project).
ED5 Idempotency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check classifies a mutation as idempotent when a guard is visible (an exists check, an upsert, an idempotency key or inbox, a versioned or fixed-value write) and as at risk only on positive evidence that a re-run double-applies it (a fresh-identity insert, an accumulation, a growing collection, an unkeyed outbound send or charge). The rest show neither, and they are the majority here, so a score over the classified minority would not describe this repository. That is a limit of the analyzer, not a finding about your code.
IC1 Incompleteness & stubs — 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. 62 further occurrence(s) are not listed individually; the score already reflects all 102.
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.
P10 Library API & versioning — 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. 50 further occurrence(s) are not listed individually; the score already reflects all 90.
PF3 Async & latency hygiene — 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. 143 further occurrence(s) are not listed individually; the score already reflects all 183.
X1 Async correctness — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 12 further occurrence(s) are not listed individually; the score already reflects all 52.
X2 Cancellation propagation — 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. 73 further occurrence(s) are not listed individually; the score already reflects all 113.
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. 2 further occurrence(s) are not listed individually; the score already reflects all 42.
Repo exclusion declarations (.gitattributes linguist-generated/vendored, .editorconfig generated_code): none declared — every source file was scored.
Limitations & what we did not check
We assess the repository exactly as committed, and only the repository. By design we do not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.
Per-dimension blind spots
For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.
D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
D11 Test Reliability: Flakiness is inferred from history/markers — we run the suite once (for coverage), not the repeated runs under varied conditions that reveal nondeterminism, so a flaky test never recorded as failing is invisible here.
D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
D13 REDACTED Scanning: REDACTED detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
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.
D18 Solution Shape: Build integrity reflects whether the solution compiled in this environment — a build that needs a private feed, a specific SDK, or a generated file absent from the repo can read as broken when it is merely unreproducible here.
D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
D20 ADR Quality: ADR quality checks the structure of the decision records present: it cannot know about decisions made and never recorded, and it does not judge how well a record argues its case. Records in a language the section lexicon does not cover are not evaluated.
D21 Naming Consistency: Naming consistency compares each name with the convention its structural peers follow in this repository: it cannot tell whether a consistently used name is a good one, and languages other than C# and TypeScript are not measured.
D22 Internal API Consistency: API consistency compares the call shapes of members that play the same role on the exposed C# surface: whether the API suits its callers is not measured, and surfaces in other languages are not measured.
D23 Boundary Type-Coupling: Boundary leakage is detected from type references across detected contexts — leaks that flow through primitives, serialization or shared infrastructure may not surface as a typed reference.
D24 Comment Value: Comment value is measured as redundancy only: a comment that repeats its code's words is found, but a paraphrase in other words, a vague comment, or one the code contradicts is not, and whether a comment is valuable is not claimed. Comments in other scripts or languages, and outside C#, are not judged.
D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
D27 Navigability: Indirection/navigability is structural — it measures hops to follow a call, not whether that indirection buys real flexibility or just ceremony.
D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
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.
D40 Network Egress Confinement: Egress confinement is read from committed Kubernetes manifests — a policy applied out-of-band (cluster-default deny, a service mesh, or a cloud firewall/security group off-repo) is invisible, and a present NetworkPolicy is declared config, not proof the cluster admission-controller actually enforces it at runtime.
D41 Kernel & Syscall Confinement: Syscall/MAC confinement is read from committed manifests — a profile applied by a cluster-wide PodSecurity default or a mutating webhook off-repo isn't seen, and a declared seccomp/AppArmor profile is config presence, not proof the node's kernel actually loaded and enforced it.
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.
C4 Data Retention: This control is scored from in-repo evidence only — its real-world effectiveness, exercised only at runtime, is outside a static scan.
M4 Documentation accuracy: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
P5 DR & Backup: Backup/restore and disaster-recovery readiness is judged from in-repo evidence — a config that exists is not a tested restore, so the absence of positive evidence is reported as "not evidenced", never scored as present.
P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.
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.
171 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was Interpreter.Loop at 214. A further 18 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 Interpreter.RunCodeOp at 113 — they are counted neither in the figure above nor in this dimension's score.
+ 165 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 3 bodies over 120 down to 120 or less in Cyclomatic Complexity — start with Interpreter.Loop (cyclomatic 214), DefaultTypeConverterFactory.GetConverter (cyclomatic 202), SourceGenerator.GenerateRelationInterfaceFactory (cyclomatic 124). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 3 together lifts Cyclomatic Complexity from 5.2 to about 5.8/10, projected with the scoring formula itself and assuming each lands exactly at 120; a cleaner split scores higher.
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.
+ 305 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 10 bodies over 120 down to 120 or less in Cognitive Complexity — start with SourceGenerator.GenerateRelationInterfaceFactory (cognitive 374), DefaultTypeConverterFactory.GetConverter (cognitive 358), SourceGenerator.GenerateClassFactory (cognitive 287). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 10 together lifts Cognitive Complexity from 3.3 to about 5.0/10, projected with the scoring formula itself and assuming each lands exactly at 120; 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.4 / 10Strong✓ Tool-verified
What it measures: Over-large classes that try to do too much ("god classes").
Method: God-class detection by line and method-count thresholds per logical type (partial classes unified), filtered for generated code and registration/contract false positives. Deterministic.
Resolve the 48 MethodTooLong finding(s) in God Classes — start with Main.cs (8), BTreeKeyValueDB.cs (4), Interpreter.cs (3). — One of this dimension's main actionable groups (48 warning-level).
Resolve the 41 TooManyMethods finding(s) in God Classes — start with RelationQuery.cs (2), Interpreter.cs (2), Main.cs. — One of this dimension's main actionable groups (41 warning-level).
Resolve the 32 FileTooLong finding(s) in God Classes — start with Main.cs, RelationQuery.cs, Interpreter.cs. — One of this dimension's main actionable groups (32 warning-level).
Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D4 · Code Duplication4.7 / 10Weak✓ Tool-verified
What it measures: How much of the production code is copy-pasted: the share of production lines inside a reported copy (every copy of a duplicated block or of an edited member, each line once), 10 at none and 0 at a quarter of the lines.
Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), scored on the share of production lines inside a reported copy (each line once; 10 at none, 0 at a quarter). Deterministic.
369 duplicated block group(s) detected. 13.3 % of the production lines (16,371 of 123,247) are in a reported copy. A further 295 rows report members as variants of one another; the share counts each copied line once, however many rows cite it.
+ 176 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 29 Duplicated block (7 lines × 2) finding(s) in Code Duplication — start with InMemoryFileCollection.cs (3), PackUnpack.cs (2), DictionaryTypeDescriptor.cs (2). — One of this dimension's main actionable groups (29 warning-level).
Resolve the 27 Duplicated block (8 lines × 2) finding(s) in Code Duplication — start with Constraint.cs (5), RefDictionary.cs (2), RelationBuilder.cs (2). — One of this dimension's main actionable groups (27 warning-level).
Resolve the 27 Duplicated block (9 lines × 2) finding(s) in Code Duplication — start with ListTypeDescriptor.cs (2), Bon.cs (2), PackUnpack.cs (2). — One of this dimension's main actionable groups (27 warning-level).
Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D5 · Coupling9.8 / 10Stronggated by 1 serious finding✓ 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.
Resolve the 1 Off the main sequence finding(s) in Coupling — start with BTDB.csproj. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d5_recommendation.md · top locations in Appendix A, every location in findings.md.
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 9 Low cohesion finding(s) in Cohesion (LCOM4) — start with AzureBlobFileCollection.cs (2), MemoryMappedMemReader.cs, SimpleTypeDescriptor.cs. — One of this dimension's main actionable groups (9 warning-level).
Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D10 · Test Quality9.9 / 10Stronggated by 27 serious findings✓ Tool-verified
What it measures: Whether the tests truly assert behaviour rather than just running the code.
Method: Per-test assertions, skips, and mock references analyzed via Roslyn; structured skip-reason tags (BUG:/ENV:) separate documented deferrals from debt. Deterministic.
9 skipped (9 with a documented reason), 16 zero-assertion, 11 synchronised by a fixed sleep, no mocking-framework packages referenced (hand-written doubles or no mocking) across 3163 tests. Measured on the C# suite only — at least 1 test source file(s) (.py) went unread, so its test quality is unmeasured and is not in these counts.
No assertions: CouldBeCreated · ×16BTDBTest/BTreeLibTests/RootNode12Tests.cs:27
Resolve the 16 No assertions finding(s) in Test Quality — start with EventStoreTest.cs (4), RootNode12Tests.cs (3), ObjectDbDateTimeKeyKindTest.cs (2). — One of this dimension's main actionable groups (16 warning-level).
Resolve the 11 Fixed-sleep synchronisation finding(s) in Test Quality — start with EventLogServiceTest.cs (3), ProcessFailoverTest.cs (3), IOCCoverageTest.cs (2). — One of this dimension's main actionable groups (11 warning-level).
Detailed fixes: d10_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D11 · Test Reliability10.0 / 10Exemplary✓ Tool-verified
What it measures: Whether the tests pass reliably, with no flakiness.
Method: Suite re-run N times within tiered wall-clock budgets (unit to e2e); tests failing non-deterministically across runs flagged; guarded tests retried when #if guards detected.
Only 1 of 2 test tiers measured — the score covers those alone. 0 flaky across 1 measured tier(s). unit: measured (0 flaky); other: not included — too large to re-run within its budget.
What it measures: Whether dependencies are current, not deprecated, and not bloated. Known vulnerabilities are D30's.
Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (capped-linear for deprecation, prerelease and outdated) per KLoC. Known-vulnerable packages are D30's and are not charged here (rubric-2026.11.2). Exhaustive.
Resolve the 19 Deprecated finding(s) in Dependency Hygiene — start with BTDBTest.csproj (4), BTDB.SourceGenerator.Tests.csproj (3), BTDB.BackendActions.Test.csproj (2). — One of this dimension's main actionable groups (19 warning-level).
Detailed fixes: d12_recommendation.md · top locations in Appendix A, every location in findings.md.
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 300 packages use a banned license. ★ DEPTH: this repository's MSBuild projects declare 33 direct `PackageReference`(s), and 217 further package(s) were reached beyond them by closing the graph over nuget.org's own nuspec dependency graph — so a banned licence pulled in only by a dependency's OWN dependencies is inside this verdict. A package whose licence nuget.org could not be asked for is not graded, and version ranges are taken at their lower bound, so this is the closure as that graph states it rather than a restored consumer's exact resolution. ★ COVERAGE OF THIS VERDICT: it grades this repository's NuGet package dependencies and nothing else. The repository also declares package.json, 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 44 Hotspot finding(s) in Churn × Complexity Hotspots — start with Program.cs (3), Main.cs, BTreeKeyValueDB.cs. — One of this dimension's main actionable groups (44 warning-level).
Resolve the 1 Repeated repair finding(s) in Churn × Complexity Hotspots — start with BTreeKeyValueDBCursor.cs. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
Dead code: LoadVector · ×61BTDB/Buffer/PackUnpack.cs:609
+ 3 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 35 EmptyCatchBlock finding(s) in Explicit Debt — start with EventLogService.cs (4), NodeScenario.cs (4), AzureReplicationStorage.cs (3). — One of this dimension's main actionable groups (35 issue-level).
Resolve the 12 NoWarnInCsproj finding(s) in Explicit Debt — start with BTDBTest.csproj (5), BTDB.csproj (3), BTDB.AzureStorage.csproj (3). — One of this dimension's main actionable groups (12 issue-level).
Resolve the 8 FileScopedPragmaDisable finding(s) in Explicit Debt — start with BackendActionsGeneration.cs, RelationQueryInterceptorGenerator.cs, InMemoryFileCollection.cs. — One of this dimension's main actionable groups (8 issue-level).
Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the solution is laid out in a sensible, conventional structure.
Method: Solution structure: project count, decomposition, shell-project detection, build success (confirmed failures cap the score); traced to actual .sln files and binaries. Deterministic.
32 projects, 1080 source files, 254200 hand-written lines of code (123247 production / 130953 test — the split is derived per file: test is what its project, its own path, or a compile-guarded region marks as test, and a file carrying no test signal counts as production), 52 inter-project edges.
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.
1 of 2 documentation facets pass in full; short on: F2 example. 50 document(s) read across 19 unit(s).
Documentation: no build, run or usage exampleBTDB.BackendActions/README.md:1
✓ On the Gold path — maintain.
Detailed fixes: d19_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D20 · ADR Quality0.0 / 10Critical✓ Tool-verified
What it measures: Whether architecture decisions are recorded well (context, decision, consequences).
Method: Every ADR read by its section structure: nine located rules (a missing Decision, Context or Consequences section, a stale status, two records deciding the same question, a dangling supersede link, a number-only title, a single option, no named cost, no status where the log uses one, no enforcement field where the log adopted one), each a fixed deduction from 10; the score is the mean over evaluated records. Deterministic, no model. Advisory.
No ADRs foundAotActionsSmoke/AotActionsSmoke.csproj:3
What to do
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with AotActionsSmoke.csproj. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d20_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether names — types, methods, variables — are clear and consistent.
Method: Seven vocabulary-free rules (N1-N7) mine each naming convention from the repository and flag a name that breaks a convention its structural peers in the same unit follow; production C# and TypeScript, each its own population. Deterministic, no model, no sample. Advisory.
1 naming inconsistencies among 15 declarations measured against a convention their peers follow.
`outOfOrderSkParts` spells `Sk` where 14 names in the project spell it `SK`BTDB/ODBLayer/RelationInfo.cs:2114
What to do
Resolve the 1 `outOfOrderSkParts` spells `Sk` where 14 names in the project spell it… finding(s) in Naming Consistency — start with RelationInfo.cs. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d21_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D22 · Internal API Consistency8.1 / 10Strong✓ Tool-verified
What it measures: Whether the internal API surface is consistent and coherent.
Method: Call-shape rules (A1-A9) over the structured code model of the intentionally exposed C# surface: members of one type, overloads of one name and the same slot across sibling types are compared, and a member that makes a caller use a different convention for the same kind of operation is flagged. Deterministic, no model. Advisory.
2 API inconsistencies among 105 exposed members measured against a convention their peers follow.
`BackendActions.ListActions` types `tenantId` as UInt64? where 3 sibling members type it UInt64BTDB.BackendActions/Monitoring.cs:21
`ReplicationFileSet.RestoreAsync` takes its CancellationToken inside where 36 members of the package take it lastBTDB.Replication/ReplicationFileSet.cs:60
What to do
Resolve the 1 `BackendActions.ListActions` types `tenantId` as UInt64? where 3 sibling… finding(s) in Internal API Consistency — start with Monitoring.cs. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 `ReplicationFileSet.RestoreAsync` takes its CancellationToken inside… finding(s) in Internal API Consistency — start with ReplicationFileSet.cs. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d22_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether domain types (IDs, enums, value objects) leak across bounded-context boundaries.
Method: Cross-context domain-type leakage via Roslyn structural classification (strongly-typed IDs / value objects) over every public surface. Exhaustive, deterministic, type-level aggregate-boundary check.
Coverage: Bounded contexts derived from NAMESPACE prefix (or graph-inferred where available); cross-boundary domain-type leakage then checked exhaustively over every public member of every type.
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.
1 of 32 projects flagged as possibly oversized/incoherent.
Projects may be oversized for their cohesionBTDB/BTDB.csproj:1
Split BTDBBTDB/BTDB.csproj:1
✓ On the Gold path — maintain.
Detailed fixes: d26_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D27 · Navigability7.8 / 10Strong✓ Tool-verified
What it measures: How far you must trace to follow a call — low indirection and co-located slices read easier.
Method: Call indirection (interface hops, cross-namespace calls, slice-locality scaled) over a sampled set of method invocations, size-aware baseline. Sampled; confidence discounted by symbol-resolution gaps. C# also names each pass-through layer (a class whose every public method only forwards its own parameters to one collaborator) as a located finding; the score is not affected.
Coverage: Slice locality from the first namespace segments, SAMPLED (≤400 methods) — not exhaustive.
55 % of calls cross a namespace and 1 % go through an interface, but 75 % of collaborators are co-located — so following a call takes several hops. Baseline: large — vertical-slice locality expected.
Resolve the 2 Pass-through layer finding(s) in Navigability — start with FastSubjectHelpers.cs, EventSerializationBenchmark.cs. — One of this dimension's main actionable groups (2 recommendation-level).
Detailed fixes: d27_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
1 finding(s): 0 critical, 1 high, 0 medium, 0 low. Remediation for historically-committed secrets is credential rotation — they remain in history regardless of later deletion.
REDACTED
REDACTED
What to do
Resolve the 1 REDACTED finding(s) in Secrets (history) — start with REDACTED. — One of this dimension's main actionable groups (1 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).
13 finding(s): 0 critical, 6 high, 6 medium, 1 low. 6 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` — one pinning decision is charged once, not once per lens. semgrep hit a parse error in 307 file(s) — `AotActionsSmoke/Program.cs` (line 66, line 102, line 116, …), `AotActionsSmoke/Storage.cs` (line 114), `BTDB.BackendActions.Process.Test/ActionsNode.cs` (line 46, line 80, line 81), `BTDB.BackendActions.Process.Test/ActionsProcessTest.cs` (line 13), `BTDB.BackendActions.Test/ActionGenerationTest.cs` (line 27), … (+302 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. In 175 of those file(s) — `AotActionsSmoke/Program.cs`, `AotActionsSmoke/Storage.cs`, `BTDB.BackendActions.Process.Test/ActionsNode.cs`, `BTDB.BackendActions.Process.Test/ActionsProcessTest.cs`, `BTDB.BackendActions.Test/ActionGenerationTest.cs`, … (+170 more) — the break is a C# primary constructor, which semgrep's grammar cannot parse and which hides the type from every rule scoped to it; those files were re-scanned from a shadow copy with the constructor's parameter list blanked (line and column preserving), which restores the type to the rules, and 0 additional row(s) came from that pass. Only the header's own parameter list is unread in them. In 52 of those file(s) — `BTDB.BackendActions.Test/PlannerEquivalenceTest.cs`, `BTDB.BackendActions.Test/TestInfrastructure.cs`, `BTDB.BackendActions/ActionWorker.cs`, `BTDB.LSM/Engine/LsmCompaction.cs`, `BTDB.LSM/LsmKeyValueDB.Wal.cs`, … (+47 more) — the break is at a TYPE DECLARATION (a C# primary constructor semgrep's grammar cannot parse), so the loss is wider than the named lines: rules scoped to that type see no type to scope to and are blind over its whole body, while rules matching statements keep working there. Absence of a type-scoped finding in those types is not evidence of anything.
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
+ 1 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 2 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2). — One of this dimension's main actionable groups (2 warning-level).
Resolve the 2 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2). — One of this dimension's main actionable groups (2 warning-level).
No action in Static Analysis (SAST) — all 6 REDACTED finding(s) are reported here at file:line but scored by D36 (supply-chain provenance), so none is charged to this dimension. — One of this dimension's main actionable groups (6 issue-level, 0 of them charged here).
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.
No known-vulnerable dependencies in the 2 ecosystem(s) that were scanned (npm,osv). Partial dependency scan: 2 of 3 declared ecosystem(s) were scanned (npm,osv), and the findings above are real and complete for them. nuget was not scanned (nuget: the solution did not restore on the analyzer's .NET SDK (an SDK/target-framework/restore mismatch, common for an older codebase), so there was no restored dependency graph to scan), so this is not the whole dependency surface and the result is reported at reduced confidence.
Resolve the 42 Medium IaC finding(s) in IaC & Container Security — start with REDACTED (41), REDACTED. — One of this dimension's main actionable groups (42 warning-level).
Resolve the 3 High IaC finding(s) in IaC & Container Security — start with REDACTED (2), REDACTED. — One of this dimension's main actionable groups (3 issue-level).
Resolve the 5 Low IaC finding(s) in IaC & Container Security — start with REDACTED (5). — One of this dimension's main actionable groups (5 recommendation-level).
Detailed fixes: d31_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.
7 of 301 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is ODbDump/DataLeakExtension.cs. Counted over 301 of the 587 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
Orphaned file · ×7ODbDump/DataLeakExtension.cs:1
Orphaned files with no living knowledge
✓ On the Gold path — maintain.
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 9 Change coupling finding(s) in Change Coupling — start with DictionaryFieldHandler.cs (2), BTreeImpl12.cs, DictionaryTypeDescriptor.cs. — One of this dimension's main actionable groups (9 warning-level).
Resolve the 2 Change-coupling hub finding(s) in Change Coupling — start with ByteArrayTypeDescriptor.cs, ContainerImpl.cs. — One of this dimension's main actionable groups (2 warning-level).
Detailed fixes: d35_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether Kubernetes workloads restrict network EGRESS with a NetworkPolicy (or Cilium policy), limiting where a compromised pod can send data or reach a command-and-control server. Presence of committed egress-restricting policy, not runtime enforcement.
Method: Deterministic YAML-manifest inspection (no external tool, no Roslyn — language-agnostic): Kubernetes workloads gate applicability; credits a NetworkPolicy / Cilium policy that restricts egress (policyTypes: [Egress] / egress rules). Reward-leaning (neutral floor climbing to 10, never a deduction — baseline misconfigs stay with D31). Deterministic.
What it measures: Whether Kubernetes workloads confine the kernel boundary — a seccomp profile (RuntimeDefault/Localhost) plus an AppArmor/SELinux mandatory-access-control layer — shrinking the syscall attack surface a container escape would use. Presence of committed confinement config, not runtime enforcement.
Method: Deterministic YAML-manifest inspection (no external tool, no Roslyn): on Kubernetes workloads, credits a seccomp profile (RuntimeDefault/Localhost) and an AppArmor/SELinux MAC layer. Reward-leaning (neutral floor climbing to 10); NotApplicable without workloads. Deterministic.
0/2 workload(s) run every container under a seccomp profile; 0/2 declare an AppArmor/SELinux profile.
No seccomp profile · ×2REDACTED:28
What to do
Resolve the 2 No seccomp profile finding(s) in Kernel & Syscall Confinement — start with REDACTED (2). — One of this dimension's main actionable groups (2 recommendation-level).
Detailed fixes: d41_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 32 platform declaration(s) and 0 dependency declaration(s). This dimension reads what the repository says about ITSELF — a pinned target framework, a version file, a capped requires-python, a Rust toolchain pin, a framework major a constraint cannot move off. A FLOOR is deliberately never charged: `requires-python = ">=3.8"` states what the package SUPPORTS, not what it runs on, and a well-maintained library declares exactly that while running its own CI on a current release. The end-of-life facts are FROZEN and dated, so this dimension needs no network and answers identically inside a closed scan fence; as the table ages it loses recall and never precision, because a statement about support that ended in the past cannot become false. The OS layer of a container image is D31's question and the toolchain a CI workflow installs is D29's; this row is neither.
Other · Architecture — Whether any singleton service captures a scoped/transient dependency — a silent lifetime/threading bug.
Method: Roslyn scan: DI registrations parsed from AddSingleton/Scoped/Transient; each singleton checked for captured shorter-lifetime dependencies. Exhaustive, deterministic.
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.
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.
Other · Architecture — Whether singleton services avoid mutable shared instance state that concurrent callers would race on.
Method: Roslyn scan: singleton field mutations unguarded by lock or Interlocked, per type; syntax-based guard detection. Deterministic, traceable per field.
`ServiceProviderIntegration` is a singleton (one shared instance) but mutates instance state outside any lock (_rootContainer, _rootServiceProvider, _exportFactories, _exports; e.g. `_rootContainer` at line 48). — BTDB/IOC/ServiceProviderIntegration.cs:10
`ContainerImpl` is a singleton (one shared instance) but mutates instance state outside any lock (_scopedInstancesLock; e.g. `_scopedInstancesLock` at line 908). — BTDB/IOC/ContainerImpl.cs:21
`ReplicationPresence` is a singleton (one shared instance) but mutates instance state outside any lock (_members; e.g. `_members` at line 262). — BTDB.Replication/ReplicationPresence.cs:33
`LeaseSessionController` is a singleton (one shared instance) but mutates instance state outside any lock (_requestTimeout, _confirmationDuration; e.g. `_requestTimeout` at line 72). — BTDB.Replication/LeaseSessionController.cs:13
`ReplicationNodeCoordinator` is a singleton (one shared instance) but mutates instance state outside any lock (_databases, _canonicalBase, Role, _candidate, _publishers, _remoteMaintenance; e.g. `_databases` at line 175). — BTDB.Replication/ReplicationNodeCoordinator.cs:79
`RefDictionary` is not registered, but the singleton `ContainerImpl` creates it and keeps it in `_scopedInstances`, so one instance outlives every request and is shared by every caller that reaches it — and it mutates instance state outside any lock (_count, _freeList, _buckets, _entries; e.g. `_count` at line 188). — BTDB/Collections/RefDictionary.cs:27
`CReg` is not registered, but the singleton `ContainerImpl` creates it and keeps it in `Registrations`, so one instance outlives every request and is shared by every caller that reaches it — and it mutates instance state outside any lock (Factory, Lifetime, SingletonValue, ScopedId, DefaultRegistration, IsSingletonSafe; e.g. `Factory` at line 21). — BTDB/IOC/CReg.cs:6
`DefaultTypeConverterFactory` keeps one instance of itself in the static `Instance`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (_converters; e.g. `_converters` at line 1335). — BTDB/Serialization/DefaultTypeConverterFactory.cs:13
`SpanByteNoRemoveDictionary` is not registered, but `ReflectionMetadata` creates it and keeps it in the static `NameToMetadata`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (_freeList, _bytes, _bytesUsed, _buckets, _count, _entries; e.g. `_freeList` at line 226). — BTDB/Collections/SpanByteNoRemoveDictionary.cs:20
`CompactorScheduler` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_instance; e.g. `_instance` at line 40). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — BTDB/KVDBLayer/Implementation/CompactorScheduler.cs:8
`ODBDictionaryConfiguration` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_instances; e.g. `_instances` at line 91). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — BTDB/ODBLayer/ODBDictionaryConfiguration.cs:8
`RelationBuilder` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_relationBuilderCache; e.g. `_relationBuilderCache` at line 62). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — BTDB/ODBLayer/RelationBuilder.cs:29
`ReflectionMetadata` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_lock; e.g. `_lock` at line 52). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — BTDB/Serialization/ReflectionMetadata.cs:14
What to do
Keep singletons stateless or back their state with thread-safe types (Concurrent*/Immutable*); otherwise concurrent callers race.
A `static` field is one slot for the whole process, however its type is created: back it with a thread-safe type (ConcurrentDictionary, Interlocked), take a lock around every write, or move it into a registered singleton that does.
Other · Architecture — Whether the project-reference graph is acyclic (cycles block independent build/deploy and signal eroding boundaries).
Method: Project reference cycles via elementary-DFS over real .csproj references, using the engine shared with D5/D7; cyclic versus acyclic. Exhaustive, deterministic.
The namespaces BTDB.BTreeLib ↔ BTDB.KVDBLayer ↔ BTDB.KVDBLayer.BTreeMem ↔ BTDB.StreamLayer depend on each other. The lightest dependency in the cycle is BTDB.StreamLayer → BTDB.KVDBLayer (BTDB.StreamLayer.FileCollectionFileReader → BTDB.KVDBLayer.IFileCollectionFile, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface. — BTDB/StreamLayer/FileCollectionFileReader.cs:5
The namespaces BTDB.EventStoreLayer ↔ BTDB.FieldHandler ↔ BTDB.IOC ↔ BTDB.Interpreter ↔ BTDB.ODBLayer ↔ BTDB.Serialization depend on each other. The lightest dependency in the cycle is BTDB.IOC → BTDB.ODBLayer (BTDB.IOC.DependencyAttribute → BTDB.ODBLayer.NotStoredAttribute, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface. — BTDB/IOC/DependencyAttribute.cs:2
The namespaces BTDB.LSM.Engine ↔ BTDB.LSM.Format depend on each other. The lightest dependency in the cycle is BTDB.LSM.Engine → BTDB.LSM.Format (BTDB.LSM.Engine.LevelComponent → BTDB.LSM.Format.TableReader, 10 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface. — BTDB.LSM/Engine/LevelComponent.cs:3
What to do
Break namespace cycles inside a project by moving the shared type to a namespace both sides can use, or by inverting the back edge behind an interface.
Other · Architecture — Whether the codebase has a recognisable, scale-appropriate structure (a named architectural style, or modular enough for its size) rather than being an ad-hoc ball of mud.
Method: Roslyn plus csproj analysis: architecture style detection (DDD, clean, vertical-slice, CQRS) and structure fitness for repo size. Deterministic.
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.
`ICursor` declares 33 members: `SetNewRoot`, `Invalidate`, `Clone`, `FindExact`, `FindFirst`, `FindLastWithPrefix`, `Find`, `SeekIndex`, `MoveNext`, `MovePrevious`, `CalcIndex`, `IsValid`, `GetKeyLength`, `GetKeyParts`, `GetKey`, `GetKeyMemory`, `GetKeySpan`, `GetKeySpan`, `KeyHasPrefix`, `GetValueLength`, `GetValue`, `WriteValue`, `RefreshNodes`, `Upsert`, `UpdateKeySuffix`, `Erase`, `EraseTo`, `BuildTree`, `ValueReplacer`, `GetKeyAsArray`, `TestTreeCorrectness`, `FastIterate`, `FastIterateNoCursor`. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. Those 33 declarations carry 32 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 32 operations clears the >15 bar on its own, so the row is about responsibilities, not signatures. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — BTDB/BTreeLib/ICursor.cs:8
`IRootNode` declares 23 members: `Reference`, `Dereference`, `ShouldBeDisposed`, `Next`, `CommitUlong`, `TransactionId`, `TrLogFileId`, `TrLogOffset`, `DescriptionForLeaks`, `Snapshot`, `CreateWritableTransaction`, `Commit`, `RevertTo`, `CreateCursor`, `GetCount`, `GetUlong`, `SetUlong`, `GetUlongCount`, `UlongsArray`, `ValuesIterate`, `KeyValueIterate`, `CalcBTreeStats`, `GatherUsedFiles`. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — BTDB/BTreeLib/IRootNode.cs:11
`ITypeDescriptor` declares 24 members: `Name`, `FinishBuildFromType`, `BuildHumanReadableFullName`, `Equals`, `GetPreferredType`, `GetPreferredType`, `AnyOpNeedsCtx`, `GenerateLoad`, `Skip`, `GenerateSave`, `GenerateNewDescriptor`, `GenerateLoad`, `GenerateSkip`, `GenerateSave`, `BuildNewDescriptorGenerator`, `NestedType`, `MapNestedTypes`, `CloneAndMapNestedTypes`, `Sealed`, `StoredInline`, `LoadNeedsHelpWithConversion`, `ClearMappingToType`, `ContainsField`, `Fields`. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. Those 24 declarations carry 21 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 21 operations clears the >15 bar on its own, so the row is about responsibilities, not signatures. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — BTDB/EventStoreLayer/ITypeDescriptor.cs:14
`IFieldHandler` declares 16 members under just 13 distinct name(s): `Name`, `Configuration`, `IsCompatibleWith`, `HandledType`, `NeedsCtx`, `Load`, `Skip`, `Save`, `Load`, `Skip`, `Save`, `FreeContent`, `DoesNeedFreeContent`, `SpecializeLoadForType`, `SpecializeSaveForType`, `DoesPreferLoadAsMemory`. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. That is an OVERLOAD SET, not 16 separate responsibilities: a caller binds to 13 operation(s) and uses the overload it selected, so the Interface-Segregation harm does NOT apply on the caller's side and splitting this into role-interfaces would scatter one operation without relieving anything. The burden that does remain is the IMPLEMENTER's — all 16 signatures must be written and kept in step. Reduce it by collapsing overloads (optional or default parameters, or an options object) rather than by segregating the interface. — BTDB/FieldHandler/IFieldHandler.cs:13
`IILGen` declares 25 members under just 11 distinct name(s): `DefineLabel`, `DeclareLocal`, `Comment`, `Mark`, `Ldftn`, `Ldstr`, `Try`, `Catch`, `Finally`, `EndTry`, `Emit`, `Emit`, `Emit`, `Emit`, `Emit`, `Emit`, `Emit`, `Emit`, `Emit`, `Emit`, `Emit`, `Emit`, `Emit`, `Emit`, `Emit`. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. That is an OVERLOAD SET, not 25 separate responsibilities: a caller binds to 11 operation(s) and uses the overload it selected, so the Interface-Segregation harm does NOT apply on the caller's side and splitting this into role-interfaces would scatter one operation without relieving anything. The burden that does remain is the IMPLEMENTER's — all 25 signatures must be written and kept in step. Reduce it by collapsing overloads (optional or default parameters, or an options object) rather than by segregating the interface. — BTDB/IL/IILGen.cs:7
`IKeyValueDB` declares 17 members: `DurableTransactions`, `StartTransaction`, `StartReadOnlyTransaction`, `StartWritingTransaction`, `StartWritingTransaction`, `FinishTransactionBatchAfterCurrentTransaction`, `CalcStats`, `GetNativeMemoryStats`, `Compact`, `CreateKvi`, `PreserveHistoryUpToCommitUlong`, `Logger`, `CompactorRamLimitInMb`, `MaxTrLogFileSize`, `Transactions`, `CompactorReadBytesPerSecondLimit`, `CompactorWriteBytesPerSecondLimit`. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. Those 17 declarations carry 16 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 16 operations clears the >15 bar on its own, so the row is about responsibilities, not signatures. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — BTDB/KVDBLayer/Interface/IKeyValueDB.cs:8
`IKeyValueDBCursor` declares 26 members: `Transaction`, `FindFirstKey`, `FindLastKey`, `FindPreviousKey`, `FindNextKey`, `Find`, `GetKeyIndex`, `FindKeyIndex`, `FindKeyIndex`, `KeyHasPrefix`, `Invalidate`, `IsValid`, `GetStorageSizeOfCurrentKey`, `GetKeyMemory`, `GetKeySpan`, `GetKeySpan`, `IsValueCorrupted`, `GetValueMemory`, `GetValueSpan`, `SetValue`, `EraseCurrent`, `EraseUpTo`, `CreateOrUpdateKeyValue`, `UpdateKeySuffix`, `FastIterate`, `FastIterateNoCursor`. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. Those 26 declarations carry 24 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 24 operations clears the >15 bar on its own, so the row is about responsibilities, not signatures. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — BTDB/KVDBLayer/Interface/IKeyValueDBCursor.cs:16
`IKeyValueDBTransaction` declares 20 members: `Owner`, `CreatedTime`, `DescriptionForLeaks`, `CreateCursor`, `GetKeyValueCount`, `IsWriting`, `IsReadOnly`, `IsDisposed`, `GetCommitUlong`, `SetCommitUlong`, `GetUlongCount`, `GetUlong`, `SetUlong`, `NextCommitTemporaryCloseTransactionLog`, `Commit`, `GetTransactionNumber`, `RollbackAdvised`, `CalcBTreeStats`, `FirstCursor`, `LastCursor`. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — BTDB/KVDBLayer/Interface/IKeyValueDBTransaction.cs:6
`IObjectDB` declares 26 members: `Open`, `Open`, `StartTransaction`, `StartReadOnlyTransaction`, `StartWritingTransaction`, `StartWritingTransaction`, `FinishTransactionBatchAfterCurrentTransaction`, `RunLeakDetection`, `CollectLeakRemovalCandidates`, `RunLeakRemovalAsync`, `RegisterType`, `RegisterType`, `RegisterTypeAlias`, `GetPolymorphicTypes`, `TypeByName`, `TypeConvertorGenerator`, `TypeConverterFactory`, `FieldHandlerFactory`, `ActualOptions`, `Logger`, `GetSymmetricCipher`, `InitializeRelations`, `TryInitializeRelationsWithoutWriting`, `RegisterCustomRelation`, `AllowAutoRegistrationOfRelations`, `AutoRegisterTypes`. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. Those 26 declarations carry 23 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 23 operations clears the >15 bar on its own, so the row is about responsibilities, not signatures. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — BTDB/ODBLayer/IObjectDB.cs:12
`IObjectDBTransaction` declares 29 members: `Owner`, `KeyValueDBTransaction`, `SkipUnknownTypes`, `Enumerate`, `Enumerate`, `Get`, `GetOid`, `GetStorageSize`, `EnumerateSingletonTypes`, `Singleton`, `Singleton`, `New`, `New`, `Store`, `StoreAndFlush`, `Delete`, `Delete`, `DeleteAll`, `DeleteAll`, `DeleteAllData`, `GetCommitUlong`, `SetCommitUlong`, `NextCommitTemporaryCloseTransactionLog`, `Commit`, `RollbackAdvised`, `InitRelation`, `EnumerateRelationTypes`, `GetRelation`, `GetRelation`. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. Those 29 declarations carry 23 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 23 operations clears the >15 bar on its own, so the row is about responsibilities, not signatures. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — BTDB/ODBLayer/IObjectDBTransaction.cs:7
`IODBVisitor` declares 37 members: `VisitSingleton`, `StartObject`, `StartField`, `NeedScalarAsObject`, `ScalarAsObject`, `NeedScalarAsText`, `ScalarAsText`, `OidReference`, `StartInlineObject`, `EndInlineObject`, `StartList`, `StartItem`, `EndItem`, `EndList`, `StartDictionary`, `StartDictKey`, `EndDictKey`, `StartDictValue`, `EndDictValue`, `EndDictionary`, `StartSet`, `StartSetKey`, `EndSetKey`, `EndSet`, `EndField`, `EndObject`, `StartRelation`, `StartRelationKey`, `EndRelationKey`, `StartRelationValue`, `EndRelationValue`, `EndRelation`, `InlineBackRef`, `InlineRef`, `StartSecondaryIndex`, `NextSecondaryKey`, `EndSecondaryIndex`. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — BTDB/ODBLayer/IODBVisitor.cs:10
What to do
Split fat interfaces into focused role-interfaces so clients depend only on what they use.
Where the width is an overload set rather than separate responsibilities, collapse the overloads instead — segregating those relieves no caller.
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.
Do you agree with this assessment?
C1 · Data Protection3.5 / 10Weak✓ Tool-verified
Other · Security — Whether sensitive data is encrypted at rest and in transit and keys are vaulted.
Method: Roslyn plus filesystem scan: encryption presence (EF ColumnEncryption, key-vault references, HTTPS enforcement) and key-derivation KDF detection. Deterministic.
What to do
Strengthen data-at-rest protection: vault your keys (Azure Key Vault / AWS KMS / IDataProtector key ring) and encrypt the most sensitive columns (EF HasConversion encryption or provider-native column encryption) — partial coverage still leaves gaps.
Enforce HTTPS (UseHttpsRedirection / RequireHttpsMetadata) so data in transit is always encrypted.
Other · Security — Whether access is authorized by default — a framework authorization attribute/decorator or policy, or imperative guard methods (throw-on-violation) called from handlers.
Method: Roslyn scan: [Authorize] usage and authorization policies, plus imperative throw-on-violation guard methods detected via syntax. Deterministic.
No [Authorize]/policies and no imperative guard methods (throw-on-violation) were found — endpoints may be unprotected.
`MapPost("/submit")` serves requests and nothing authorizes it: no [Authorize] or RequireAuthorization on it or its controller/group, no fallback policy, no auth-gate middleware and no imperative guard in this codebase. — BTDB.Replication.Http/HttpEventLogPeerTransport.cs:63
`MapPost("/bounds")` serves requests and nothing authorizes it: no [Authorize] or RequireAuthorization on it or its controller/group, no fallback policy, no auth-gate middleware and no imperative guard in this codebase. — BTDB.Replication.Http/HttpEventLogPeerTransport.cs:69
`MapPost("/subscribe")` serves requests and nothing authorizes it: no [Authorize] or RequireAuthorization on it or its controller/group, no fallback policy, no auth-gate middleware and no imperative guard in this codebase. — BTDB.Replication.Http/HttpEventLogPeerTransport.cs:75
`MapPost(Path)` serves requests and nothing authorizes it: no [Authorize] or RequireAuthorization on it or its controller/group, no fallback policy, no auth-gate middleware and no imperative guard in this codebase. — BTDB.Replication.Http/HttpReplicationPeerTransport.cs:44
`LeaseSessionController.ProposeTransfer` serves requests and nothing authorizes it: no [Authorize] or RequireAuthorization on it or its controller/group, no fallback policy, no auth-gate middleware and no imperative guard in this codebase. — BTDB.Replication/LeaseSessionController.cs:24
`LeaseSessionController.TransferAsync` serves requests and nothing authorizes it: no [Authorize] or RequireAuthorization on it or its controller/group, no fallback policy, no auth-gate middleware and no imperative guard in this codebase. — BTDB.Replication/LeaseSessionController.cs:29
`LeaseSessionController.Disqualify` serves requests and nothing authorizes it: no [Authorize] or RequireAuthorization on it or its controller/group, no fallback policy, no auth-gate middleware and no imperative guard in this codebase. — BTDB.Replication/LeaseSessionController.cs:42
`LeaseSessionController.RunAsync` serves requests and nothing authorizes it: no [Authorize] or RequireAuthorization on it or its controller/group, no fallback policy, no auth-gate middleware and no imperative guard in this codebase. — BTDB.Replication/LeaseSessionController.cs:64
`LeaseSessionController.MaintainAsync` serves requests and nothing authorizes it: no [Authorize] or RequireAuthorization on it or its controller/group, no fallback policy, no auth-gate middleware and no imperative guard in this codebase. — BTDB.Replication/LeaseSessionController.cs:116
`LeaseSessionController.Close` serves requests and nothing authorizes it: no [Authorize] or RequireAuthorization on it or its controller/group, no fallback policy, no auth-gate middleware and no imperative guard in this codebase. — BTDB.Replication/LeaseSessionController.cs:176
`MapGet("/ctl/info")` serves requests and nothing authorizes it: no [Authorize] or RequireAuthorization on it or its controller/group, no fallback policy, no auth-gate middleware and no imperative guard in this codebase. — EventLogBench/Program.cs:75
`MapGet("/ctl/clock")` serves requests and nothing authorizes it: no [Authorize] or RequireAuthorization on it or its controller/group, no fallback policy, no auth-gate middleware and no imperative guard in this codebase. — EventLogBench/Program.cs:76
`MapPost("/ctl/prepare")` serves requests and nothing authorizes it: no [Authorize] or RequireAuthorization on it or its controller/group, no fallback policy, no auth-gate middleware and no imperative guard in this codebase. — EventLogBench/Program.cs:77
`MapPost("/ctl/start")` serves requests and nothing authorizes it: no [Authorize] or RequireAuthorization on it or its controller/group, no fallback policy, no auth-gate middleware and no imperative guard in this codebase. — EventLogBench/Program.cs:89
`MapGet("/ctl/status")` serves requests and nothing authorizes it: no [Authorize] or RequireAuthorization on it or its controller/group, no fallback policy, no auth-gate middleware and no imperative guard in this codebase. — EventLogBench/Program.cs:95
`MapGet("/ctl/storage")` serves requests and nothing authorizes it: no [Authorize] or RequireAuthorization on it or its controller/group, no fallback policy, no auth-gate middleware and no imperative guard in this codebase. — EventLogBench/Program.cs:96
`MapGet("/ctl/report")` serves requests and nothing authorizes it: no [Authorize] or RequireAuthorization on it or its controller/group, no fallback policy, no auth-gate middleware and no imperative guard in this codebase. — EventLogBench/Program.cs:97
`MapPost("/ctl/cleanup")` serves requests and nothing authorizes it: no [Authorize] or RequireAuthorization on it or its controller/group, no fallback policy, no auth-gate middleware and no imperative guard in this codebase. — EventLogBench/Program.cs:98
What to do
Protect endpoints by default-deny: [Authorize] + role/policy authorization, or imperative guard methods (throw-on-violation) called from every handler.
Do you agree with this assessment?
C4 · Data Retention7.5 / 10Strong✓ Tool-verified
Other · Security — Whether data has a defined lifetime — retention periods, TTLs, cleanup jobs (storage limitation).
Method: Roslyn scan: retention/TTL configuration presence in schema; CascadeDelete detected but not scored as retention control. Deterministic, gated by PII presence.
A retention mechanism is present, but the data-lifecycle is not yet complete — missing: a scheduled purge / cleanup job (PurgeOlderThan / CleanupJob).
What to do
Complete the data-lifecycle story: an expiry limit (a declared maximum age for the stored data — a retention-age setting, or a store-level TTL where your storage offers one), a scheduled purge/cleanup job that enforces it, and a documented retention period covering the personal data.
Other · Code Health — Unreviewed-generation residue: shipped members still throwing NotImplementedException, and placeholder string literals left in non-test, non-generated code. Scored as a quality signature, never as a claim about authorship.
Method: Roslyn syntax scan: NotImplementedException throws and placeholder string literals in non-test, non-generated shipped code. Deterministic, code-shape signature.
A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface. (×4) — BTDB/ODBLayer/Constraint.cs:247, BTDB/ODBLayer/Constraint.cs:252, BTDB/ODBLayer/Constraint.cs:257, …
What to do
Finish or delete NotImplementedException stubs and replace placeholder literals before shipping.
Other · Code Health — Unfinished work detected by code SHAPE, not keywords: members that only throw a "not implemented" exception, methods that take inputs and return a constant, async methods that never await, dead `if (false)` / `#if false` branches, and skeleton types most of whose members are holes. A real, objective slice of technical debt.
Method: Roslyn syntax scan: incompleteness by code shape (constant-returning methods, async-never-await, #if false branches, guards that return what the code already falls through to, tests an earlier guard already decided, comparisons against NaN, skeleton types), not keyword-gated. Deterministic, code-shape heuristic.
`ScheduleDeletionAsync` is a shipped member whose body only throws — and it is REACHED: BTDB.Replication/RemoteMaintenance.cs:60 references it. This is not dead surface that can be deleted — anything taking that path throws at runtime. Implement the member, or remove the code that reaches it. — BTDB.Replication/IReplicationStorage.cs:39
`CancelDeletionAsync` is a shipped member whose body only throws — and it is REACHED: BTDB.Replication/RemoteMaintenance.cs:55 references it. This is not dead surface that can be deleted — anything taking that path throws at runtime. Implement the member, or remove the code that reaches it. — BTDB.Replication/IReplicationStorage.cs:41
The local `full` hands out its `.Task`, and nothing in its scope ever calls `SetResult`/`TrySetResult`/`SetException`/`SetCanceled` on it or passes it on to anything that could — every caller that awaits the task waits for ever. Complete it where the awaited event happens, or return the real operation's task. — BTDB.Replication/EventLog/EventLogOwnerLane.cs:401
The branch `if (GetFileType(fileId) != KVFileType.TransactionLog)` throws `InvalidOperationException` while the member's other paths do the work — the branch was never written, so every input that reaches it fails at run time. Implement the branch, or reject the input where it enters with an exception that says it is not supported. — BTDB.Replication/ReplicationFileSet.Collection.cs:204
The first 4 statements of the `if` and of the `else` are identical, so they run on both paths regardless of the condition. Lift them above the `if` — leaving them duplicated inside makes the branches read as though they handled this differently. — BTDB.SourceGenerator/Main.cs:4929
The first 3 statements of the `if` and of the `else` are identical, so they run on both paths regardless of the condition. Lift them above the `if` — leaving them duplicated inside makes the branches read as though they handled this differently. (×3) — BTDB/BTreeLib/BTreeImpl12.cs:2327, BTDB/SnappyCompression/SnappyCompress.cs:124, BTDB/StreamLayer/MemWriter.cs:948
The branch `if (keySize != 20)` throws `NotSupportedException` while the member's other paths do the work — the branch was never written, so every input that reaches it fails at run time. Implement the branch, or reject the input where it enters with an exception that says it is not supported. — BTDB/ChunkCache/DiskChunkCache.cs:72
`ShouldTryToCompress` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in. — BTDB/EventStoreLayer/NoCompressionStrategy.cs:8
`Compress` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in. — BTDB/EventStoreLayer/NoCompressionStrategy.cs:13
`ObservedMetadata` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in. — BTDB/EventStoreLayer/SkippingEventObserver.cs:5
The first 2 statements of the `if` and of the `else` are identical, so they run on both paths regardless of the condition. Lift them above the `if` — leaving them duplicated inside makes the branches read as though they handled this differently. — REDACTED:135
`GetHashCode` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in. — BTDB/IL/Caching/CachingILDynamicType.cs:460
`ConstraintNotImplemented` has 4 unfinished members out of 4 declared members (methods, properties, indexers and events, whether or not each carries a body) — a scaffolded type that was never implemented. — BTDB/ODBLayer/Constraint.cs:245
`IsSimpleExact` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — BTDB/ODBLayer/Constraint.cs:247
`Prepare` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — BTDB/ODBLayer/Constraint.cs:252
`WritePrefix` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — BTDB/ODBLayer/Constraint.cs:257
`Match` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — BTDB/ODBLayer/Constraint.cs:262
The branch `if (!RelationQueryTypes.TryGetStorage(constant.Type, out var storage, out var valueType, out _))` throws `NotSupportedException` while the member's other paths do the work — the branch was never written, so every input that reaches it fails at run time. Implement the branch, or reject the input where it enters with an exception that says it is not supported. — BTDB/ODBLayer/RelationQuery.cs:3067
`OnError` throws an exception whose message says it isn't finished — a not-implemented stub wearing an ordinary exception. Implement it or remove it. — BTDB/Reactive/AnonymousObserver.cs:26
A placeholder e-mail address ("user025@example.com") is still in shipped code — its domain is reserved for documentation, so anything sent here is undeliverable by construction. Replace it with the real address, or take it from configuration. (×2) — AotQuerySmoke/Program.cs:202, AotQuerySmoke/Program.cs:203
`SetCurrentPosition`'s body only throws NotSupportedException — sometimes a deliberate contract, often an unfinished stub. Confirm it's intentional. (×4) — BTDB.AzureStorage/AzureBlobFileCollection.cs:808, BTDB.AzureStorage/AzureBlobFileCollection.cs:892, BTDB.AzureStorage/AzureBlobFileCollection.cs:1114, …
`Read`'s body only throws NotSupportedException — sometimes a deliberate contract, often an unfinished stub. Confirm it's intentional. — BTDB.Replication.Azure/AzureReplicationStorage.cs:587
A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers). — BTDB.SourceGenerator.Sample/Examples.cs:19
`ThrowNotSupportedException`'s body only throws NotSupportedException — sometimes a deliberate contract, often an unfinished stub. Confirm it's intentional. — BTDB/Collections/HashHelpers.cs:49
`CalcEncryptedSizeFor`'s body only throws NotSupportedException — sometimes a deliberate contract, often an unfinished stub. Confirm it's intentional. — BTDB/Encrypted/InvalidSymmetricCipher.cs:7
`Encrypt`'s body only throws NotSupportedException — sometimes a deliberate contract, often an unfinished stub. Confirm it's intentional. — BTDB/Encrypted/InvalidSymmetricCipher.cs:12
`CalcPlainSizeFor`'s body only throws NotSupportedException — sometimes a deliberate contract, often an unfinished stub. Confirm it's intentional. — BTDB/Encrypted/InvalidSymmetricCipher.cs:17
`Decrypt`'s body only throws NotSupportedException — sometimes a deliberate contract, often an unfinished stub. Confirm it's intentional. — BTDB/Encrypted/InvalidSymmetricCipher.cs:22
`CalcOrderedEncryptedSizeFor`'s body only throws NotSupportedException — sometimes a deliberate contract, often an unfinished stub. Confirm it's intentional. — BTDB/Encrypted/InvalidSymmetricCipher.cs:27
`OrderedEncrypt`'s body only throws NotSupportedException — sometimes a deliberate contract, often an unfinished stub. Confirm it's intentional. — BTDB/Encrypted/InvalidSymmetricCipher.cs:32
`CalcOrderedPlainSizeFor`'s body only throws NotSupportedException — sometimes a deliberate contract, often an unfinished stub. Confirm it's intentional. — BTDB/Encrypted/InvalidSymmetricCipher.cs:37
`OrderedDecrypt`'s body only throws NotSupportedException — sometimes a deliberate contract, often an unfinished stub. Confirm it's intentional. — BTDB/Encrypted/InvalidSymmetricCipher.cs:42
`GetAdvancedEnumerator`'s body only throws NotSupportedException — sometimes a deliberate contract, often an unfinished stub. Confirm it's intentional. — BTDB/EventStoreLayer/OrderedDictionaryWithDescriptor.cs:14
`GetDecreasingEnumerator`'s body only throws NotSupportedException — sometimes a deliberate contract, often an unfinished stub. Confirm it's intentional. — BTDB/EventStoreLayer/OrderedDictionaryWithDescriptor.cs:17
What to do
Finish or delete the unfinished stubs (NotImplementedException / empty / constant-returning bodies) — they are dead surface that looks live.
Clear the softer debt: remove commented-out code and dead branches, re-enable or delete skipped tests, and replace blanket warning suppressions with targeted ones.
Maturity · Maturity — Whether the repository and its projects have a README, and whether it is substantive.
Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.
Maturity · Maturity — Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.
Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.
No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
What to do
Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
Maturity · Maturity — Whether the repository is organised deliberately: production code and tests are set apart in a way its ecosystem or the repository itself declares.
Method: Filesystem scan: src/test folder separation and namespace-prefix consistency (majority RootNamespace agreement). Exhaustive across projects, deterministic.
Maturity · Maturity — Whether the project's current-state documentation describes the code that exists.
Method: Every current-state document's checkable claims looked up in the tree (links, versions, and artefact counts an order of magnitude off), plus two README checks: an advertised infrastructure product with no footprint, and a module the CHANGELOG records as removed. Deterministic, no model. Advisory.
Doc/SourceGenerator.md names .NET 9, but the projects target .NET 10. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — Doc/SourceGenerator.md:196
What to do
Reconcile the README with reality: Doc/SourceGenerator.md names .NET 9, but the projects target .NET 10.
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 & versioning8.6 / 10Strong✓ Tool-verified
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.
1 public type in `BTDB.IL` is marked as implementation by its own namespace, folder or name: `ILDynamicMethodWithThisImpl` (BTDB/IL/ILDynamicMethodWithThisImpl.cs:7, name ends in `Impl`). While it is public, every consumer of the library can bind to it, so changing it is a breaking change for those consumers. — BTDB/IL/ILDynamicMethodWithThisImpl.cs:7
1 public type in `BTDB.IOC` is marked as implementation by its own namespace, folder or name: `ContainerImpl` (BTDB/IOC/ContainerImpl.cs:21, name ends in `Impl`). While it is public, every consumer of the library can bind to it, so changing it is a breaking change for those consumers. — BTDB/IOC/ContainerImpl.cs:21
31 public types in `BTDB.KVDBLayer` are marked as implementation by their own namespace, folder or name: `BTreeKeyValueDB` (BTDB/KVDBLayer/Implementation/BTreeKeyValueDB.cs:19, `Implementation`), `BTreeKeyValueDBCursor` (BTDB/KVDBLayer/Implementation/BTreeKeyValueDBCursor.cs:12, `Implementation`), `BTreeKeyValueDBTransaction` (BTDB/KVDBLayer/Implementation/BTreeKeyValueDBTransaction.cs:10, `Implementation`), `CompactorScheduler` (BTDB/KVDBLayer/Implementation/CompactorScheduler.cs:8, `Implementation`), `DefaultCompressionKviStrategy` (BTDB/KVDBLayer/Implementation/DefaultCompressionKviStrategy.cs:7, `Implementation`), `FileCollectionWithFileInfos` (BTDB/KVDBLayer/Implementation/FileCollectionWithFileInfos.cs:11, `Implementation`), `FileKeyIndex` (BTDB/KVDBLayer/Implementation/FileKeyIndex.cs:8, `Implementation`), `ICompactorScheduler` (BTDB/KVDBLayer/Implementation/ICompactorScheduler.cs:7, `Implementation`), and 23 more. While they are public, every consumer of the library can bind to them, so changing them is a breaking change for those consumers. — BTDB/KVDBLayer/Implementation/BTreeKeyValueDB.cs:19
1 public type in `BTDB.KVDBLayer.Implementation` is marked as implementation by its own namespace, folder or name: `BytesPerSecondLimiter` (BTDB/KVDBLayer/Implementation/BytesPerSecondLimiter.cs:7, `Implementation`). While it is public, every consumer of the library can bind to it, so changing it is a breaking change for those consumers. — BTDB/KVDBLayer/Implementation/BytesPerSecondLimiter.cs:7
`BTDB.BackendActions.ActionEnqueued` (BTDB.BackendActions/Events.cs:6) is public, and the library's own code uses it, but no other project in this repository uses it (read: `AotActionsSmoke`, `BTDB.BackendActions.Process.Test`, `BTDB.BackendActions.Test`, `BTDB.SourceGenerator.Tests`, `DBBenchmark`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such. — BTDB.BackendActions/Events.cs:6
`BTDB.BackendActions.ActionCancelRequested` (BTDB.BackendActions/Events.cs:19) is public, and the library's own code uses it, but no other project in this repository uses it (read: `AotActionsSmoke`, `BTDB.BackendActions.Process.Test`, `BTDB.BackendActions.Test`, `BTDB.SourceGenerator.Tests`, `DBBenchmark`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such. — BTDB.BackendActions/Events.cs:19
`BTDB.BackendActions.ActionsSuspended` (BTDB.BackendActions/Events.cs:93) is public, and the library's own code uses it, but no other project in this repository uses it (read: `AotActionsSmoke`, `BTDB.BackendActions.Process.Test`, `BTDB.BackendActions.Test`, `BTDB.SourceGenerator.Tests`, `DBBenchmark`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such. — BTDB.BackendActions/Events.cs:93
`BTDB.BackendActions.ActionsImported` (BTDB.BackendActions/Import.cs:28) is public, and the library's own code uses it, but no other project in this repository uses it (read: `AotActionsSmoke`, `BTDB.BackendActions.Process.Test`, `BTDB.BackendActions.Test`, `BTDB.SourceGenerator.Tests`, `DBBenchmark`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such. — BTDB.BackendActions/Import.cs:28
`BTDB.BackendActions.IBackendActionsStates` (BTDB.BackendActions/Storage.cs:146) is public, and the library's own code uses it, but no other project in this repository uses it (read: `AotActionsSmoke`, `BTDB.BackendActions.Process.Test`, `BTDB.BackendActions.Test`, `BTDB.SourceGenerator.Tests`, `DBBenchmark`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such. — BTDB.BackendActions/Storage.cs:146
`BTDB.SourceGenerator.EquatableArray` (BTDB.SourceGenerator/EquatableArray.cs:132) is public, and the library's own code uses it, but no other project in this repository uses it (read: `BTDB.SourceGenerator.Tests`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such. — BTDB.SourceGenerator/EquatableArray.cs:132
`BTDB.EventStoreLayer.AppendingEventStore` (BTDB/EventStoreLayer/AppendingEventStore.cs:8) is public, and the library's own code uses it, but no other project in this repository uses it (read: `AotActionsSmoke`, `AotQuerySmoke`, `BTDB.AzureStorage`, `BTDB.AzureStorage.Test`, `BTDB.BackendActions`, `BTDB.BackendActions.Process.Test`, `BTDB.BackendActions.Test`, `BTDB.LSM`, `BTDB.LSM.Azure`, `BTDB.LSM.Azure.Test`, `BTDB.LSM.Process.Test`, `BTDB.LSM.Test`, `BTDB.Replication`, `BTDB.Replication.Azure`, `BTDB.Replication.Azure.Test`, `BTDB.Replication.EventSourcing`, `BTDB.Replication.EventSourcing.Test`, `BTDB.Replication.Http`, `BTDB.Replication.Http.Test`, `BTDB.Replication.Process.Test`, `BTDB.Replication.Test`, `BTDB.SourceGenerator.Sample`, `BTDB.SourceGenerator.Tests`, `BTDBTest`, `DBBenchmark`, `EventLogBench`, `ODbDump`, `Sample3rdPartyLib`, `SimpleTester`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such. — BTDB/EventStoreLayer/AppendingEventStore.cs:8
`BTDB.EventStoreLayer.ByteArrayTypeDescriptor` (BTDB/EventStoreLayer/ByteArrayTypeDescriptor.cs:13) is public, and the library's own code uses it, but no other project in this repository uses it (read: `AotActionsSmoke`, `AotQuerySmoke`, `BTDB.AzureStorage`, `BTDB.AzureStorage.Test`, `BTDB.BackendActions`, `BTDB.BackendActions.Process.Test`, `BTDB.BackendActions.Test`, `BTDB.LSM`, `BTDB.LSM.Azure`, `BTDB.LSM.Azure.Test`, `BTDB.LSM.Process.Test`, `BTDB.LSM.Test`, `BTDB.Replication`, `BTDB.Replication.Azure`, `BTDB.Replication.Azure.Test`, `BTDB.Replication.EventSourcing`, `BTDB.Replication.EventSourcing.Test`, `BTDB.Replication.Http`, `BTDB.Replication.Http.Test`, `BTDB.Replication.Process.Test`, `BTDB.Replication.Test`, `BTDB.SourceGenerator.Sample`, `BTDB.SourceGenerator.Tests`, `BTDBTest`, `DBBenchmark`, `EventLogBench`, `ODbDump`, `Sample3rdPartyLib`, `SimpleTester`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such. — BTDB/EventStoreLayer/ByteArrayTypeDescriptor.cs:13
`BTDB.EventStoreLayer.EncryptedStringDescriptor` (BTDB/EventStoreLayer/EncryptedStringDescriptor.cs:13) is public, and the library's own code uses it, but no other project in this repository uses it (read: `AotActionsSmoke`, `AotQuerySmoke`, `BTDB.AzureStorage`, `BTDB.AzureStorage.Test`, `BTDB.BackendActions`, `BTDB.BackendActions.Process.Test`, `BTDB.BackendActions.Test`, `BTDB.LSM`, `BTDB.LSM.Azure`, `BTDB.LSM.Azure.Test`, `BTDB.LSM.Process.Test`, `BTDB.LSM.Test`, `BTDB.Replication`, `BTDB.Replication.Azure`, `BTDB.Replication.Azure.Test`, `BTDB.Replication.EventSourcing`, `BTDB.Replication.EventSourcing.Test`, `BTDB.Replication.Http`, `BTDB.Replication.Http.Test`, `BTDB.Replication.Process.Test`, `BTDB.Replication.Test`, `BTDB.SourceGenerator.Sample`, `BTDB.SourceGenerator.Tests`, `BTDBTest`, `DBBenchmark`, `EventLogBench`, `ODbDump`, `Sample3rdPartyLib`, `SimpleTester`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such. — BTDB/EventStoreLayer/EncryptedStringDescriptor.cs:13
`BTDB.EventStoreLayer.ITypeSerializerMappingFactory` (BTDB/EventStoreLayer/ITypeSerializerMappingFactory.cs:3) is public, and the library's own code uses it, but no other project in this repository uses it (read: `AotActionsSmoke`, `AotQuerySmoke`, `BTDB.AzureStorage`, `BTDB.AzureStorage.Test`, `BTDB.BackendActions`, `BTDB.BackendActions.Process.Test`, `BTDB.BackendActions.Test`, `BTDB.LSM`, `BTDB.LSM.Azure`, `BTDB.LSM.Azure.Test`, `BTDB.LSM.Process.Test`, `BTDB.LSM.Test`, `BTDB.Replication`, `BTDB.Replication.Azure`, `BTDB.Replication.Azure.Test`, `BTDB.Replication.EventSourcing`, `BTDB.Replication.EventSourcing.Test`, `BTDB.Replication.Http`, `BTDB.Replication.Http.Test`, `BTDB.Replication.Process.Test`, `BTDB.Replication.Test`, `BTDB.SourceGenerator.Sample`, `BTDB.SourceGenerator.Tests`, `BTDBTest`, `DBBenchmark`, `EventLogBench`, `ODbDump`, `Sample3rdPartyLib`, `SimpleTester`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such. — BTDB/EventStoreLayer/ITypeSerializerMappingFactory.cs:3
`BTDB.EventStoreLayer.SimpleTypeDescriptor` (BTDB/EventStoreLayer/SimpleTypeDescriptor.cs:12) is public, and the library's own code uses it, but no other project in this repository uses it (read: `AotActionsSmoke`, `AotQuerySmoke`, `BTDB.AzureStorage`, `BTDB.AzureStorage.Test`, `BTDB.BackendActions`, `BTDB.BackendActions.Process.Test`, `BTDB.BackendActions.Test`, `BTDB.LSM`, `BTDB.LSM.Azure`, `BTDB.LSM.Azure.Test`, `BTDB.LSM.Process.Test`, `BTDB.LSM.Test`, `BTDB.Replication`, `BTDB.Replication.Azure`, `BTDB.Replication.Azure.Test`, `BTDB.Replication.EventSourcing`, `BTDB.Replication.EventSourcing.Test`, `BTDB.Replication.Http`, `BTDB.Replication.Http.Test`, `BTDB.Replication.Process.Test`, `BTDB.Replication.Test`, `BTDB.SourceGenerator.Sample`, `BTDB.SourceGenerator.Tests`, `BTDBTest`, `DBBenchmark`, `EventLogBench`, `ODbDump`, `Sample3rdPartyLib`, `SimpleTester`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such. — BTDB/EventStoreLayer/SimpleTypeDescriptor.cs:12
`BTDB.EventStoreLayer.SnappyCompressionStrategy` (BTDB/EventStoreLayer/SnappyCompressionStrategy.cs:6) is public, and the library's own code uses it, but no other project in this repository uses it (read: `AotActionsSmoke`, `AotQuerySmoke`, `BTDB.AzureStorage`, `BTDB.AzureStorage.Test`, `BTDB.BackendActions`, `BTDB.BackendActions.Process.Test`, `BTDB.BackendActions.Test`, `BTDB.LSM`, `BTDB.LSM.Azure`, `BTDB.LSM.Azure.Test`, `BTDB.LSM.Process.Test`, `BTDB.LSM.Test`, `BTDB.Replication`, `BTDB.Replication.Azure`, `BTDB.Replication.Azure.Test`, `BTDB.Replication.EventSourcing`, `BTDB.Replication.EventSourcing.Test`, `BTDB.Replication.Http`, `BTDB.Replication.Http.Test`, `BTDB.Replication.Process.Test`, `BTDB.Replication.Test`, `BTDB.SourceGenerator.Sample`, `BTDB.SourceGenerator.Tests`, `BTDBTest`, `DBBenchmark`, `EventLogBench`, `ODbDump`, `Sample3rdPartyLib`, `SimpleTester`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such. — BTDB/EventStoreLayer/SnappyCompressionStrategy.cs:6
`BTDB.FieldHandler.ByteArrayLastFieldHandler` (BTDB/FieldHandler/ByteArrayLastFieldHandler.cs:10) is public, and the library's own code uses it, but no other project in this repository uses it (read: `AotActionsSmoke`, `AotQuerySmoke`, `BTDB.AzureStorage`, `BTDB.AzureStorage.Test`, `BTDB.BackendActions`, `BTDB.BackendActions.Process.Test`, `BTDB.BackendActions.Test`, `BTDB.LSM`, `BTDB.LSM.Azure`, `BTDB.LSM.Azure.Test`, `BTDB.LSM.Process.Test`, `BTDB.LSM.Test`, `BTDB.Replication`, `BTDB.Replication.Azure`, `BTDB.Replication.Azure.Test`, `BTDB.Replication.EventSourcing`, `BTDB.Replication.EventSourcing.Test`, `BTDB.Replication.Http`, `BTDB.Replication.Http.Test`, `BTDB.Replication.Process.Test`, `BTDB.Replication.Test`, `BTDB.SourceGenerator.Sample`, `BTDB.SourceGenerator.Tests`, `BTDBTest`, `DBBenchmark`, `EventLogBench`, `ODbDump`, `Sample3rdPartyLib`, `SimpleTester`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such. — BTDB/FieldHandler/ByteArrayLastFieldHandler.cs:10
`BTDB.FieldHandler.DBObjectFieldHandler` (BTDB/FieldHandler/DBObjectFieldHandler.cs:14) is public, and the library's own code uses it, but no other project in this repository uses it (read: `AotActionsSmoke`, `AotQuerySmoke`, `BTDB.AzureStorage`, `BTDB.AzureStorage.Test`, `BTDB.BackendActions`, `BTDB.BackendActions.Process.Test`, `BTDB.BackendActions.Test`, `BTDB.LSM`, `BTDB.LSM.Azure`, `BTDB.LSM.Azure.Test`, `BTDB.LSM.Process.Test`, `BTDB.LSM.Test`, `BTDB.Replication`, `BTDB.Replication.Azure`, `BTDB.Replication.Azure.Test`, `BTDB.Replication.EventSourcing`, `BTDB.Replication.EventSourcing.Test`, `BTDB.Replication.Http`, `BTDB.Replication.Http.Test`, `BTDB.Replication.Process.Test`, `BTDB.Replication.Test`, `BTDB.SourceGenerator.Sample`, `BTDB.SourceGenerator.Tests`, `BTDBTest`, `DBBenchmark`, `EventLogBench`, `ODbDump`, `Sample3rdPartyLib`, `SimpleTester`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such. — BTDB/FieldHandler/DBObjectFieldHandler.cs:14
`BTDB.FieldHandler.DictionaryFieldHandler` (BTDB/FieldHandler/DictionaryFieldHandler.cs:13) is public, and the library's own code uses it, but no other project in this repository uses it (read: `AotActionsSmoke`, `AotQuerySmoke`, `BTDB.AzureStorage`, `BTDB.AzureStorage.Test`, `BTDB.BackendActions`, `BTDB.BackendActions.Process.Test`, `BTDB.BackendActions.Test`, `BTDB.LSM`, `BTDB.LSM.Azure`, `BTDB.LSM.Azure.Test`, `BTDB.LSM.Process.Test`, `BTDB.LSM.Test`, `BTDB.Replication`, `BTDB.Replication.Azure`, `BTDB.Replication.Azure.Test`, `BTDB.Replication.EventSourcing`, `BTDB.Replication.EventSourcing.Test`, `BTDB.Replication.Http`, `BTDB.Replication.Http.Test`, `BTDB.Replication.Process.Test`, `BTDB.Replication.Test`, `BTDB.SourceGenerator.Sample`, `BTDB.SourceGenerator.Tests`, `BTDBTest`, `DBBenchmark`, `EventLogBench`, `ODbDump`, `Sample3rdPartyLib`, `SimpleTester`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such. — BTDB/FieldHandler/DictionaryFieldHandler.cs:13
`BTDB.FieldHandler.EncryptedStringHandler` (BTDB/FieldHandler/EncryptedStringHandler.cs:11) is public, and the library's own code uses it, but no other project in this repository uses it (read: `AotActionsSmoke`, `AotQuerySmoke`, `BTDB.AzureStorage`, `BTDB.AzureStorage.Test`, `BTDB.BackendActions`, `BTDB.BackendActions.Process.Test`, `BTDB.BackendActions.Test`, `BTDB.LSM`, `BTDB.LSM.Azure`, `BTDB.LSM.Azure.Test`, `BTDB.LSM.Process.Test`, `BTDB.LSM.Test`, `BTDB.Replication`, `BTDB.Replication.Azure`, `BTDB.Replication.Azure.Test`, `BTDB.Replication.EventSourcing`, `BTDB.Replication.EventSourcing.Test`, `BTDB.Replication.Http`, `BTDB.Replication.Http.Test`, `BTDB.Replication.Process.Test`, `BTDB.Replication.Test`, `BTDB.SourceGenerator.Sample`, `BTDB.SourceGenerator.Tests`, `BTDBTest`, `DBBenchmark`, `EventLogBench`, `ODbDump`, `Sample3rdPartyLib`, `SimpleTester`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such. — BTDB/FieldHandler/EncryptedStringHandler.cs:11
`BTDB.FieldHandler.ListFieldHandler` (BTDB/FieldHandler/ListFieldHandler.cs:14) is public, and the library's own code uses it, but no other project in this repository uses it (read: `AotActionsSmoke`, `AotQuerySmoke`, `BTDB.AzureStorage`, `BTDB.AzureStorage.Test`, `BTDB.BackendActions`, `BTDB.BackendActions.Process.Test`, `BTDB.BackendActions.Test`, `BTDB.LSM`, `BTDB.LSM.Azure`, `BTDB.LSM.Azure.Test`, `BTDB.LSM.Process.Test`, `BTDB.LSM.Test`, `BTDB.Replication`, `BTDB.Replication.Azure`, `BTDB.Replication.Azure.Test`, `BTDB.Replication.EventSourcing`, `BTDB.Replication.EventSourcing.Test`, `BTDB.Replication.Http`, `BTDB.Replication.Http.Test`, `BTDB.Replication.Process.Test`, `BTDB.Replication.Test`, `BTDB.SourceGenerator.Sample`, `BTDB.SourceGenerator.Tests`, `BTDBTest`, `DBBenchmark`, `EventLogBench`, `ODbDump`, `Sample3rdPartyLib`, `SimpleTester`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such. — BTDB/FieldHandler/ListFieldHandler.cs:14
`BTDB.FieldHandler.ListFieldOrderedHandler` (BTDB/FieldHandler/ListFieldOrderedHandler.cs:13) is public, and the library's own code uses it, but no other project in this repository uses it (read: `AotActionsSmoke`, `AotQuerySmoke`, `BTDB.AzureStorage`, `BTDB.AzureStorage.Test`, `BTDB.BackendActions`, `BTDB.BackendActions.Process.Test`, `BTDB.BackendActions.Test`, `BTDB.LSM`, `BTDB.LSM.Azure`, `BTDB.LSM.Azure.Test`, `BTDB.LSM.Process.Test`, `BTDB.LSM.Test`, `BTDB.Replication`, `BTDB.Replication.Azure`, `BTDB.Replication.Azure.Test`, `BTDB.Replication.EventSourcing`, `BTDB.Replication.EventSourcing.Test`, `BTDB.Replication.Http`, `BTDB.Replication.Http.Test`, `BTDB.Replication.Process.Test`, `BTDB.Replication.Test`, `BTDB.SourceGenerator.Sample`, `BTDB.SourceGenerator.Tests`, `BTDBTest`, `DBBenchmark`, `EventLogBench`, `ODbDump`, `Sample3rdPartyLib`, `SimpleTester`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such. — BTDB/FieldHandler/ListFieldOrderedHandler.cs:13
`BTDB.FieldHandler.NullableFieldHandler` (BTDB/FieldHandler/NullableFieldHandler.cs:11) is public, and the library's own code uses it, but no other project in this repository uses it (read: `AotActionsSmoke`, `AotQuerySmoke`, `BTDB.AzureStorage`, `BTDB.AzureStorage.Test`, `BTDB.BackendActions`, `BTDB.BackendActions.Process.Test`, `BTDB.BackendActions.Test`, `BTDB.LSM`, `BTDB.LSM.Azure`, `BTDB.LSM.Azure.Test`, `BTDB.LSM.Process.Test`, `BTDB.LSM.Test`, `BTDB.Replication`, `BTDB.Replication.Azure`, `BTDB.Replication.Azure.Test`, `BTDB.Replication.EventSourcing`, `BTDB.Replication.EventSourcing.Test`, `BTDB.Replication.Http`, `BTDB.Replication.Http.Test`, `BTDB.Replication.Process.Test`, `BTDB.Replication.Test`, `BTDB.SourceGenerator.Sample`, `BTDB.SourceGenerator.Tests`, `BTDBTest`, `DBBenchmark`, `EventLogBench`, `ODbDump`, `Sample3rdPartyLib`, `SimpleTester`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such. — BTDB/FieldHandler/NullableFieldHandler.cs:11
`BTDB.FieldHandler.OrderedEncryptedStringHandler` (BTDB/FieldHandler/OrderedEncryptedStringHandler.cs:11) is public, and the library's own code uses it, but no other project in this repository uses it (read: `AotActionsSmoke`, `AotQuerySmoke`, `BTDB.AzureStorage`, `BTDB.AzureStorage.Test`, `BTDB.BackendActions`, `BTDB.BackendActions.Process.Test`, `BTDB.BackendActions.Test`, `BTDB.LSM`, `BTDB.LSM.Azure`, `BTDB.LSM.Azure.Test`, `BTDB.LSM.Process.Test`, `BTDB.LSM.Test`, `BTDB.Replication`, `BTDB.Replication.Azure`, `BTDB.Replication.Azure.Test`, `BTDB.Replication.EventSourcing`, `BTDB.Replication.EventSourcing.Test`, `BTDB.Replication.Http`, `BTDB.Replication.Http.Test`, `BTDB.Replication.Process.Test`, `BTDB.Replication.Test`, `BTDB.SourceGenerator.Sample`, `BTDB.SourceGenerator.Tests`, `BTDBTest`, `DBBenchmark`, `EventLogBench`, `ODbDump`, `Sample3rdPartyLib`, `SimpleTester`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such. — BTDB/FieldHandler/OrderedEncryptedStringHandler.cs:11
`BTDB.FieldHandler.SignedFieldHandler` (BTDB/FieldHandler/SignedFieldHandler.cs:7) is public, and the library's own code uses it, but no other project in this repository uses it (read: `AotActionsSmoke`, `AotQuerySmoke`, `BTDB.AzureStorage`, `BTDB.AzureStorage.Test`, `BTDB.BackendActions`, `BTDB.BackendActions.Process.Test`, `BTDB.BackendActions.Test`, `BTDB.LSM`, `BTDB.LSM.Azure`, `BTDB.LSM.Azure.Test`, `BTDB.LSM.Process.Test`, `BTDB.LSM.Test`, `BTDB.Replication`, `BTDB.Replication.Azure`, `BTDB.Replication.Azure.Test`, `BTDB.Replication.EventSourcing`, `BTDB.Replication.EventSourcing.Test`, `BTDB.Replication.Http`, `BTDB.Replication.Http.Test`, `BTDB.Replication.Process.Test`, `BTDB.Replication.Test`, `BTDB.SourceGenerator.Sample`, `BTDB.SourceGenerator.Tests`, `BTDBTest`, `DBBenchmark`, `EventLogBench`, `ODbDump`, `Sample3rdPartyLib`, `SimpleTester`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such. — BTDB/FieldHandler/SignedFieldHandler.cs:7
`BTDB.FieldHandler.SimpleFieldHandlerJustOrderableBase` (BTDB/FieldHandler/SimpleFieldHandlerJustOrderableBase.cs:6) is public, and the library's own code uses it, but no other project in this repository uses it (read: `AotActionsSmoke`, `AotQuerySmoke`, `BTDB.AzureStorage`, `BTDB.AzureStorage.Test`, `BTDB.BackendActions`, `BTDB.BackendActions.Process.Test`, `BTDB.BackendActions.Test`, `BTDB.LSM`, `BTDB.LSM.Azure`, `BTDB.LSM.Azure.Test`, `BTDB.LSM.Process.Test`, `BTDB.LSM.Test`, `BTDB.Replication`, `BTDB.Replication.Azure`, `BTDB.Replication.Azure.Test`, `BTDB.Replication.EventSourcing`, `BTDB.Replication.EventSourcing.Test`, `BTDB.Replication.Http`, `BTDB.Replication.Http.Test`, `BTDB.Replication.Process.Test`, `BTDB.Replication.Test`, `BTDB.SourceGenerator.Sample`, `BTDB.SourceGenerator.Tests`, `BTDBTest`, `DBBenchmark`, `EventLogBench`, `ODbDump`, `Sample3rdPartyLib`, `SimpleTester`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such. — BTDB/FieldHandler/SimpleFieldHandlerJustOrderableBase.cs:6
`BTDB.FieldHandler.TupleFieldHandler` (BTDB/FieldHandler/TupleFieldHandler.cs:14) is public, and the library's own code uses it, but no other project in this repository uses it (read: `AotActionsSmoke`, `AotQuerySmoke`, `BTDB.AzureStorage`, `BTDB.AzureStorage.Test`, `BTDB.BackendActions`, `BTDB.BackendActions.Process.Test`, `BTDB.BackendActions.Test`, `BTDB.LSM`, `BTDB.LSM.Azure`, `BTDB.LSM.Azure.Test`, `BTDB.LSM.Process.Test`, `BTDB.LSM.Test`, `BTDB.Replication`, `BTDB.Replication.Azure`, `BTDB.Replication.Azure.Test`, `BTDB.Replication.EventSourcing`, `BTDB.Replication.EventSourcing.Test`, `BTDB.Replication.Http`, `BTDB.Replication.Http.Test`, `BTDB.Replication.Process.Test`, `BTDB.Replication.Test`, `BTDB.SourceGenerator.Sample`, `BTDB.SourceGenerator.Tests`, `BTDBTest`, `DBBenchmark`, `EventLogBench`, `ODbDump`, `Sample3rdPartyLib`, `SimpleTester`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such. — BTDB/FieldHandler/TupleFieldHandler.cs:14
`BTDB.FieldHandler.UnsignedFieldHandler` (BTDB/FieldHandler/UnsignedFieldHandler.cs:7) is public, and the library's own code uses it, but no other project in this repository uses it (read: `AotActionsSmoke`, `AotQuerySmoke`, `BTDB.AzureStorage`, `BTDB.AzureStorage.Test`, `BTDB.BackendActions`, `BTDB.BackendActions.Process.Test`, `BTDB.BackendActions.Test`, `BTDB.LSM`, `BTDB.LSM.Azure`, `BTDB.LSM.Azure.Test`, `BTDB.LSM.Process.Test`, `BTDB.LSM.Test`, `BTDB.Replication`, `BTDB.Replication.Azure`, `BTDB.Replication.Azure.Test`, `BTDB.Replication.EventSourcing`, `BTDB.Replication.EventSourcing.Test`, `BTDB.Replication.Http`, `BTDB.Replication.Http.Test`, `BTDB.Replication.Process.Test`, `BTDB.Replication.Test`, `BTDB.SourceGenerator.Sample`, `BTDB.SourceGenerator.Tests`, `BTDBTest`, `DBBenchmark`, `EventLogBench`, `ODbDump`, `Sample3rdPartyLib`, `SimpleTester`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such. — BTDB/FieldHandler/UnsignedFieldHandler.cs:7
`BTDB.IOC.ResolvingCtx` (BTDB/IOC/ContainerImpl.cs:1078) is public, and the library's own code uses it, but no other project in this repository uses it (read: `AotActionsSmoke`, `AotQuerySmoke`, `BTDB.AzureStorage`, `BTDB.AzureStorage.Test`, `BTDB.BackendActions`, `BTDB.BackendActions.Process.Test`, `BTDB.BackendActions.Test`, `BTDB.LSM`, `BTDB.LSM.Azure`, `BTDB.LSM.Azure.Test`, `BTDB.LSM.Process.Test`, `BTDB.LSM.Test`, `BTDB.Replication`, `BTDB.Replication.Azure`, `BTDB.Replication.Azure.Test`, `BTDB.Replication.EventSourcing`, `BTDB.Replication.EventSourcing.Test`, `BTDB.Replication.Http`, `BTDB.Replication.Http.Test`, `BTDB.Replication.Process.Test`, `BTDB.Replication.Test`, `BTDB.SourceGenerator.Sample`, `BTDB.SourceGenerator.Tests`, `BTDBTest`, `DBBenchmark`, `EventLogBench`, `ODbDump`, `Sample3rdPartyLib`, `SimpleTester`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such. — BTDB/IOC/ContainerImpl.cs:1078
`BTDB.IOC.CreateFactoryCtx` (BTDB/IOC/CreateFactoryCtx.cs:8) is public, and the library's own code uses it, but no other project in this repository uses it (read: `AotActionsSmoke`, `AotQuerySmoke`, `BTDB.AzureStorage`, `BTDB.AzureStorage.Test`, `BTDB.BackendActions`, `BTDB.BackendActions.Process.Test`, `BTDB.BackendActions.Test`, `BTDB.LSM`, `BTDB.LSM.Azure`, `BTDB.LSM.Azure.Test`, `BTDB.LSM.Process.Test`, `BTDB.LSM.Test`, `BTDB.Replication`, `BTDB.Replication.Azure`, `BTDB.Replication.Azure.Test`, `BTDB.Replication.EventSourcing`, `BTDB.Replication.EventSourcing.Test`, `BTDB.Replication.Http`, `BTDB.Replication.Http.Test`, `BTDB.Replication.Process.Test`, `BTDB.Replication.Test`, `BTDB.SourceGenerator.Sample`, `BTDB.SourceGenerator.Tests`, `BTDBTest`, `DBBenchmark`, `EventLogBench`, `ODbDump`, `Sample3rdPartyLib`, `SimpleTester`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such. — BTDB/IOC/CreateFactoryCtx.cs:8
`BTDB.ODBLayer.ConstraintListStringAny` (BTDB/ODBLayer/Constraint.cs:174) is public, and the library's own code uses it, but no other project in this repository uses it (read: `AotActionsSmoke`, `AotQuerySmoke`, `BTDB.AzureStorage`, `BTDB.AzureStorage.Test`, `BTDB.BackendActions`, `BTDB.BackendActions.Process.Test`, `BTDB.BackendActions.Test`, `BTDB.LSM`, `BTDB.LSM.Azure`, `BTDB.LSM.Azure.Test`, `BTDB.LSM.Process.Test`, `BTDB.LSM.Test`, `BTDB.Replication`, `BTDB.Replication.Azure`, `BTDB.Replication.Azure.Test`, `BTDB.Replication.EventSourcing`, `BTDB.Replication.EventSourcing.Test`, `BTDB.Replication.Http`, `BTDB.Replication.Http.Test`, `BTDB.Replication.Process.Test`, `BTDB.Replication.Test`, `BTDB.SourceGenerator.Sample`, `BTDB.SourceGenerator.Tests`, `BTDBTest`, `DBBenchmark`, `EventLogBench`, `ODbDump`, `Sample3rdPartyLib`, `SimpleTester`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such. — BTDB/ODBLayer/Constraint.cs:174
`BTDB.ODBLayer.ConstraintListUlongAny` (BTDB/ODBLayer/Constraint.cs:188) is public, and the library's own code uses it, but no other project in this repository uses it (read: `AotActionsSmoke`, `AotQuerySmoke`, `BTDB.AzureStorage`, `BTDB.AzureStorage.Test`, `BTDB.BackendActions`, `BTDB.BackendActions.Process.Test`, `BTDB.BackendActions.Test`, `BTDB.LSM`, `BTDB.LSM.Azure`, `BTDB.LSM.Azure.Test`, `BTDB.LSM.Process.Test`, `BTDB.LSM.Test`, `BTDB.Replication`, `BTDB.Replication.Azure`, `BTDB.Replication.Azure.Test`, `BTDB.Replication.EventSourcing`, `BTDB.Replication.EventSourcing.Test`, `BTDB.Replication.Http`, `BTDB.Replication.Http.Test`, `BTDB.Replication.Process.Test`, `BTDB.Replication.Test`, `BTDB.SourceGenerator.Sample`, `BTDB.SourceGenerator.Tests`, `BTDBTest`, `DBBenchmark`, `EventLogBench`, `ODbDump`, `Sample3rdPartyLib`, `SimpleTester`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such. — BTDB/ODBLayer/Constraint.cs:188
`BTDB.ODBLayer.ConstraintNullableAny` (BTDB/ODBLayer/Constraint.cs:202) is public, and the library's own code uses it, but no other project in this repository uses it (read: `AotActionsSmoke`, `AotQuerySmoke`, `BTDB.AzureStorage`, `BTDB.AzureStorage.Test`, `BTDB.BackendActions`, `BTDB.BackendActions.Process.Test`, `BTDB.BackendActions.Test`, `BTDB.LSM`, `BTDB.LSM.Azure`, `BTDB.LSM.Azure.Test`, `BTDB.LSM.Process.Test`, `BTDB.LSM.Test`, `BTDB.Replication`, `BTDB.Replication.Azure`, `BTDB.Replication.Azure.Test`, `BTDB.Replication.EventSourcing`, `BTDB.Replication.EventSourcing.Test`, `BTDB.Replication.Http`, `BTDB.Replication.Http.Test`, `BTDB.Replication.Process.Test`, `BTDB.Replication.Test`, `BTDB.SourceGenerator.Sample`, `BTDB.SourceGenerator.Tests`, `BTDBTest`, `DBBenchmark`, `EventLogBench`, `ODbDump`, `Sample3rdPartyLib`, `SimpleTester`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such. — BTDB/ODBLayer/Constraint.cs:202
`BTDB.ODBLayer.ConstraintNotImplemented` (BTDB/ODBLayer/Constraint.cs:245) is public, and the library's own code uses it, but no other project in this repository uses it (read: `AotActionsSmoke`, `AotQuerySmoke`, `BTDB.AzureStorage`, `BTDB.AzureStorage.Test`, `BTDB.BackendActions`, `BTDB.BackendActions.Process.Test`, `BTDB.BackendActions.Test`, `BTDB.LSM`, `BTDB.LSM.Azure`, `BTDB.LSM.Azure.Test`, `BTDB.LSM.Process.Test`, `BTDB.LSM.Test`, `BTDB.Replication`, `BTDB.Replication.Azure`, `BTDB.Replication.Azure.Test`, `BTDB.Replication.EventSourcing`, `BTDB.Replication.EventSourcing.Test`, `BTDB.Replication.Http`, `BTDB.Replication.Http.Test`, `BTDB.Replication.Process.Test`, `BTDB.Replication.Test`, `BTDB.SourceGenerator.Sample`, `BTDB.SourceGenerator.Tests`, `BTDBTest`, `DBBenchmark`, `EventLogBench`, `ODbDump`, `Sample3rdPartyLib`, `SimpleTester`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such. — BTDB/ODBLayer/Constraint.cs:245
`BTDB.ODBLayer.ConstraintListUlongStartsWith` (BTDB/ODBLayer/Constraint.cs:613) is public, and the library's own code uses it, but no other project in this repository uses it (read: `AotActionsSmoke`, `AotQuerySmoke`, `BTDB.AzureStorage`, `BTDB.AzureStorage.Test`, `BTDB.BackendActions`, `BTDB.BackendActions.Process.Test`, `BTDB.BackendActions.Test`, `BTDB.LSM`, `BTDB.LSM.Azure`, `BTDB.LSM.Azure.Test`, `BTDB.LSM.Process.Test`, `BTDB.LSM.Test`, `BTDB.Replication`, `BTDB.Replication.Azure`, `BTDB.Replication.Azure.Test`, `BTDB.Replication.EventSourcing`, `BTDB.Replication.EventSourcing.Test`, `BTDB.Replication.Http`, `BTDB.Replication.Http.Test`, `BTDB.Replication.Process.Test`, `BTDB.Replication.Test`, `BTDB.SourceGenerator.Sample`, `BTDB.SourceGenerator.Tests`, `BTDBTest`, `DBBenchmark`, `EventLogBench`, `ODbDump`, `Sample3rdPartyLib`, `SimpleTester`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such. — BTDB/ODBLayer/Constraint.cs:613
`BTDB.ODBLayer.ConstraintListStringContains` (BTDB/ODBLayer/Constraint.cs:673) is public, and the library's own code uses it, but no other project in this repository uses it (read: `AotActionsSmoke`, `AotQuerySmoke`, `BTDB.AzureStorage`, `BTDB.AzureStorage.Test`, `BTDB.BackendActions`, `BTDB.BackendActions.Process.Test`, `BTDB.BackendActions.Test`, `BTDB.LSM`, `BTDB.LSM.Azure`, `BTDB.LSM.Azure.Test`, `BTDB.LSM.Process.Test`, `BTDB.LSM.Test`, `BTDB.Replication`, `BTDB.Replication.Azure`, `BTDB.Replication.Azure.Test`, `BTDB.Replication.EventSourcing`, `BTDB.Replication.EventSourcing.Test`, `BTDB.Replication.Http`, `BTDB.Replication.Http.Test`, `BTDB.Replication.Process.Test`, `BTDB.Replication.Test`, `BTDB.SourceGenerator.Sample`, `BTDB.SourceGenerator.Tests`, `BTDBTest`, `DBBenchmark`, `EventLogBench`, `ODbDump`, `Sample3rdPartyLib`, `SimpleTester`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such. — BTDB/ODBLayer/Constraint.cs:673
`BTDB.ODBLayer.ConstraintDateTimeRange` (BTDB/ODBLayer/Constraint.cs:718) is public, and the library's own code uses it, but no other project in this repository uses it (read: `AotActionsSmoke`, `AotQuerySmoke`, `BTDB.AzureStorage`, `BTDB.AzureStorage.Test`, `BTDB.BackendActions`, `BTDB.BackendActions.Process.Test`, `BTDB.BackendActions.Test`, `BTDB.LSM`, `BTDB.LSM.Azure`, `BTDB.LSM.Azure.Test`, `BTDB.LSM.Process.Test`, `BTDB.LSM.Test`, `BTDB.Replication`, `BTDB.Replication.Azure`, `BTDB.Replication.Azure.Test`, `BTDB.Replication.EventSourcing`, `BTDB.Replication.EventSourcing.Test`, `BTDB.Replication.Http`, `BTDB.Replication.Http.Test`, `BTDB.Replication.Process.Test`, `BTDB.Replication.Test`, `BTDB.SourceGenerator.Sample`, `BTDB.SourceGenerator.Tests`, `BTDBTest`, `DBBenchmark`, `EventLogBench`, `ODbDump`, `Sample3rdPartyLib`, `SimpleTester`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such. — BTDB/ODBLayer/Constraint.cs:718
`BTDB.ODBLayer.NullableExactValue` (BTDB/ODBLayer/Constraint.cs:751) is public, and the library's own code uses it, but no other project in this repository uses it (read: `AotActionsSmoke`, `AotQuerySmoke`, `BTDB.AzureStorage`, `BTDB.AzureStorage.Test`, `BTDB.BackendActions`, `BTDB.BackendActions.Process.Test`, `BTDB.BackendActions.Test`, `BTDB.LSM`, `BTDB.LSM.Azure`, `BTDB.LSM.Azure.Test`, `BTDB.LSM.Process.Test`, `BTDB.LSM.Test`, `BTDB.Replication`, `BTDB.Replication.Azure`, `BTDB.Replication.Azure.Test`, `BTDB.Replication.EventSourcing`, `BTDB.Replication.EventSourcing.Test`, `BTDB.Replication.Http`, `BTDB.Replication.Http.Test`, `BTDB.Replication.Process.Test`, `BTDB.Replication.Test`, `BTDB.SourceGenerator.Sample`, `BTDB.SourceGenerator.Tests`, `BTDBTest`, `DBBenchmark`, `EventLogBench`, `ODbDump`, `Sample3rdPartyLib`, `SimpleTester`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such. — BTDB/ODBLayer/Constraint.cs:751
`BTDB.ODBLayer.NullableExactNull` (BTDB/ODBLayer/Constraint.cs:795) is public, and the library's own code uses it, but no other project in this repository uses it (read: `AotActionsSmoke`, `AotQuerySmoke`, `BTDB.AzureStorage`, `BTDB.AzureStorage.Test`, `BTDB.BackendActions`, `BTDB.BackendActions.Process.Test`, `BTDB.BackendActions.Test`, `BTDB.LSM`, `BTDB.LSM.Azure`, `BTDB.LSM.Azure.Test`, `BTDB.LSM.Process.Test`, `BTDB.LSM.Test`, `BTDB.Replication`, `BTDB.Replication.Azure`, `BTDB.Replication.Azure.Test`, `BTDB.Replication.EventSourcing`, `BTDB.Replication.EventSourcing.Test`, `BTDB.Replication.Http`, `BTDB.Replication.Http.Test`, `BTDB.Replication.Process.Test`, `BTDB.Replication.Test`, `BTDB.SourceGenerator.Sample`, `BTDB.SourceGenerator.Tests`, `BTDBTest`, `DBBenchmark`, `EventLogBench`, `ODbDump`, `Sample3rdPartyLib`, `SimpleTester`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such. — BTDB/ODBLayer/Constraint.cs:795
`BTDB.ODBLayer.FirstConstraint` (BTDB/ODBLayer/Constraint.cs:839) is public, and the library's own code uses it, but no other project in this repository uses it (read: `AotActionsSmoke`, `AotQuerySmoke`, `BTDB.AzureStorage`, `BTDB.AzureStorage.Test`, `BTDB.BackendActions`, `BTDB.BackendActions.Process.Test`, `BTDB.BackendActions.Test`, `BTDB.LSM`, `BTDB.LSM.Azure`, `BTDB.LSM.Azure.Test`, `BTDB.LSM.Process.Test`, `BTDB.LSM.Test`, `BTDB.Replication`, `BTDB.Replication.Azure`, `BTDB.Replication.Azure.Test`, `BTDB.Replication.EventSourcing`, `BTDB.Replication.EventSourcing.Test`, `BTDB.Replication.Http`, `BTDB.Replication.Http.Test`, `BTDB.Replication.Process.Test`, `BTDB.Replication.Test`, `BTDB.SourceGenerator.Sample`, `BTDB.SourceGenerator.Tests`, `BTDBTest`, `DBBenchmark`, `EventLogBench`, `ODbDump`, `Sample3rdPartyLib`, `SimpleTester`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such. — BTDB/ODBLayer/Constraint.cs:839
What to do
Hide `BTDB.IL` (`ILDynamicMethodWithThisImpl`) (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): its own namespace, folder or name already says it is implementation, and hidden it can change without breaking a consumer.
Hide `BTDB.IOC` (`ContainerImpl`) (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): its own namespace, folder or name already says it is implementation, and hidden it can change without breaking a consumer.
Hide `BTDB.KVDBLayer` (`BTreeKeyValueDB`, `BTreeKeyValueDBCursor`, `BTreeKeyValueDBTransaction`, `CompactorScheduler`, `DefaultCompressionKviStrategy`, `FileCollectionWithFileInfos`, `FileKeyIndex`, `ICompactorScheduler`, and 23 more) (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): its own namespace, folder or name already says it is implementation, and hidden it can change without breaking a consumer.
Hide `BTDB.KVDBLayer.Implementation` (`BytesPerSecondLimiter`) (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): its own namespace, folder or name already says it is implementation, and hidden it can change without breaking a consumer.
Make `BTDB.BackendActions.ActionEnqueued` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `BTDB.BackendActions.ActionCancelRequested` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `BTDB.BackendActions.ActionsSuspended` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `BTDB.BackendActions.ActionsImported` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `BTDB.BackendActions.IBackendActionsStates` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `BTDB.SourceGenerator.EquatableArray` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `BTDB.EventStoreLayer.AppendingEventStore` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `BTDB.EventStoreLayer.ByteArrayTypeDescriptor` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `BTDB.EventStoreLayer.EncryptedStringDescriptor` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `BTDB.EventStoreLayer.ITypeSerializerMappingFactory` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `BTDB.EventStoreLayer.SimpleTypeDescriptor` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `BTDB.EventStoreLayer.SnappyCompressionStrategy` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `BTDB.FieldHandler.ByteArrayLastFieldHandler` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `BTDB.FieldHandler.DBObjectFieldHandler` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `BTDB.FieldHandler.DictionaryFieldHandler` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `BTDB.FieldHandler.EncryptedStringHandler` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `BTDB.FieldHandler.ListFieldHandler` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `BTDB.FieldHandler.ListFieldOrderedHandler` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `BTDB.FieldHandler.NullableFieldHandler` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `BTDB.FieldHandler.OrderedEncryptedStringHandler` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `BTDB.FieldHandler.SignedFieldHandler` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `BTDB.FieldHandler.SimpleFieldHandlerJustOrderableBase` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `BTDB.FieldHandler.TupleFieldHandler` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `BTDB.FieldHandler.UnsignedFieldHandler` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `BTDB.IOC.ResolvingCtx` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `BTDB.IOC.CreateFactoryCtx` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `BTDB.ODBLayer.ConstraintListStringAny` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `BTDB.ODBLayer.ConstraintListUlongAny` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `BTDB.ODBLayer.ConstraintNullableAny` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `BTDB.ODBLayer.ConstraintNotImplemented` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `BTDB.ODBLayer.ConstraintListUlongStartsWith` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `BTDB.ODBLayer.ConstraintListStringContains` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `BTDB.ODBLayer.ConstraintDateTimeRange` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `BTDB.ODBLayer.NullableExactValue` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `BTDB.ODBLayer.NullableExactNull` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `BTDB.ODBLayer.FirstConstraint` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `BTDB.ODBLayer.ConstraintStringPredicateSlow` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `BTDB.ODBLayer.ConstraintStringPredicate` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `BTDB.ODBLayer.ConstraintUnsignedPredicate` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `BTDB.ODBLayer.ConstraintSignedPredicate` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `BTDB.ODBLayer.ConstraintDateTimePredicate` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `BTDB.ODBLayer.ConstraintNullableDateTimePredicate` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `BTDB.ODBLayer.ConstraintNullableDateTimeUpTo` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `BTDB.ODBLayer.ConstraintStringExact` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `BTDB.ODBLayer.ConstraintStringUpTo` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `BTDB.ODBLayer.ConstraintDateTimeAny` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `BTDB.ODBLayer.ConstraintGuidAny` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `BTDB.ODBLayer.ConstraintGuidExact` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `BTDB.ODBLayer.ConstraintStringAny` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `BTDB.ODBLayer.ConstraintBoolAny` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `BTDB.ODBLayer.ConstraintStringStartsWith` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `BTDB.ODBLayer.ConstraintUnsignedExact` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `BTDB.ODBLayer.ConstraintUnsignedUpTo` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `BTDB.ODBLayer.ConstraintSignedExact` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `BTDB.ODBLayer.ConstraintSignedUpTo` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `BTDB.ODBLayer.ConstraintDateTimeExact` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `BTDB.ODBLayer.ConstraintDateTimeUpTo` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `BTDB.ODBLayer.ConstraintBoolExact` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `BTDB.ODBLayer.ConstraintSignedEnumExact` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `BTDB.ODBLayer.ConstraintUnsignedEnumExact` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `BTDB.ODBLayer.ConstraintOneByteAny` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `BTDB.ODBLayer.ConstraintUInt8Exact` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `BTDB.ODBLayer.ConstraintInt8Exact` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `BTDB.ODBLayer.ConstraintSignedAny` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `BTDB.ODBLayer.ConstraintUnsignedAny` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `BTDB.ODBLayer.ConstraintSignedEnumPredicate` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `BTDB.ODBLayer.ConstraintUnsignedEnumPredicate` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `BTDB.ODBLayer.DBObjectMetadata` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `BTDB.ODBLayer.DBWriterCtx` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `BTDB.ODBLayer.DefaultODBFieldHandlerFactory` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `BTDB.ODBLayer.ODBDictionaryFieldHandler` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `BTDB.ODBLayer.ODBLazyUlongListFieldHandler` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `BTDB.ODBLayer.ODBRoaringBitmapFieldHandler` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `BTDB.ODBLayer.ODBSetFieldHandler` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `BTDB.ODBLayer.PolymorphicTypesRegistry` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `BTDB.ODBLayer.RelationBuilder` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `BTDB.ODBLayer.RelationAdvancedSecondaryKeyEnumerator` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `BTDB.ODBLayer.RelationAdvancedOrderedSecondaryKeyEnumerator` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `BTDB.ODBLayer.RelationBeforeRemoveWithContainer` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `BTDB.ODBLayer.DBReaderWithFreeInfoCtx` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `BTDB.ODBLayer.RelationQueryInterception` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `BTDB.ODBLayer.UnresolvedTableFieldInfo` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `BTDB.Serialization.BonSerializerCtx` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `BTDB.Serialization.BonDeserializerCtx` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `BTDB.StreamLayer.PosixPlatformMethods` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `BTDB.StreamLayer.WindowsPlatformMethods` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Do you agree with this assessment?
P2 · Observability8.1 / 10Strong✓ Tool-verified
Readiness · Readiness — Whether the code is diagnosable in production — structured logging, tracing/metrics, health checks.
Only 4/11 service-like projects use logging (pure contract/DTO projects are excluded — they have nothing to log). Of those 11, 5 ship a process this repository operates; the rest are libraries their consumer hosts, where the logging decision belongs to the host.
`BTDB.SourceGenerator.Sample/Examples.cs` reports through `Console.Write…` at line 26 although other files in its project log through a logger. Console lines carry no level, category or structured properties and never reach the log pipeline or its exporters. — BTDB.SourceGenerator.Sample/Examples.cs:26
`BTDB.SourceGenerator.Sample/Examples.cs` reports through `Console.Write…` at line 141 although other files in its project log through a logger. Console lines carry no level, category or structured properties and never reach the log pipeline or its exporters. — BTDB.SourceGenerator.Sample/Examples.cs:141
`BTDB.SourceGenerator.Sample/Examples.cs` reports through `Console.Write…` at line 190 although other files in its project log through a logger. Console lines carry no level, category or structured properties and never reach the log pipeline or its exporters. — BTDB.SourceGenerator.Sample/Examples.cs:190
`BTDB.SourceGenerator.Sample/Examples.cs` reports through `Console.Write…` at line 199 although other files in its project log through a logger. Console lines carry no level, category or structured properties and never reach the log pipeline or its exporters. — BTDB.SourceGenerator.Sample/Examples.cs:199
`BTDB.SourceGenerator.Sample/Examples.cs` reports through `Console.Write…` at line 214 although other files in its project log through a logger. Console lines carry no level, category or structured properties and never reach the log pipeline or its exporters. — BTDB.SourceGenerator.Sample/Examples.cs:214
`BTDB.SourceGenerator.Sample/Examples.cs` reports through `Console.Write…` at line 299 although other files in its project log through a logger. Console lines carry no level, category or structured properties and never reach the log pipeline or its exporters. — BTDB.SourceGenerator.Sample/Examples.cs:299
`BTDB.SourceGenerator.Sample/Examples.cs` reports through `Console.Write…` at line 306 although other files in its project log through a logger. Console lines carry no level, category or structured properties and never reach the log pipeline or its exporters. — BTDB.SourceGenerator.Sample/Examples.cs:306
`BTDB.SourceGenerator.Sample/Examples.cs` reports through `Console.Write…` at line 313 although other files in its project log through a logger. Console lines carry no level, category or structured properties and never reach the log pipeline or its exporters. — BTDB.SourceGenerator.Sample/Examples.cs:313
`BTDB.SourceGenerator.Sample/Examples.cs` reports through `Console.Write…` at line 314 although other files in its project log through a logger. Console lines carry no level, category or structured properties and never reach the log pipeline or its exporters. — BTDB.SourceGenerator.Sample/Examples.cs:314
What to do
Extend structured logging across the projects you operate, and give the library ones a diagnostics seam instead — an `EventSource`/`ActivitySource` the host can subscribe to, or an optional logger on your options object — rather than taking a logging dependency on your consumers' behalf.
Replace `Console.Write…` in service code with the project's injected `ILogger<T>` (message templates with named properties), so delivery outcomes and failures reach the log pipeline with a level and a category.
Readiness · Readiness — Whether SAST, secret/dependency scanning and performance benchmarking are wired in (presence, not runtime).
Method: Filesystem scan: SAST configuration, dependency-update automation, secret scanning, and a benchmark harness or benchmark step — in this repository's own ecosystem. Exhaustive, deterministic.
No static application security testing detected. For this repository's stack, add CodeQL's csharp pack, or a .NET security analyzer package (or `semgrep --config=auto`, which runs on any language) as a CI step. What was searched, so you can tell an absence from a miss: the 1 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner. — REDACTED:6
`BTDB.AzureStorage.Test/BTDB.AzureStorage.Test.csproj` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`. — BTDB.AzureStorage.Test/BTDB.AzureStorage.Test.csproj:9
What to do
Add a SAST step to CI running what this repository's stack ships: CodeQL's csharp pack, or a .NET security analyzer package — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.
Enable Dependabot/Renovate or a dependency-review gate.
Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
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
Add an approval/environment gate (required reviewers / protection rules) before production promotion.
Do you agree with this assessment?
P5 · DR & Backup3.0 / 10Weak✓ Tool-verified
Readiness · Readiness — Whether disaster recovery is planned and codified — backups, geo-recovery, RTO/RPO, persistence guarantees — from IaC + container manifests + docs, never the live cloud.
Method: Filesystem scan: disaster recovery, backup, geo-recovery, RTO/RPO, persistence guarantees from IaC, manifests, and docs. Exhaustive, deterministic, never a live environment.
What to do
Enable purge protection / soft-delete (and prevent_destroy on critical resources) so data stores can't be lost to an accidental or malicious delete.
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.
Readiness · Performance — Whether the code protects its performance with benchmarks — a benchmark suite, allocation/memory measurement, and (ideally) a CI gate. Presence is credited as a bonus, never a deduction.
Method: Repo + source scan: BenchmarkDotNet referenced (csproj/source), [Benchmark]/[MemoryDiagnoser] attribute counts, and a benchmark step in CI; off .NET, the same ladder over Go testing.B, Rust criterion/#[bench]/divan, JMH/kotlinx-benchmark, pytest-benchmark/asv/pyperf, tinybench/mitata/vitest bench/benchmark.js and Swift package-benchmark — scored as a bonus ladder (absence is neutral, never a deduction). Deterministic, presence detection.
Readiness · Performance — Whether asynchronous code stays responsive — it avoids sync-over-async blocking (a .NET .Wait()/.GetAwaiter().GetResult(), a time.sleep or blocking HTTP call inside a Python coroutine, a *Sync call inside an async JavaScript function, block_on inside a Rust async fn, runBlocking inside a Kotlin suspend function, block() inside a Reactor publisher) that stalls a thread or event loop and risks deadlock, and, where the code is a reusable library on .NET, awaits with ConfigureAwait(false) so it never captures and stalls its caller's context.
Method: Production-source scan: sync-over-async blocking counted everywhere — .Wait()/.GetAwaiter().GetResult() in .NET; off .NET, read from each language's code model, a blocking call inside an async function (Python, TS/JS, Rust, Kotlin, Swift, Dart) or inside a Java method returning a Reactor Mono/Flux or a Scala method returning a Future or effect — and, for a .NET library with ≥5 awaits, the share of awaits using ConfigureAwait(false). Deterministic, syntax/text detection.
30 blocking call(s) on async work (.Wait()/.GetAwaiter().GetResult()) — these waste a thread and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
`task.Wait()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one). — BTDB/ChunkCache/DiskChunkCache.cs:398
`.GetAwaiter().GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one). (×28) — BTDB/IOC/ContainerImpl.cs:1005, BTDB/KVDBLayer/Implementation/LazyFileCollectionWithFileInfos.cs:139, BTDB/ODBLayer/LazyUlongList.cs:195, …
`_lane.Wait()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one). — BTDB.Replication/CanonicalTrlPublisher.cs:82
Only 468/618 awaits in library code use ConfigureAwait(false). A library that captures the caller's context can stall or deadlock its host — the classic way a dependency drags an app down.
`await DisposeOwnedAsync(ownedInstances.Instance)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. — BTDB/IOC/ContainerImpl.cs:1017
`await serviceScope.DisposeAsync()` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. — BTDB/IOC/ContainerImpl.cs:1023
`await DisposeOwnedAsync(_serviceProvider)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. — BTDB/IOC/ContainerImpl.cs:1028
`await asyncDisposable.DisposeAsync()` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. — BTDB/IOC/ContainerImpl.cs:1036
`await stream.WriteAsync(tempBuf.AsMemory(0, 16))` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. — BTDB/KVDBLayer/Helpers/KeyValueDBExportImporter.cs:28
`await stream.WriteAsync(tempBuf.AsMemory(0, 4))` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. (×2) — BTDB/KVDBLayer/Helpers/KeyValueDBExportImporter.cs:34, BTDB/KVDBLayer/Helpers/KeyValueDBExportImporter.cs:38
`await stream.WriteAsync(key)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. — BTDB/KVDBLayer/Helpers/KeyValueDBExportImporter.cs:35
What to do
Make the call chain async end-to-end and await it — never block on a Task with .Wait()/.GetAwaiter().GetResult().
In library code, append .ConfigureAwait(false) to every await (or set <ConfigureAwait>false</ConfigureAwait> / use the analyzer CA2007) so the library never captures the host's context.
Other · Security — Transport security, security headers, secure cookies, input validation, middleware order and crypto hygiene (presence, not runtime).
Method: Roslyn plus filesystem scan: HSTS/security headers, secure cookies, input validation, middleware order, weak crypto (MD5/SHA1/DES); HTTPS-metadata context-aware. On a repository with no .NET source it reads JavaScript/TypeScript, Dart, Ruby, Scala, Rust or Elixir source itself (test, vendored, generated and minified paths not) for the arms that hold whether or not the code serves HTTP: a weak hash or cipher, key material fixed in the source, a TLS client that accepts any certificate, and (JavaScript/TypeScript, Ruby, Scala, Rust and Elixir) an obsolete TLS version; the server controls are not assessed there, and a Dart, Ruby, Scala, Rust or Elixir repository that serves no HTTP of its own is N/A on them. Deterministic.
None of the 11 security response headers the OWASP Secure Headers Project recommends (Content-Security-Policy, Strict-Transport-Security, X-Content-Type-Options, X-Frame-Options, …) is configured — defense in depth, even when a reverse proxy could set them. (−2.0 on this card.)
This web host's pipeline is composed here and adds no security response header (Content-Security-Policy, Strict-Transport-Security, X-Content-Type-Options, a frame policy) to what it serves. (×2) — DBBenchmark/EventLog/EventLogEndToEnd.cs:68, EventLogBench/Program.cs:44
No UseHttpsRedirection/UseHsts and no reverse-proxy signal — transport security is unverified at the app layer. (−2.0 on this card.)
This web host's pipeline is composed here with no UseHttpsRedirection/UseHsts, and nothing says a reverse proxy terminates TLS in front of it. (×2) — DBBenchmark/EventLog/EventLogEndToEnd.cs:68, EventLogBench/Program.cs:44
What to do
Add security response headers (Content-Security-Policy first, then Strict-Transport-Security, X-Content-Type-Options and a frame policy) — defense in depth, even when a reverse proxy could set them.
Enforce HTTPS at the app layer (UseHttpsRedirection / UseHsts) — only skip this if a reverse proxy demonstrably terminates TLS.
Other · Code Health — Whether the code avoids sync-over-async (deadlock-prone blocking on tasks) and async void.
Method: Roslyn syntax scan: async methods scanned for .Wait()/.GetAwaiter().GetResult() and async-void outside event handlers. Deterministic, hard fact per invocation.
Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` can deadlock (and wastes a thread). Prefer awaiting it: make the caller `async` and `await` instead. Where a synchronous entry point must stay — a public sync API you cannot break, or a process entry point that must not return until the work finishes — the block belongs in ONE documented bridge and never inside code that is already async; and where it already is that bridge, give the wait a TIMEOUT so a hung task fails the call instead of hanging the process. (×16) — BTDB/ChunkCache/DiskChunkCache.cs:398, BTDB/IOC/ContainerImpl.cs:1005, BTDB/KVDBLayer/Implementation/LazyFileCollectionWithFileInfos.cs:139, …
`Compactor.CompactOnePureValueFileIteration` is a synchronous helper that blocks (`Thread.Sleep`): called from an `async` method it parks the thread exactly as the inline call would. Make the helper `async` and `await` it (`await Task.Delay`, `SemaphoreSlim.WaitAsync`, a `TaskCompletionSource` instead of the poll). — BTDB/KVDBLayer/Implementation/Compactor.cs:180
`async void` can't be awaited and its exceptions crash the process instead of propagating. Return `Task` — or, where the delegate contract requires void (timer/event/callback registrations), make this a thin void shim that awaits a Task-returning inner method inside try/catch so exceptions are contained. — BTDB/KVDBLayer/Implementation/CompactorScheduler.cs:94
`ReplicationCompactor.CompactOnePureValueFileIteration` is a synchronous helper that blocks (`Thread.Sleep`): called from an `async` method it parks the thread exactly as the inline call would. Make the helper `async` and `await` it (`await Task.Delay`, `SemaphoreSlim.WaitAsync`, a `TaskCompletionSource` instead of the poll). — BTDB/KVDBLayer/Implementation/ReplicationCompactor.cs:127
Reading `.Result` of a task that has not completed blocks this thread until it does — the same block as `.Wait()`: under a synchronization context (Blazor, a UI thread, classic ASP.NET) it deadlocks, and on the thread pool it parks a thread for as long as the work runs. `await` the task instead (make the caller `async`); where a synchronous entry point must stay, keep the block in ONE documented bridge with a timeout. (×5) — BTDB/ODBLayer/FindUnusedKeysVisitor.cs:49, BTDB/ODBLayer/FindUnusedKeysVisitor.cs:66, BTDB.Replication/EventLog/EventLogService.cs:243, …
Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` wastes a thread and, if the task needs a context this one is holding, deadlocks. `Dispose()` returns void by contract, so it cannot simply `await`: signal the work to stop first (cancel its token, set its stop flag) so the wait is short, give the wait a TIMEOUT so a hung task cannot hang shutdown, and — where callers can use it — add an awaitable teardown (`DisposeAsync`/`StopAsync`) beside the synchronous one and let `Dispose()` remain the bounded fallback. (×4) — DBBenchmark/LSM/LsmSpillBenchmark.cs:120, BTDB.AzureStorage/AzureBlobFileCollection.cs:238, BTDB.Replication/ReplicationFileSet.Collection.cs:392, …
`File.ReadAllLines` blocks the thread on I/O while `File.ReadAllLinesAsync` exists to wait without one — inside a method that is already `async`, await the twin. (×2) — Releaser/Releaser/Program.cs:136, Releaser/Releaser/Program.cs:158
`CanonicalTrlPublisher.Dispose` is a synchronous helper that blocks (`SemaphoreSlim.Wait`): called from an `async` method it parks the thread exactly as the inline call would. Make the helper `async` and `await` it (`await Task.Delay`, `SemaphoreSlim.WaitAsync`, a `TaskCompletionSource` instead of the poll). — BTDB.Replication/LeadershipActivation.cs:89
`ReplicationNodeCoordinator.DropLeadership` is a synchronous helper that blocks (`SemaphoreSlim.Wait`): called from an `async` method it parks the thread exactly as the inline call would. Make the helper `async` and `await` it (`await Task.Delay`, `SemaphoreSlim.WaitAsync`, a `TaskCompletionSource` instead of the poll). (×8) — BTDB.Replication/ReplicationNodeCoordinator.cs:208, BTDB.Replication/ReplicationNodeCoordinator.cs:225, BTDB.Replication/ReplicationNodeCoordinator.cs:253, …
`.Wait(…)` blocks this thread until the task completes or the bound expires — sync-over-async: it can deadlock under a synchronization context and it parks a thread while it waits. `await` the task (with `.WaitAsync(timeout, token)` where the bound matters). — BTDB.LSM/LsmKeyValueDB.cs:183
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.
Do you agree with this assessment?
X13 · Undrained process stream10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a child process that has BOTH standard streams redirected drains both — reading one to the end while the other is never read deadlocks once the child fills the unread pipe.
Method: Roslyn syntax + semantics: ProcessStartInfo launches with both streams redirected, checked for a drain of each stream across the enclosing type. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `spawn` imported from `child_process` whose stdout and stderr are both pipes (no options, no `stdio`, or `stdio` of `'pipe'`), bound to a local that never leaves its scope, where exactly one of the two streams is read, the other never, and the child’s `close`/`exit` (or the read stream’s end) is awaited; a shell redirect in the call’s arguments or a `kill` of the child suppresses it. The same rule reads Python’s `subprocess.Popen`, Dart’s `Process.start`, Ruby’s `Open3.popen3`, and Scala’s JDK process starts (`new ProcessBuilder(…).start()` with no `redirectErrorStream`/`redirectError`/`redirectOutput`/`inheritIO`, `Runtime.getRuntime.exec`) where one of `getInputStream`/`getErrorStream` is read and the other never while `waitFor()` is called or the read stream is read to its end. Deterministic, provable per finding. Advisory.
Other · Security — Whether a hand-rolled public/private IP check can be walked past — a method that unwraps IPv4-mapped IPv6 but returns the opposite verdict for the same host written as IPv4-compatible, 6to4 or NAT64.
Method: Roslyn syntax + semantics: methods that unwrap IPv4-mapped IPv6 and hand-roll IPv4 range carve-outs, checked for whether the IPv6 branch also accounts for the IPv4-compatible, 6to4 and NAT64 embeddings. Deterministic, provable per finding. Advisory.
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.
`_aesCbc` (line 12) holds a `Aes` that `AesGcmSymmetricCipher` acquires itself — every assignment to it is a call that opens or creates a new instance for the caller to own — and nothing in `AesGcmSymmetricCipher` ever releases it: the type is not `IDisposable`, declares no `Dispose`, and every other mention of `_aesCbc` only reads through it, so it is never disposed, closed, returned or handed on. Whatever it opened (a connection, a channel, a file) stays open until finalization if the type has a finalizer and until the process ends if it does not, once per instance of `AesGcmSymmetricCipher`. Implement `IDisposable` and release `_aesCbc` there, or take the instance from the caller so its owner ends it. — BTDB/Encrypted/AesGcmSymmetricCipher.cs:12
`BTreeKeyValueDB` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `_replicationCompactionLock` itself (line 21), which makes that instance its own. But `_replicationCompactionLock` is named in none of the methods the disposal search covered: `Dispose` (line 1471), `Transactions` (line 85), `PublishBatchUnsafe` (line 1641), `FreeWaitingToDisposeUnsafe` (line 2224), `EnsureTransactionLogCommandFits` (line 2339) — that is `Dispose` plus every method `Dispose` calls BY NAME, so a release reached through an interface, a delegate or a base class is not followed and is worth checking before acting. On what was read, the type's disposal releases everything except the one thing it owns. A disposable the owner never disposes is held until finalization if its type has a finalizer, and forever if it does not — which for a synchronisation primitive, a timer, a stream or a handle means the resource accumulates once per instance for the life of the process. Release it in `Dispose` (`_replicationCompactionLock?.Dispose();`), or, if it truly does not need releasing, drop `IDisposable` from the type so the claim and the behaviour agree. — BTDB/KVDBLayer/Implementation/BTreeKeyValueDB.cs:21
`BTreeKeyValueDB` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `_nextRoot` itself (line 51), which makes that instance its own. But `_nextRoot` is named in none of the methods the disposal search covered: `Dispose` (line 1471), `Transactions` (line 85), `PublishBatchUnsafe` (line 1641), `FreeWaitingToDisposeUnsafe` (line 2224), `EnsureTransactionLogCommandFits` (line 2339) — that is `Dispose` plus every method `Dispose` calls BY NAME, so a release reached through an interface, a delegate or a base class is not followed and is worth checking before acting. On what was read, the type's disposal releases everything except the one thing it owns. A disposable the owner never disposes is held until finalization if its type has a finalizer, and forever if it does not — which for a synchronisation primitive, a timer, a stream or a handle means the resource accumulates once per instance for the life of the process. Release it in `Dispose` (`_nextRoot?.Dispose();`), or, if it truly does not need releasing, drop `IDisposable` from the type so the claim and the behaviour agree. — BTDB/KVDBLayer/Implementation/BTreeKeyValueDB.cs:51
`_nextRoot` is a `IRootNode` this type creates itself, and here (line 339) a new instance is written over it — but the overwrite runs once per loop iteration, so every iteration after the first replaces the previous one, and nothing earlier in `LoadInfoAboutFiles` disposes, closes, saves or hands on the instance being replaced. The assignment makes it unreachable while it still holds what it holds (a timer that keeps firing, a callback registered on a longer-lived token, a socket, a handle), and no later `Dispose` can reach it: the type's own disposal releases only the CURRENT instance. The cost accumulates once per overwrite. Release the previous instance first (`_nextRoot?.Dispose();` before the assignment), or swap it out with `Interlocked.Exchange` and dispose what comes back. — BTDB/KVDBLayer/Implementation/BTreeKeyValueDB.cs:339
`_nextRoot` is a `IRootNode` this type creates itself, and here (line 503) a new instance is written over it — but the overwrite runs once per loop iteration, so every iteration after the first replaces the previous one, and nothing earlier in `LoadInfoAboutFilesAsync` disposes, closes, saves or hands on the instance being replaced. The assignment makes it unreachable while it still holds what it holds (a timer that keeps firing, a callback registered on a longer-lived token, a socket, a handle), and no later `Dispose` can reach it: the type's own disposal releases only the CURRENT instance. The cost accumulates once per overwrite. Release the previous instance first (`_nextRoot?.Dispose();` before the assignment), or swap it out with `Interlocked.Exchange` and dispose what comes back. — BTDB/KVDBLayer/Implementation/BTreeKeyValueDB.cs:503
`_cancellationSource` is a `CancellationTokenSource` this type creates itself, and here (line 71) a new instance is written over it — but `RemoveCompactAction` itself reads through `_cancellationSource` before replacing it, so it expects an instance to be there, and nothing earlier in `RemoveCompactAction` disposes, closes, saves or hands on the instance being replaced. The assignment makes it unreachable while it still holds what it holds (a timer that keeps firing, a callback registered on a longer-lived token, a socket, a handle), and no later `Dispose` can reach it: the type's own disposal releases only the CURRENT instance. The cost accumulates once per overwrite. Release the previous instance first (`_cancellationSource?.Dispose();` before the assignment), or swap it out with `Interlocked.Exchange` and dispose what comes back. — BTDB/KVDBLayer/Implementation/CompactorScheduler.cs:71
`ObjectDB` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `_initializeRelationsLock` itself (line 358), which makes that instance its own. But `_initializeRelationsLock` is named in none of the methods the disposal search covered: `Dispose` (line 473), `UnregisterCompactionMaintenance` (line 493) — that is `Dispose` plus every method `Dispose` calls BY NAME, so a release reached through an interface, a delegate or a base class is not followed and is worth checking before acting. On what was read, the type's disposal releases everything except the one thing it owns. A disposable the owner never disposes is held until finalization if its type has a finalizer, and forever if it does not — which for a synchronisation primitive, a timer, a stream or a handle means the resource accumulates once per instance for the life of the process. Release it in `Dispose` (`_initializeRelationsLock?.Dispose();`), or, if it truly does not need releasing, drop `IDisposable` from the type so the claim and the behaviour agree. — BTDB/ODBLayer/ObjectDB.cs:358
`_keyValueTr` is never created by `ObjectDBTransaction` — every assignment to it takes a constructor parameter — yet this type disposes it here (line 66). Its declared type `IKeyValueDBTransaction` is an interface, so the instance came from whoever chose and created it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call — a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed. — BTDB/ODBLayer/ObjectDBTransaction.cs:66
`_cursor` is never created by `PageReader` — every assignment to it takes a constructor parameter — yet this type disposes it here (line 356). Its declared type `IKeyValueDBCursor` is an interface, so the instance came from whoever chose and created it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call — a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed. — BTDB/ODBLayer/ODBRoaringBitmap.cs:356
`_cursor` is never created by `RoaringBitmapEnumerator` — every assignment to it takes a constructor parameter — yet this type disposes it here (line 446). Its declared type `IKeyValueDBCursor` is an interface, so the instance came from whoever chose and created it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call — a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed. — BTDB/ODBLayer/ODBRoaringBitmap.cs:446
`_inner` is never created by `BoundedPageReader` — every assignment to it takes a constructor parameter — yet this type disposes it here (line 315). Its declared type `IInternalODBRoaringBitmapPageReader` is an interface, so the instance came from whoever chose and created it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call — a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed. — BTDB/ODBLayer/RoaringBitmap.cs:315
`_source` is never created by `NotPageReader` — every assignment to it takes a constructor parameter — yet this type disposes it here (line 378). Its declared type `IInternalODBRoaringBitmapPageReader` is an interface, so the instance came from whoever chose and created it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call — a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed. — BTDB/ODBLayer/RoaringBitmap.cs:378
`_left` is never created by `AndNotPageReader` — every assignment to it takes a constructor parameter — yet this type disposes it here (line 457). Its declared type `IInternalODBRoaringBitmapPageReader` is an interface, so the instance came from whoever chose and created it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call — a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed. — BTDB/ODBLayer/RoaringBitmap.cs:457
`_right` is never created by `AndNotPageReader` — every assignment to it takes a constructor parameter — yet this type disposes it here (line 458). Its declared type `IInternalODBRoaringBitmapPageReader` is an interface, so the instance came from whoever chose and created it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call — a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed. — BTDB/ODBLayer/RoaringBitmap.cs:458
`_left` is never created by `BinaryPageReader` — every assignment to it takes a constructor parameter — yet this type disposes it here (line 598). Its declared type `IInternalODBRoaringBitmapPageReader` is an interface, so the instance came from whoever chose and created it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call — a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed. — BTDB/ODBLayer/RoaringBitmap.cs:598
`_right` is never created by `BinaryPageReader` — every assignment to it takes a constructor parameter — yet this type disposes it here (line 599). Its declared type `IInternalODBRoaringBitmapPageReader` is an interface, so the instance came from whoever chose and created it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call — a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed. — BTDB/ODBLayer/RoaringBitmap.cs:599
`MemoryPositionLessStream` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `_lock` itself (line 12), which makes that instance its own. But `_lock` is named in none of the methods the disposal search covered: `Dispose` (line 15) — that is `Dispose` plus every method `Dispose` calls BY NAME, so a release reached through an interface, a delegate or a base class is not followed and is worth checking before acting. On what was read, the type's disposal releases everything except the one thing it owns. A disposable the owner never disposes is held until finalization if its type has a finalizer, and forever if it does not — which for a synchronisation primitive, a timer, a stream or a handle means the resource accumulates once per instance for the life of the process. Release it in `Dispose` (`_lock?.Dispose();`), or, if it truly does not need releasing, drop `IDisposable` from the type so the claim and the behaviour agree. — BTDB/StreamLayer/MemoryPositionLessStream.cs:12
`_fileCollection` is a `IFileCollection` this type creates itself, and here (line 215) a new instance is written over it — but `BtdbTimeTests` creates `_fileCollection` when it is constructed, so every later call finds an instance there, and nothing earlier in `CreateTestFileCollection` disposes, closes, saves or hands on the instance being replaced. The assignment makes it unreachable while it still holds what it holds (a timer that keeps firing, a callback registered on a longer-lived token, a socket, a handle), and no later `Dispose` can reach it: the type's own disposal releases only the CURRENT instance. The cost accumulates once per overwrite. Release the previous instance first (`_fileCollection?.Dispose();` before the assignment), or swap it out with `Interlocked.Exchange` and dispose what comes back. — DBBenchmark/BTDBTimeTests.cs:215
`cursor` is a `LightningCursor`, which implements `IDisposable`, and it is created here (line 166). Every use of it in `ReadAll` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var cursor = …;`), which releases it at the end of the scope on every path including a throw. — DBBenchmark/LightingDbTimeTests.cs:166
`Storage` is declared `IDisposable` and nothing more, and every assignment to it takes a constructor parameter — so `Node` can do exactly one thing with it, which is the release performed here (line 210), and it is the only reference left that can perform it. That release is the tail of an unprotected sequence: `Files.DisposeAsync()` runs first (line 209), and nothing in `DisposeAsync` catches it. A single throw from that call skips the release entirely — and because a bare `IDisposable` carries no state to inspect and no second holder to fall back on, whatever it represents (a lock taken for this instance, a semaphore lease, a scope) is then held for the remaining lifetime of the process, with nothing left that could ever give it back. Wrap the calls that precede it in a `try` and move the release into the `finally`, so the one statement that must happen is the one that always happens. — DBBenchmark/Replication/ReplicationMeasurements.cs:210
`EventLogTopic` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `_resolve` itself (line 120), which makes that instance its own. But `_resolve` is named in none of the methods the disposal search covered: `DisposeAsync` (line 1012), `FailOutstanding` (line 311) — that is `Dispose` plus every method `Dispose` calls BY NAME, so a release reached through an interface, a delegate or a base class is not followed and is worth checking before acting. On what was read, the type's disposal releases everything except the one thing it owns. A disposable the owner never disposes is held until finalization if its type has a finalizer, and forever if it does not — which for a synchronisation primitive, a timer, a stream or a handle means the resource accumulates once per instance for the life of the process. Release it in `Dispose` (`_resolve?.Dispose();`), or, if it truly does not need releasing, drop `IDisposable` from the type so the claim and the behaviour agree. — BTDB.Replication/EventLog/EventLogService.cs:120
`_mergeCancellation` is a `CancellationTokenSource` this type creates itself, and here (line 512) a new instance is written over it — but `Attach` itself reads through `_mergeCancellation` before replacing it, so it expects an instance to be there, and nothing earlier in `Attach` disposes, closes, saves or hands on the instance being replaced. The assignment makes it unreachable while it still holds what it holds (a timer that keeps firing, a callback registered on a longer-lived token, a socket, a handle), and no later `Dispose` can reach it: the type's own disposal releases only the CURRENT instance. The cost accumulates once per overwrite. Release the previous instance first (`_mergeCancellation?.Dispose();` before the assignment), or swap it out with `Interlocked.Exchange` and dispose what comes back. — BTDB.Replication/EventLog/EventLogService.cs:512
`LeadershipSession` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `_lane` itself (line 20), which makes that instance its own. But `_lane` is named in none of the methods the disposal search covered: `Dispose` (line 32) — that is `Dispose` plus every method `Dispose` calls BY NAME, so a release reached through an interface, a delegate or a base class is not followed and is worth checking before acting. On what was read, the type's disposal releases everything except the one thing it owns. A disposable the owner never disposes is held until finalization if its type has a finalizer, and forever if it does not — which for a synchronisation primitive, a timer, a stream or a handle means the resource accumulates once per instance for the life of the process. Release it in `Dispose` (`_lane?.Dispose();`), or, if it truly does not need releasing, drop `IDisposable` from the type so the claim and the behaviour agree. — BTDB.Replication/LeadershipSession.cs:20
`HttpReplicationPeerTransport` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `_requests` itself (line 27), which makes that instance its own. But `_requests` is named in none of the methods the disposal search covered: `Dispose` (line 352) — that is `Dispose` plus every method `Dispose` calls BY NAME, so a release reached through an interface, a delegate or a base class is not followed and is worth checking before acting. On what was read, the type's disposal releases everything except the one thing it owns. A disposable the owner never disposes is held until finalization if its type has a finalizer, and forever if it does not — which for a synchronisation primitive, a timer, a stream or a handle means the resource accumulates once per instance for the life of the process. Release it in `Dispose` (`_requests?.Dispose();`), or, if it truly does not need releasing, drop `IDisposable` from the type so the claim and the behaviour agree. — BTDB.Replication.Http/HttpReplicationPeerTransport.cs:27
`EventPublisher` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `_publishing` itself (line 75), which makes that instance its own. But `_publishing` is named in none of the methods the disposal search covered: `DisposeAsync` (line 583) — that is `Dispose` plus every method `Dispose` calls BY NAME, so a release reached through an interface, a delegate or a base class is not followed and is worth checking before acting. On what was read, the type's disposal releases everything except the one thing it owns. A disposable the owner never disposes is held until finalization if its type has a finalizer, and forever if it does not — which for a synchronisation primitive, a timer, a stream or a handle means the resource accumulates once per instance for the life of the process. Release it in `Dispose` (`_publishing?.Dispose();`), or, if it truly does not need releasing, drop `IDisposable` from the type so the claim and the behaviour agree. — BTDB.Replication.EventSourcing/EventPublisher.cs:75
`gate` is a `SemaphoreSlim`, which implements `IDisposable`, and it is created here (line 73). Every use of it in `RunNodeAsync` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var gate = …;`), which releases it at the end of the scope on every path including a throw. — EventLogBench/Program.cs:73
What to do
Each finding names the value and the span that decides who owns it — the `new` that created it, or the constructor parameter that handed it over. Confirm ownership from that span, then make the disposal match it: release what this type created, leave what it was injected with to whoever created THAT, and drop a finalizer whose type holds nothing unmanaged to release.
Other · Code Health — Whether async methods accept a CancellationToken so work can be cancelled (adoption curve).
Method: Roslyn scan: every async method (excluding framework-fixed overrides/Blazor handlers) checked for CancellationToken parameter presence. Deterministic, adoption percentage. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same question: every named async function that itself makes a request an AbortSignal can cancel (global `fetch`, axios and its file-local instances, ky, ofetch) counts, and it is compliant when its parameters or body name a signal or it hands one of its own parameters to the request as options; signatures a framework fixes (JSX event handlers, route and lifecycle exports, request-first handlers, `override`, `'use server'` modules, TanStack `mutationFn`) are exempt unless they take a signal. Deterministic, adoption percentage.
Only 250/360 async methods accept a CancellationToken, so in-flight work can't be stopped early when the caller gives up — whatever ends it in your host (shutdown signal, timeout, abandoned request, user cancel). Thread a token through the call chain and honour it at each await and loop; where a method genuinely cannot be interrupted, omitting it is a deliberate choice — judge against your hosting model.
No CancellationToken parameter — this work can't be stopped early once started. (×22) — BTDB/KVDBLayer/Helpers/KeyValueDBExportImporter.cs:16, BTDB/KVDBLayer/Helpers/KeyValueDBExportImporter.cs:118, BTDB/KVDBLayer/Helpers/KeyValueDBExportImporter.cs:228, …
No CancellationToken parameter — the body observes an ambient token instead (a field or a context object), so the work does stop on cancellation, but a caller cannot cancel this call independently of the owner that created that token. (×7) — BTDB/KVDBLayer/Implementation/Compactor.cs:118, BTDB/KVDBLayer/Implementation/CompactorScheduler.cs:94, BTDB/KVDBLayer/Implementation/ReplicationCompactor.cs:96, …
Neither takes a CancellationToken nor reads the one of the function it sits in, while it calls something that takes one — this work can't be stopped early once started. Take the token, or pass on the enclosing one. (×10) — DBBenchmark/EventLog/EventLogStorageScreening.cs:329, DBBenchmark/EventLog/EventLogStorageScreening.cs:349, DBBenchmark/EventLog/EventLogStorageScreening.cs:357, …
What to do
Thread a CancellationToken through async methods so work stops promptly on cancellation.
Other · Code Health — Whether an argument guard throws the exception its own condition describes — a guard that rejects a value for being EMPTY and reports it as `ArgumentNullException` tells the caller a parameter was null when it provably was not.
Method: Roslyn syntax: `throw new ArgumentNullException(nameof(p))` statements (or a repository exception type deriving from it) controlled by an `if` — directly or through the `using`, `lock` or `try` that wraps the throw — whose condition is read for a test that is true of a NON-null `p` — an emptiness test that dereferences it (`p.Count == 0`, `!p.Any()`) or a BCL predicate documented true of the empty value (`string.IsNullOrEmpty(p)`); in the `else` branch, for a conjunct of the admitting condition that is FALSE of a non-null `p`. Range guards are read for bounds that leave nothing and for a `p > C.Count` bound whose index then reaches `C[p]`, `C.RemoveAt(p)` or a method of the same type that indexes with it. Deterministic, provable per finding. Advisory.
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 a method that TAKES a lock or semaphore and gives it back from a flag-guarded `finally` returns the value that flag implies — reporting success while the guard hands the primitive back admits a second caller the exclusion was there to keep out, and reporting failure while the guard keeps it leaves nothing to ever give it back. Also whether a `finally` that gives the primitive back unconditionally can run in a state where the method does not hold it: after a timed wait whose result was discarded, after an acquire inside the `try` that can fail, after the body already released it, or never, because a `return` left between the acquire and the `try`.
Method: Roslyn syntax: `try` statements whose `finally` releases a synchronisation primitive under a bare local-bool guard, where the method also TOOK that same primitive before the `try`, checked for a `return` of a bool literal whose value disagrees with the flag state the method's own straight-line assignments put it in. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a value the caller is invited to supply is the value the type actually uses — a constructor parameter stored in a private field that nothing ever reads while the default it was given is spelled out a second time at the site that should have read it, a keyed lookup that falls back to a different setting than the one its key names while the same type falls back to the matching one for that same key, or a culture-sensitive parse given no format provider by a type that feeds its own settable culture to the same kind of parse elsewhere, or a number an entry point writes to standard output under the host's culture while the same entry point formats with the invariant culture elsewhere. Either way, every caller who supplies a value silently gets something else.
Method: Roslyn syntax: private instance fields of a non-partial type assigned in a constructor from one of its own parameters with a `??` fallback, checked for whether anything in the type body reads the field and whether that same fallback expression is spelled out again outside the constructor; and `??` fallbacks onto a member access from a lookup call carrying exactly one string literal, grouped by that key across the type and checked for a fallback member whose folded name disagrees with the key while a sibling site for the same key agrees with it. On a repository with no .NET source the first two arms read JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `#x`, `private` or `private` parameter-property instance field filled in the constructor from a parameter (or one member of one) through `??`/`||` or a parameter default, never read anywhere in the file by name, whose constructed default is spelled again in the class body; and `lookup("key") ?? s.member` grouped by key per class, or per module outside every class. The culture arm has no JavaScript counterpart: its parses take no locale. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a value handed from a callback to the body that waits on it crosses on something built to be crossed — a `Queue<T>`/`List<T>`/`Dictionary<K,V>` written inside an event handler and read back outside it is mutated by two flows at once, and the semaphore or completion source beside it orders how MANY items exist while leaving the collection's own head, tail and backing array unprotected.
Method: Roslyn syntax: method, accessor, local-function and lambda bodies that declare BOTH a non-thread-safe generic collection (`Queue`/`Stack`/`List`/`Dictionary`/`HashSet`/`Sorted*`/`LinkedList`) and a synchronisation primitive (`SemaphoreSlim`/`TaskCompletionSource`/`ManualResetEvent(Slim)`/`AutoResetEvent`/`CountdownEvent`) as locals, then read for a `+=`-registered lambda that raises that primitive while the body outside every lambda waits on it — and, in that scope, a mutating call on the collection inside the lambda paired with a mention of it outside. Any `lock` in the scope abstains it. On a repository with no .NET source the same handoff is read in Java off the engine’s own token stream (test source sets, vendored and demonstration paths not): an `ArrayList`/`LinkedList`/`ArrayDeque`/`PriorityQueue`/`Hash*`/`LinkedHash*`/`Tree*` local and a `CountDownLatch`/`Semaphore`/`CompletableFuture` local, a lambda or anonymous class that raises the primitive and mutates the collection, and a wait outside it; any `synchronized` or `lock()` abstains the body. Because each of those primitives orders what the callback wrote before raising it, only a touch that provably overlaps the callback is convicted: one after the registration and before the next wait, or one in a loop registered-before, waiting on every pass and not declaring the collection. Deterministic, provable per finding. Advisory.
`ReplicationNodeCoordinator._publicationWatchdogs` is a `List<…>` that a `CancellationToken.Register(…)` callback writes (`Clear` on line 794) and `ObservePublication` reads (line 732). The runtime runs that callback on a thread the rest of the type does not own — a pool or I/O thread for a watcher, timer or process event, the completing thread for a continuation, the cancelling thread for a token registration, the pool for a `Progress<T>` made without a UI context — while `ObservePublication` runs on whichever thread calls it. `List<…>` allows many readers or one writer, never both: a read that meets the write sees a torn resize, an enumeration throws `InvalidOperationException`, and two writes lose or duplicate entries. Take one `lock` over the write and every read of `_publicationWatchdogs`, use a `System.Collections.Concurrent` collection, or marshal the callback onto the reader's synchronisation context. — BTDB.Replication/ReplicationNodeCoordinator.cs:794
`ReplicationNodeCoordinator._maintenanceWatchdogs` is a `List<…>` that a `CancellationToken.Register(…)` callback writes (`Clear` on line 796) and `StepAsync` reads (line 316). The runtime runs that callback on a thread the rest of the type does not own — a pool or I/O thread for a watcher, timer or process event, the completing thread for a continuation, the cancelling thread for a token registration, the pool for a `Progress<T>` made without a UI context — while `StepAsync` runs on whichever thread calls it. `List<…>` allows many readers or one writer, never both: a read that meets the write sees a torn resize, an enumeration throws `InvalidOperationException`, and two writes lose or duplicate entries. Take one `lock` over the write and every read of `_maintenanceWatchdogs`, use a `System.Collections.Concurrent` collection, or marshal the callback onto the reader's synchronisation context. — BTDB.Replication/ReplicationNodeCoordinator.cs:796
What to do
Hand values between a callback and the body waiting on it through a type built to be crossed — `System.Collections.Concurrent.ConcurrentQueue<T>` drops in beside the existing signal, and `System.Threading.Channels.Channel<T>` replaces the signal as well — or take a `lock` over every access to the shared collection on both sides. A counting semaphore beside it orders how MANY items exist and takes no exclusion over the collection's own internal state.
Do you agree with this assessment?
X27 · Collection changed while being enumerated7.9 / 10Strong✓ Tool-verified
Other · Code Health — Whether a `foreach` leaves the collection it is walking alone — a body that adds to or removes from the very collection the loop is enumerating invalidates the enumerator it is holding, so the next `MoveNext` throws `InvalidOperationException` 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.
`template._arguments` is enumerated directly, and line 4926 calls `template._arguments.Add(…)` inside the loop body — a structural change to a `List`. The next `MoveNext` throws `InvalidOperationException: Collection was modified; enumeration operation may not execute`, so every pass that reaches this call ends the loop by exception instead of by running out of items, and the remaining items are never seen. — BTDB/ODBLayer/RelationQuery.cs:4926
`source._name2Id` is enumerated directly, and line 51 calls `source._name2Id.Add(…)` inside the loop body — a structural change to a `Dictionary`. The next `MoveNext` throws `InvalidOperationException: Collection was modified; enumeration operation may not execute`, so every pass that reaches this call ends the loop by exception instead of by running out of items, and the remaining items are never seen. — BTDB/ODBLayer/RelationsInfo.cs:51
`source.Id2Relation` is enumerated directly, and line 52 calls `source.Id2Relation.Add(…)` inside the loop body — a structural change to a `Dictionary`. The next `MoveNext` throws `InvalidOperationException: Collection was modified; enumeration operation may not execute`, so every pass that reaches this call ends the loop by exception instead of by running out of items, and the remaining items are never seen. — BTDB/ODBLayer/RelationsInfo.cs:52
What to do
Each finding names the two spans that cannot both stand — the `foreach` source, and the call inside the body that structurally changes that same collection. Confirm from those two, then pick one: enumerate a snapshot (`foreach (var x in c.ToList())`), collect what needs changing and apply it after the loop, or — where the loop was only ever meant to act on the first match — `break` immediately after the mutation, which is the one shape that is already safe.
Do you agree with this assessment?
X28 · Index access outside its own emptiness guard6.2 / 10Adequate✓ Tool-verified
Other · Code Health — Whether a condition that tests a value for emptiness indexes that same value only where the test holds — an `||` written one parenthesis too far to the left leaves an index access outside the guard beside it, so the empty case the guard exists to anticipate reaches the index and throws.
Method: Roslyn syntax only, no semantic model: the OUTERMOST `&&`/`||` of every boolean condition, read for a symbol the condition tests for emptiness (`string.IsNullOrEmpty`/`IsNullOrWhiteSpace`, a `Length`/`Count` comparison against a literal, `Any()`, a `Length`/`Count` pattern, or a comparison against `""`) and ALSO indexes. Each `symbol[...]` access is placed by a boolean-reachability walk from the access up to the outermost connective: an access is COVERED when some enclosing step has it in the right operand and the left operand, under the truth value that step forces, proves the symbol non-empty — a recursion over `&&`/`||` whose true- and false-directions are asymmetric. A finding needs BOTH an uncovered access and a covered one on the same symbol in the same condition, which is the agreeing twin that separates a misplaced parenthesis from an unrelated length test. Bare index accesses with no emptiness test in the condition are neither counted nor reported; a non-identifier receiver and a lambda nested inside the condition are outside the population. Deterministic, provable per finding. Advisory.
This access `args[2]` has no test of the length of `args` on its own path, while this method tests it for that position at line 21 (`args.Length < 1`): where that test fails, this read throws. Either the test is load-bearing and this read needs it too, or the length of `args` is fixed here and the test is dead. (×2) — ODbDump/Program.cs:90, ODbDump/Program.cs:91
This access `args[1]` has no test of the length of `args` on its own path, while this method tests it for that position at line 25 (`args.Length > 0`): where that test fails, this read throws. Either the test is load-bearing and this read needs it too, or the length of `args` is fixed here and the test is dead. — DBBenchmark/BackendActions/PlannerScaling.cs:27
What to do
Each finding names the index access that escapes the guard and the line of the correctly bracketed access beside it. Compare the two: they differ only in where one parenthesis sits. Move it so the emptiness test brackets every access to that symbol — and if the value provably cannot be empty at this point, delete the test rather than leave a condition that guards one access and not its neighbour.
Do you agree with this assessment?
X29 · Per-element action decided by a fixed element10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a decision taken once per element is taken ABOUT that element — a test inside a counted loop that reads a fixed subscript of the very collection its guarded statement indexes by the loop variable applies element zero's answer to all of them, so the elements that differ from it are all handled wrongly, and in the same direction.
Method: Roslyn syntax only, no semantic model: every `for` statement declaring exactly ONE loop variable, and every `if` inside its body that is not under a nested loop or a lambda. A site enters the population when the `if`’s condition never mentions the loop variable while the statement it guards indexes some collection by that variable ALONE (`c[i]`; `c[i + 1]` and `c[i, j]` are outside it). A finding additionally needs the AGREEING TWIN at the same-collection grain: the condition must read THAT SAME collection at a subscript that does not move — written into the condition, or reached through a local declared BEFORE the loop, so an alias bound inside the body is not followed. Both collection expressions must be simple identifiers. On a repository with no .NET source the same rule reads JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `for (let|var|const x = …; …; …)` with one declarator and a braced body, an alias followed only when it is declared before the loop in a block that encloses it and never assigned inside the loop. Deterministic, provable per finding. Advisory.
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.
An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it. (×28) — BTDB/ChunkCache/DiskChunkCache.cs:400, BTDB/ChunkCache/DiskChunkCache.cs:431, BTDB/EventStoreLayer/TypeSerializers.cs:321, …
`catch (Exception) when (…)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch. — BTDB/ODBLayer/ODBIterator.cs:562
`catch (EventLogOwnerLostException)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch. — BTDB.Replication/EventLog/EventLogService.cs:720
An empty catch block silently discards the error — failures vanish with no log and no rethrow. On a teardown path letting it propagate is not an option (throwing out of `Dispose()` masks the failure already in flight and abandons the rest of the cleanup), so make the swallow deliberate instead: record it through whatever this codebase already uses to report problems — or, if one specific failure truly cannot matter, catch exactly that exception type and say why in a comment on the catch (a comment on a catch-all still swallows everything else). (×6) — BTDB.Replication/EventLog/EventLogService.cs:1006, BTDB.Replication/ReplicationFileSet.Collection.cs:402, EventLogBench/NodeScenario.cs:250, …
`catch (InvalidOperationException) when (…)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch. — BTDB.Replication/LeaseSessionController.cs:88
`catch (InvalidDataException)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch. — BTDB.Replication.Http/HttpReplicationPeerTransport.cs:100
`catch (IOException)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch. — BTDB.Replication.Http/HttpReplicationPeerTransport.cs:108
`catch (FileNotFoundException)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch. — BTDB.LSM/Storage/FileSystemLsmStorage.cs:165
What to do
Swallowed exception (empty catch)
Do you agree with this assessment?
X30 · Support guard that admits what it rejects10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a guard written as a NEGATED `||` says what its author meant — `!(a || b || x != k)` is `!a && !b && x == k` by De Morgan, so a bail-out that mixes capabilities the code needs with a fault it refuses turns inside out: it fires only where the capabilities are ABSENT, and lets every value the fault term names walk straight into the body that cannot handle it.
Method: Roslyn syntax only, no semantic model: every logical-not whose operand is a parenthesised `||` chain of two or more disjuncts, flattened (a left-nested `a || b || c` read once would see `(a || b)` as one disjunct). A site enters the population on that shape alone. A finding additionally needs the disjuncts to DISAGREE in polarity: at least one bare boolean read — an identifier or member access, never an invocation, which is a predicate rather than a capability flag — and at least one `x != <constant>`, the only form that negates into an exact-value pin (`== null` negates into a looser requirement and is outside the fault set). Consistently-polarised disjunctions, all-fault or all-capability, are counted and never reported; a negated `&&` is outside the population entirely. No same-receiver gate: it was measured to cost a real defect and remove no false positive. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether nullable reference types are enabled and not undermined by heavy `!` suppression.
Method: Roslyn compiler-options scan: NullableContextOptions per project; null-forgiving (!) suppression density per 1k syntax nodes. Deterministic, adoption plus suppression penalty.
This method contradicts itself about `valueFields`: line 2479 tests it for null before doing anything with it — the author's own statement that null is an input this code expects — but that `if` scopes only the block beneath it, and line 2508 then dereferences `valueFields` as `valueFields.HasValue` AFTER the block has closed, where the guard no longer applies. A null `valueFields` skips the guarded body and reaches that line anyway, throwing NullReferenceException on exactly the input the guard was written for. If the dereference belongs to the guarded work, move it inside the block; if `valueFields` truly cannot be null by then, the guard above is misleading and should go. — BTDB/ODBLayer/RelationQuery.cs:2508
This method contradicts itself about `grant`: line 148 tests it for null before doing anything with it — the author's own statement that null is an input this code expects — but that `if` scopes only the block beneath it, and line 153 then dereferences `grant` as `grant.Handle` AFTER the block has closed, where the guard no longer applies. A null `grant` skips the guarded body and reaches that line anyway, throwing NullReferenceException on exactly the input the guard was written for. If the dereference belongs to the guarded work, move it inside the block; if `grant` truly cannot be null by then, the guard above is misleading and should go. — BTDB.Replication/LeaseSessionController.cs:153
17/18 NRT-eligible project(s) enable <Nullable>enable</Nullable> (projects targeting a pre-C#-8 framework are excluded — NRTs aren't available there). NRTs catch a whole class of null-deref bugs at compile time.
~1.1 `!` suppressions per 1k syntax nodes — 293 suppression(s) across the 263457 syntax node(s) in code where nullable warnings are ENABLED, which is the only code a `!` can suppress anything in (a `!` under `#nullable disable` is inert and is not counted, and its file's nodes are not in the denominator). Each one tells the compiler to trust you about null, suppressing the very safety NRTs provide. Many are correct: each is a claim the checker could not verify, and it is wrong only where the value can in fact be missing, so review the densest places first.
What to do
Where a method null-tests a symbol and then uses it after the guarded block closes, move the trailing work inside the block — the guard skips its body on null, it does not stop the method.
Enable <Nullable>enable</Nullable> across all projects and resolve warnings rather than suppressing with `!`.
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 — 5 check(s) recorded observations but carry no score
These checks ran and found something, but they do not carry a score — either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.
D36 Supply-chain Provenance & Signing — 1 observation(s) recorded · The CI pipeline publishes no artifact — no package publish, container push or release with files to download. Supply-chain provenance, signing and an SBOM describe a PUBLISHED artifact for the people who obtain it, so there is nothing to attest here; a deployment of the service itself publishes nothing for anyone else to verify. Add them to the release pipeline when this repo starts publishing artifacts (a package, a container image, or a release with downloadable files). Build integrity and workflow-token hygiene are reported below: they describe what the CI runs and the token it runs with, neither of which is affected by whether the pipeline ships an artifact.
SC1 Supply-chain hygiene — 24 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X10 Duplicated predicate — 39 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X6 Hand-rolled structured-format parsing — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X7 Silent fallback defaults — 21 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 2 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 — Repo shows no audit-logging mechanism (IAuditable, an immutable audit log, an EF SaveChanges interceptor) for sensitive changes — absence of evidence is not evidence of a working control. Record an audit trail in code (or document where it lives) so this dimension can be scored.
C5 Data-Subject Rights — Repo shows no corroborated data-subject-rights mechanism (erasure / export-portability / consent) tied to a subject id or GDPR vocabulary — absence of evidence is not evidence of a working control. Implement erasure, data export/portability and consent tracking over the subject's records.
Not included — 34 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.
AX4 Dependency direction — not applicable to a CQRS architecture (the inward-dependency rule is for layered/clean styles)
AX7 Slice cohesion — not applicable — not a vertical-slice architecture
AX9 CQS / query purity — 3 query handlers detected, but none of their entry-point bodies could be walked — the query-purity oracle recognises a value-returning Execute/Handle/Consume (±Async) entry point or one that implements the classifying handler interface's member, and this codebase's handlers were classified but never read. This is an engine limitation, not a finding about the repository.
AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
AXR1 Runtime accessibility — the service exited before it opened a port — `ASPNETCORE_URLS=http://127.0.0.1:0 ASPNETCORE_ENVIRONMENT=Development dotnet run --no-build --no-launch-profile --project 'BTDB.SourceGenerator.Sample.csproj'`: K3rdPartyDependency
Ok
Hello
(42, Hello); runtime evidence skipped (launch chosen because BTDB.SourceGenerator.Sample/BTDB.SourceGenerator.Sample.csproj is a Microsoft.NET.Sdk.Web project) This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
D16 Bus Factor — single-maintainer repository — bus factor is not applicable
D25 ADR Conformance — no ADRs to check
D32 Data Compliance (PII/GDPR) — 132 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
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.
D42 Runtime Threat Enforcement — The repository ships application workloads but no cluster-governance resources (CRDs, admission webhooks, or a committed policy engine). Runtime threat-detection (Falco/Tetragon) and admission control (Kyverno/OPA-Gatekeeper/PodSecurity) are cluster-OPERATOR controls owned by the platform, not shipped by an application repo/chart — nothing for this repo to assess.
D7 Architectural Integrity — no checkable ADRs and no dependency cycles — architectural integrity not assessed
D8 Code Coverage — Coverage not measured — no coverage collector is wired up
DM1 Domain Modelling — not scored — this repository shows only 1 of the 3 signals this lens looks for (12 value object(s))
ED1 Event-Driven — applicable but not scored (2 of 3 signals for this style — below the bar we score at): 5 event handler(s); 13 CQRS handler(s)
ED5 Idempotency — not scored — 56 of 68 retry-prone mutations could not be classified (no visible guard and no positive evidence of a double-applied effect)
ES1 Event Sourcing — not scored — this repository shows only 1 of the 3 signals this lens looks for (an append-only event-store seam (IEventStore/Append-of-events))
P12 CI test-gate honesty — Reported, not scored — this card publishes what the CI gate does with the test inventory rather than grading it. The findings above are its output.
P8 Schema migrations — no EF Core usage detected
P9 Domain vs controller coverage — coverage not measured: this check compares the coverage of the analyzer's own test run across the domain and web layers, and that run measured none here — Test coverage (D8) says why
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.
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
X23 Unguarded diagnostic materialisation — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X24 Document value interpolated into markup unescaped — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X32 Type resolved by simple name across every loaded assembly — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X4 Structured logging — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
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.
EmptyCatchBlock BTDB.BackendActions/ActionWorker.cs:85— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock BTDB.LSM.Azure/AzureLsmStorage.cs:208— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock BTDB.LSM.Azure/AzureLsmStorage.cs:243— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock BTDB.LSM/Format/LsmReadThreads.cs:36— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock BTDB.LSM/Format/Table.cs:541— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock BTDB.LSM/Storage/FileSystemLsmStorage.cs:190— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock BTDB.Replication.Azure/AzureLeaderStorage.cs:83— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock BTDB.Replication.Azure/AzureReplicationStorage.cs:349— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock BTDB.Replication.Azure/AzureReplicationStorage.cs:570— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock BTDB.Replication.Azure/AzureReplicationStorage.cs:571— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock BTDB.Replication.EventSourcing/EventPublisher.cs:536— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock BTDB.Replication/EventLog/EventLogService.cs:566— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock BTDB.Replication/EventLog/EventLogService.cs:784— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock BTDB.Replication/EventLog/EventLogService.cs:936— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock BTDB.Replication/EventLog/EventLogService.cs:1006— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock BTDB.Replication/EventLog/EventLogStorageReader.cs:225— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock BTDB.Replication/ReplicationApplicationData.cs:90— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock BTDB.Replication/ReplicationFileSet.Collection.cs:402— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock BTDB.Replication/ReplicationLeadership.cs:191— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock BTDB.Replication/ReplicationNodeCoordinator.cs:186— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock BTDB.Replication/ReplicationNodeCoordinator.cs:459— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock BTDB.Replication/ReplicationNodeCoordinator.cs:772— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock BTDB.Replication/ReplicationTimeouts.cs:13— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock BTDB.SourceGenerator/Main.cs:2951— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock BTDB/ChunkCache/DiskChunkCache.cs:400— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
NoWarnInCsproj BTDB/BTDB.csproj:19— 1701 — this warning is switched off for the WHOLE project, in every file it builds, including code written years from now: nothing at the call site records that the rule was ever silenced, so the next reader has no reason to look here. Fix what the rule is reporting and drop the code from the list, or — if some occurrences really are legitimate — narrow the suppression to those sites and give each one its reason, so the rule keeps protecting the rest of the project.
NoWarnInCsproj BTDB.AzureStorage/BTDB.AzureStorage.csproj:19— 1701 — this warning is switched off for the WHOLE project, in every file it builds, including code written years from now: nothing at the call site records that the rule was ever silenced, so the next reader has no reason to look here. Fix what the rule is reporting and drop the code from the list, or — if some occurrences really are legitimate — narrow the suppression to those sites and give each one its reason, so the rule keeps protecting the rest of the project.
NoWarnInCsproj BTDBTest/BTDBTest.csproj:6— 1701 — this warning is switched off for the WHOLE project, in every file it builds, including code written years from now: nothing at the call site records that the rule was ever silenced, so the next reader has no reason to look here. Fix what the rule is reporting and drop the code from the list, or — if some occurrences really are legitimate — narrow the suppression to those sites and give each one its reason, so the rule keeps protecting the rest of the project.
NoWarnInCsproj BTDB/BTDB.csproj:19— 1702 — this warning is switched off for the WHOLE project, in every file it builds, including code written years from now: nothing at the call site records that the rule was ever silenced, so the next reader has no reason to look here. Fix what the rule is reporting and drop the code from the list, or — if some occurrences really are legitimate — narrow the suppression to those sites and give each one its reason, so the rule keeps protecting the rest of the project.
NoWarnInCsproj BTDB.AzureStorage/BTDB.AzureStorage.csproj:19— 1702 — this warning is switched off for the WHOLE project, in every file it builds, including code written years from now: nothing at the call site records that the rule was ever silenced, so the next reader has no reason to look here. Fix what the rule is reporting and drop the code from the list, or — if some occurrences really are legitimate — narrow the suppression to those sites and give each one its reason, so the rule keeps protecting the rest of the project.
NoWarnInCsproj BTDBTest/BTDBTest.csproj:6— 1702 — this warning is switched off for the WHOLE project, in every file it builds, including code written years from now: nothing at the call site records that the rule was ever silenced, so the next reader has no reason to look here. Fix what the rule is reporting and drop the code from the list, or — if some occurrences really are legitimate — narrow the suppression to those sites and give each one its reason, so the rule keeps protecting the rest of the project.
NoWarnInCsproj BTDB/BTDB.csproj:19— 1720 — this warning is switched off for the WHOLE project, in every file it builds, including code written years from now: nothing at the call site records that the rule was ever silenced, so the next reader has no reason to look here. Fix what the rule is reporting and drop the code from the list, or — if some occurrences really are legitimate — narrow the suppression to those sites and give each one its reason, so the rule keeps protecting the rest of the project.
NoWarnInCsproj BTDB.AzureStorage/BTDB.AzureStorage.csproj:19— 1720 — this warning is switched off for the WHOLE project, in every file it builds, including code written years from now: nothing at the call site records that the rule was ever silenced, so the next reader has no reason to look here. Fix what the rule is reporting and drop the code from the list, or — if some occurrences really are legitimate — narrow the suppression to those sites and give each one its reason, so the rule keeps protecting the rest of the project.
NoWarnInCsproj BTDBTest/BTDBTest.csproj:6— 1720 — this warning is switched off for the WHOLE project, in every file it builds, including code written years from now: nothing at the call site records that the rule was ever silenced, so the next reader has no reason to look here. Fix what the rule is reporting and drop the code from the list, or — if some occurrences really are legitimate — narrow the suppression to those sites and give each one its reason, so the rule keeps protecting the rest of the project.
NoWarnInCsproj BTDB.SourceGenerator/BTDB.SourceGenerator.csproj:24— NU5128 — this warning is switched off for the WHOLE project, including builds years from now. It is raised by the build itself — the packaging, restore or SDK step — about the project as a whole, not by the compiler or an analyzer at a line of code, so there is no call site to narrow it to and no per-site directive that could carry a reason: this element is the only place the decision can be recorded. Say WHY here, in a comment on the entry, or fix what the rule is reporting and drop the code from the list.
NoWarnInCsproj BTDBTest/BTDBTest.csproj:6— CS0219 — this warning is switched off for the WHOLE project, in every file it builds, including code written years from now: nothing at the call site records that the rule was ever silenced, so the next reader has no reason to look here. Fix what the rule is reporting and drop the code from the list, or — if some occurrences really are legitimate — narrow the suppression to those sites and give each one its reason, so the rule keeps protecting the rest of the project.
NoWarnInCsproj BTDBTest/BTDBTest.csproj:6— CS8714 — this warning is switched off for the WHOLE project, in every file it builds, including code written years from now: nothing at the call site records that the rule was ever silenced, so the next reader has no reason to look here. Fix what the rule is reporting and drop the code from the list, or — if some occurrences really are legitimate — narrow the suppression to those sites and give each one its reason, so the rule keeps protecting the rest of the project.
FileScopedPragmaDisable BTDB.SourceGenerator/BackendActionsGeneration.cs:9— #pragma warning disable CS8620 // Params ReadOnlySpan<T> nullability warnings for direct arguments. — the disable has no matching restore anywhere in this file, so it does not end with the construct that needed it: it runs to the end of the file and silences the rule for everything written below, including code added years later that nobody weighed against it. Close it with the matching restore directive immediately after the construct it covers — that alone turns a standing exemption into a scoped one — or fix the cause and drop the directive entirely.
FileScopedPragmaDisable BTDB.SourceGenerator/RelationQueryInterceptorGenerator.cs:10— #pragma warning disable CS8620 // Params ReadOnlySpan<T> nullability warnings for direct arguments. — the disable has no matching restore anywhere in this file, so it does not end with the construct that needed it: it runs to the end of the file and silences the rule for everything written below, including code added years later that nobody weighed against it. Close it with the matching restore directive immediately after the construct it covers — that alone turns a standing exemption into a scoped one — or fix the cause and drop the directive entirely.
FileScopedPragmaDisable BTDB/KVDBLayer/Implementation/InMemoryFileCollection.cs:17— #pragma warning disable 420 — the disable has no matching restore anywhere in this file, so it does not end with the construct that needed it: it runs to the end of the file and silences the rule for everything written below, including code added years later that nobody weighed against it. Close it with the matching restore directive immediately after the construct it covers — that alone turns a standing exemption into a scoped one — or fix the cause and drop the directive entirely.
FileScopedPragmaDisable BTDB/KVDBLayer/Implementation/InMemoryReplicationFileStorage.cs:19— #pragma warning disable 420 — the disable has no matching restore anywhere in this file, so it does not end with the construct that needed it: it runs to the end of the file and silences the rule for everything written below, including code added years later that nobody weighed against it. Close it with the matching restore directive immediately after the construct it covers — that alone turns a standing exemption into a scoped one — or fix the cause and drop the directive entirely.
FileScopedPragmaDisable BTDB/KVDBLayer/Implementation/OnDiskFileCollection.cs:25— #pragma warning disable 420 — the disable has no matching restore anywhere in this file, so it does not end with the construct that needed it: it runs to the end of the file and silences the rule for everything written below, including code added years later that nobody weighed against it. Close it with the matching restore directive immediately after the construct it covers — that alone turns a standing exemption into a scoped one — or fix the cause and drop the directive entirely.
FileScopedPragmaDisable BTDB/KVDBLayer/Implementation/OnDiskMemoryMappedFileCollection.cs:24— #pragma warning disable 420 — the disable has no matching restore anywhere in this file, so it does not end with the construct that needed it: it runs to the end of the file and silences the rule for everything written below, including code added years later that nobody weighed against it. Close it with the matching restore directive immediately after the construct it covers — that alone turns a standing exemption into a scoped one — or fix the cause and drop the directive entirely.
FileScopedPragmaDisable BTDB/Reactive/FastBehaviourSubject.cs:38— #pragma warning disable 420 — the disable has no matching restore anywhere in this file, so it does not end with the construct that needed it: it runs to the end of the file and silences the rule for everything written below, including code added years later that nobody weighed against it. Close it with the matching restore directive immediately after the construct it covers — that alone turns a standing exemption into a scoped one — or fix the cause and drop the directive entirely.
FileScopedPragmaDisable BTDB/Reactive/FastSubject.cs:21— #pragma warning disable 420 — the disable has no matching restore anywhere in this file, so it does not end with the construct that needed it: it runs to the end of the file and silences the rule for everything written below, including code added years later that nobody weighed against it. Close it with the matching restore directive immediately after the construct it covers — that alone turns a standing exemption into a scoped one — or fix the cause and drop the directive entirely.
WriteOnlyPrivateField BTDB/IL/Caching/CachingILDynamicMethodWithThis.cs:58— private string _name — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
WriteOnlyPrivateField BTDB/ODBLayer/ODBLazyUlongList.cs:22— private IInternalObjectDBTransaction _tr — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
WriteOnlyPrivateField BTDBTest/EventStore2Test.cs:657— private int _x — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
WriteOnlyPrivateField ODbDump/Visitor/ToConsoleFastVisitor.cs:13— private StringBuilder _builder — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
Namespace dependency cycle BTDB/StreamLayer/FileCollectionFileReader.cs:5— The namespaces BTDB.BTreeLib ↔ BTDB.KVDBLayer ↔ BTDB.KVDBLayer.BTreeMem ↔ BTDB.StreamLayer depend on each other. The lightest dependency in the cycle is BTDB.StreamLayer → BTDB.KVDBLayer (BTDB.StreamLayer.FileCollectionFileReader → BTDB.KVDBLayer.IFileCollectionFile, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface.
Namespace dependency cycle BTDB/IOC/DependencyAttribute.cs:2— The namespaces BTDB.EventStoreLayer ↔ BTDB.FieldHandler ↔ BTDB.IOC ↔ BTDB.Interpreter ↔ BTDB.ODBLayer ↔ BTDB.Serialization depend on each other. The lightest dependency in the cycle is BTDB.IOC → BTDB.ODBLayer (BTDB.IOC.DependencyAttribute → BTDB.ODBLayer.NotStoredAttribute, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface.
Namespace dependency cycle BTDB.LSM/Engine/LevelComponent.cs:3— The namespaces BTDB.LSM.Engine ↔ BTDB.LSM.Format depend on each other. The lightest dependency in the cycle is BTDB.LSM.Engine → BTDB.LSM.Format (BTDB.LSM.Engine.LevelComponent → BTDB.LSM.Format.TableReader, 10 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface.
Unfinished stub — throws a "not implemented" exception BTDB.Replication/IReplicationStorage.cs:39— `ScheduleDeletionAsync` is a shipped member whose body only throws — and it is REACHED: BTDB.Replication/RemoteMaintenance.cs:60 references it. This is not dead surface that can be deleted — anything taking that path throws at runtime. Implement the member, or remove the code that reaches it.
Unfinished stub — throws a "not implemented" exception BTDB.Replication/IReplicationStorage.cs:41— `CancelDeletionAsync` is a shipped member whose body only throws — and it is REACHED: BTDB.Replication/RemoteMaintenance.cs:55 references it. This is not dead surface that can be deleted — anything taking that path throws at runtime. Implement the member, or remove the code that reaches it.
Dead code: LoadVector BTDB/Buffer/PackUnpack.cs:609— Method LoadVector — Roslyn's SymbolFinder walked every project the solution loads, including BTDB, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
Dead code: FreqStats BTDB/KVDBLayer/Implementation/BTreeKeyValueDB.cs:1809— NamedType FreqStats — Roslyn's SymbolFinder walked every project the solution loads, including BTDB, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
Dead code: ThrowModifiedDuringEnum BTDB/ODBLayer/ODBSet.cs:59— Method ThrowModifiedDuringEnum — Roslyn's SymbolFinder walked every project the solution loads, including BTDB, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
Dead code: GetProgramId BTDBTest/CommandHistoryNestedPolymorphicListRegressionTest.cs:54— Method GetProgramId — Roslyn's SymbolFinder walked every project the solution loads, including BTDBTest, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
Dead code: GivenEventsMetadataFilePath BTDBTest/EventStore2Test.cs:22— Field GivenEventsMetadataFilePath — Roslyn's SymbolFinder walked every project the solution loads, including BTDBTest, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
Dead code: GivenEventsDataFilePath BTDBTest/EventStore2Test.cs:23— Field GivenEventsDataFilePath — Roslyn's SymbolFinder walked every project the solution loads, including BTDBTest, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
Dead code: DataFileSeparator BTDBTest/EventStore2Test.cs:24— Field DataFileSeparator — Roslyn's SymbolFinder walked every project the solution loads, including BTDBTest, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
Dead code: PrivateProperty BTDBTest/ILExtensionsTest.cs:27— Property PrivateProperty — Roslyn's SymbolFinder walked every project the solution loads, including BTDBTest, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
Dead code: Factorial BTDBTest/ILExtensionsTest.cs:178— Method Factorial — Roslyn's SymbolFinder walked every project the solution loads, including BTDBTest, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
Dead code: CanChangeKeySuffixAndDataAreCorrectlyReplayedFromTrl BTDBTest/KeyValueDBFileTestBase.cs:967— Method CanChangeKeySuffixAndDataAreCorrectlyReplayedFromTrl — Roslyn's SymbolFinder walked every project the solution loads, including BTDBTest, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
Dead code: IdentityUser BTDBTest/ObjectDbTableTest.cs:1518— NamedType IdentityUser — Roslyn's SymbolFinder walked every project the solution loads, including BTDBTest, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
Dead code: ProgrammerIsWarnedWhenWorkingWithDerivedType BTDBTest/ObjectDbTableTest.cs:1551— Method ProgrammerIsWarnedWhenWorkingWithDerivedType — Roslyn's SymbolFinder walked every project the solution loads, including BTDBTest, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
Dead code: ContactGroupRelationDb BTDBTest/ObjectDbTableTest.cs:2412— NamedType ContactGroupRelationDb — Roslyn's SymbolFinder walked every project the solution loads, including BTDBTest, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
Dead code: CreateArrayRange BTDBTest/RoaringBitmapsTest.cs:679— Method CreateArrayRange — Roslyn's SymbolFinder walked every project the solution loads, including BTDBTest, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
Dead code: InDebugConstructorThrowsOnDuplicateKeys BTDBTest/Utf16Utf8DictionaryTest.cs:171— Method InDebugConstructorThrowsOnDuplicateKeys — Roslyn's SymbolFinder walked every project the solution loads, including BTDBTest, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
Dead code: VerifyTestConfiguration BTDBTest/VerifyTestConfiguration.cs:7— NamedType VerifyTestConfiguration — Roslyn's SymbolFinder walked every project the solution loads, including BTDBTest, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
Dead code: AutoSplitSizeTest SimpleTester/AutoSplitSizeTest.cs:12— NamedType AutoSplitSizeTest — Roslyn's SymbolFinder walked every project the solution loads, including SimpleTester, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
Dead code: BigBonTest SimpleTester/BigBonTest.cs:111— NamedType BigBonTest — Roslyn's SymbolFinder walked every project the solution loads, including SimpleTester, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
Dead code: ClassGenerator SimpleTester/ClassGenerator.cs:7— NamedType ClassGenerator — Roslyn's SymbolFinder walked every project the solution loads, including SimpleTester, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
Dead code: CompactionStressTest SimpleTester/CompactionStressTest.cs:10— NamedType CompactionStressTest — Roslyn's SymbolFinder walked every project the solution loads, including SimpleTester, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
Dead code: CompactorLatencyMeasurement SimpleTester/CompactorLatencyMeasurement.cs:10— NamedType CompactorLatencyMeasurement — Roslyn's SymbolFinder walked every project the solution loads, including SimpleTester, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
Dead code: EventLayer2TestWithALotOfClasses SimpleTester/EventLayer2TestWithALotOfClasses.cs:9— NamedType EventLayer2TestWithALotOfClasses — Roslyn's SymbolFinder walked every project the solution loads, including SimpleTester, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
Dead code: EventStorageSpeedTest SimpleTester/EventStorageSpeedTest.cs:12— NamedType EventStorageSpeedTest — Roslyn's SymbolFinder walked every project the solution loads, including SimpleTester, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
Dead code: GatherSpeedTest SimpleTester/GatherSpeedTest.cs:31— NamedType GatherSpeedTest — Roslyn's SymbolFinder walked every project the solution loads, including SimpleTester, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
Dead code: IsUserSpecific SimpleTester/InKeyValueStressTest.cs:28— Method IsUserSpecific — Roslyn's SymbolFinder walked every project the solution loads, including SimpleTester, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
MethodTooLong: Interpreter.Loop BTDB/Interpreter/Interpreter.cs:1537— MethodTooLong — Loop runs 701 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 601 over it, 7.01× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: DefaultTypeConverterFactory.GetConverter BTDB/Serialization/DefaultTypeConverterFactory.cs:19— MethodTooLong — GetConverter runs 524 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 424 over it, 5.24× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: SourceGenerator.GenerateRelationInterfaceFactory BTDB.SourceGenerator/Main.cs:4570— MethodTooLong — GenerateRelationInterfaceFactory runs 503 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 403 over it, 5.03× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: SourceGenerator.GenerateClassFactory BTDB.SourceGenerator/Main.cs:3536— MethodTooLong — GenerateClassFactory runs 440 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 340 over it, 4.40× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: BonSerializerFactory.CreateDeserializerForType BTDB/Serialization/BonSerializer.cs:951— MethodTooLong — CreateDeserializerForType runs 402 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 302 over it, 4.02× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Program.Main ODbDump/Program.cs:19— MethodTooLong — Main runs 376 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 276 over it, 3.76× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Interpreter.RunCodeOp BTDB/Interpreter/Interpreter.cs:3060— MethodTooLong — RunCodeOp runs 345 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 245 over it, 3.45× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: SourceGenerator.GenerationInfoForClass BTDB.SourceGenerator/Main.cs:1755— MethodTooLong — GenerationInfoForClass runs 318 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 218 over it, 3.18× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: SourceGenerator.DetectErrorsInMethods BTDB.SourceGenerator/Main.cs:291— MethodTooLong — DetectErrorsInMethods runs 315 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 215 over it, 3.15× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: RelationInfo.CreateBytesToSKSaver BTDB/ODBLayer/RelationInfo.cs:1573— MethodTooLong — CreateBytesToSKSaver runs 307 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 207 over it, 3.07× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: BasicSerializersFactory.BasicSerializersFactory(…) BTDB/FieldHandler/BasicSerializersFactory.cs:13— MethodTooLong — BasicSerializersFactory(…) runs 293 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 193 over it, 2.93× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: EventLogStorageScreening.RunAsync DBBenchmark/EventLog/EventLogStorageScreening.cs:23— MethodTooLong — RunAsync runs 281 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 181 over it, 2.81× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: InterpreterBuilder.DumpAsm BTDB/Interpreter/Interpreter.cs:837— MethodTooLong — DumpAsm runs 257 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 157 over it, 2.57× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: LsmStorageScreening.RunAsync DBBenchmark/LSM/LsmStorageScreening.cs:30— MethodTooLong — RunAsync runs 249 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 149 over it, 2.49× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: BonSerializerFactory.CreateSerializerForType BTDB/Serialization/BonSerializer.cs:187— MethodTooLong — CreateSerializerForType runs 219 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 119 over it, 2.19× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: ItemLoaderInfo.CreateLoader BTDB/ODBLayer/RelationInfo.cs:542— MethodTooLong — CreateLoader runs 212 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 112 over it, 2.12× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: BTreeKeyValueDB.LoadTransactionLogCore BTDB/KVDBLayer/Implementation/BTreeKeyValueDB.cs:1133— MethodTooLong — LoadTransactionLogCore runs 185 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 85 over it, 1.85× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: BTreeImpl12.Upsert BTDB/BTreeLib/BTreeImpl12.cs:1575— MethodTooLong — Upsert runs 173 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 73 over it, 1.73× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: ItemLoaderInfo.CreatePkLoader BTDB/ODBLayer/RelationInfo.cs:274— MethodTooLong — CreatePkLoader runs 167 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 67 over it, 1.67× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: SourceGenerator.Initialize BTDB.SourceGenerator/Main.cs:25— MethodTooLong — Initialize runs 162 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 62 over it, 1.62× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: SplitInserter.Run BTDB/BTreeLib/BTreeImpl12.cs:2249— MethodTooLong — Run runs 160 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 60 over it, 1.60× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: TableInfo.CreateLoader BTDB/ODBLayer/TableInfo.cs:600— MethodTooLong — CreateLoader runs 159 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 59 over it, 1.59× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: BTreeKeyValueDB.LoadKeyIndex BTDB/KVDBLayer/Implementation/BTreeKeyValueDB.cs:818— MethodTooLong — LoadKeyIndex runs 151 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 51 over it, 1.51× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: DefaultTypeConverterFactory.GetIDictionary2DictionaryConverter BTDB/Serialization/DefaultTypeConverterFactory.cs:962— MethodTooLong — GetIDictionary2DictionaryConverter runs 146 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 46 over it, 1.46× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: ReplicationNodeCoordinator.StepAsync BTDB.Replication/ReplicationNodeCoordinator.cs:244— MethodTooLong — StepAsync runs 142 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 42 over it, 1.42× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
Hotspot: BTDB.SourceGenerator/Main.cs BTDB.SourceGenerator/Main.cs:4570— BTDB.SourceGenerator/Main.cs changed 60 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 124 in SourceGenerator.GenerateRelationInterfaceFactory at line 4570. 3 of those changes were fix/bug commits, and the other 57 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-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 15:30:43 +01:00' --until='2026-11-12 15:30:43 +01:00' --full-history --no-merges -- BTDB.SourceGenerator/Main.cs`: 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: BTDB/KVDBLayer/Implementation/BTreeKeyValueDB.cs BTDB/KVDBLayer/Implementation/BTreeKeyValueDB.cs:1133— BTDB/KVDBLayer/Implementation/BTreeKeyValueDB.cs changed 28 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 79 in BTreeKeyValueDB.LoadTransactionLogCore at line 1133. 3 of those changes were fix/bug commits, and the other 25 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 15:30:43 +01:00' --until='2026-11-12 15:30:43 +01:00' --full-history --no-merges -- BTDB/KVDBLayer/Implementation/BTreeKeyValueDB.cs`: 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: BTDB/Serialization/BonSerializer.cs BTDB/Serialization/BonSerializer.cs:951— BTDB/Serialization/BonSerializer.cs changed 19 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 98 in BonSerializerFactory.CreateDeserializerForType at line 951. 2 of those changes were fix/bug commits, and the other 17 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-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 15:30:43 +01:00' --until='2026-11-12 15:30:43 +01:00' --full-history --no-merges -- BTDB/Serialization/BonSerializer.cs`: 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: BTDB.Replication/ReplicationNodeCoordinator.cs BTDB.Replication/ReplicationNodeCoordinator.cs:244— BTDB.Replication/ReplicationNodeCoordinator.cs changed 32 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 58 in ReplicationNodeCoordinator.StepAsync at line 244. 3 of those changes were fix/bug commits, and the other 29 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-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 15:30:43 +01:00' --until='2026-11-12 15:30:43 +01:00' --full-history --no-merges -- BTDB.Replication/ReplicationNodeCoordinator.cs`: 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: BTDB/Interpreter/Interpreter.cs BTDB/Interpreter/Interpreter.cs:1537— BTDB/Interpreter/Interpreter.cs changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 214 in Interpreter.Loop at line 1537. 2 of those changes were fix/bug commits, and the other 6 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-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 15:30:43 +01:00' --until='2026-11-12 15:30:43 +01:00' --full-history --no-merges -- BTDB/Interpreter/Interpreter.cs`: 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: BTDB/ODBLayer/RelationQuery.cs BTDB/ODBLayer/RelationQuery.cs:3702— BTDB/ODBLayer/RelationQuery.cs changed 15 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 48 in RelationQueryCompiler.Simplify at line 3702. 1 of those changes was a fix/bug commit, and the other 14 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-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 15:30:43 +01:00' --until='2026-11-12 15:30:43 +01:00' --full-history --no-merges -- BTDB/ODBLayer/RelationQuery.cs`: 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: BTDB/ODBLayer/RelationInfo.cs BTDB/ODBLayer/RelationInfo.cs:542— BTDB/ODBLayer/RelationInfo.cs changed 15 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 47 in ItemLoaderInfo.CreateLoader at line 542. 3 of those changes were fix/bug commits, and the other 12 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 15:30:43 +01:00' --until='2026-11-12 15:30:43 +01:00' --full-history --no-merges -- BTDB/ODBLayer/RelationInfo.cs`: 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: BTDB.BackendActions/ActionPlanner.cs BTDB.BackendActions/ActionPlanner.cs:432— BTDB.BackendActions/ActionPlanner.cs changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 43 in ActionPlanner.Exchange at line 432. 4 of those changes were fix/bug commits, and the other 7 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-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 15:30:43 +01:00' --until='2026-11-12 15:30:43 +01:00' --full-history --no-merges -- BTDB.BackendActions/ActionPlanner.cs`: 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: BTDB.Replication/CanonicalTrlPublisher.cs BTDB.Replication/CanonicalTrlPublisher.cs:159— BTDB.Replication/CanonicalTrlPublisher.cs changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 30 in CanonicalTrlPublisher.PublishCoreAsync at line 159. 1 of those changes was a fix/bug commit, and the other 12 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 15:30:43 +01:00' --until='2026-11-12 15:30:43 +01:00' --full-history --no-merges -- BTDB.Replication/CanonicalTrlPublisher.cs`: 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: DBBenchmark/Program.cs DBBenchmark/Program.cs:8— DBBenchmark/Program.cs changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 33 in Program.Main at line 8. 1 of those changes was a fix/bug commit, and the other 10 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-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 15:30:43 +01:00' --until='2026-11-12 15:30:43 +01:00' --full-history --no-merges -- DBBenchmark/Program.cs`: 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: BTDB.Replication/ReplicationFileSet.cs BTDB.Replication/ReplicationFileSet.cs:133— BTDB.Replication/ReplicationFileSet.cs changed 16 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in ReplicationFileSet.DownloadAsync at line 133. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 15:30:43 +01:00' --until='2026-11-12 15:30:43 +01:00' --full-history --no-merges -- BTDB.Replication/ReplicationFileSet.cs`: 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: BTDB.Replication.Http/HttpReplicationPeerTransport.cs BTDB.Replication.Http/HttpReplicationPeerTransport.cs:80— BTDB.Replication.Http/HttpReplicationPeerTransport.cs changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 35 in HttpReplicationPeerTransport.HandleAsync at line 80. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 15:30:43 +01:00' --until='2026-11-12 15:30:43 +01:00' --full-history --no-merges -- BTDB.Replication.Http/HttpReplicationPeerTransport.cs`: 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: AotQuerySmoke/Program.cs AotQuerySmoke/Program.cs:51— AotQuerySmoke/Program.cs changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 34 in Program.Main at line 51. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 15:30:43 +01:00' --until='2026-11-12 15:30:43 +01:00' --full-history --no-merges -- AotQuerySmoke/Program.cs`: 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: BTDB.Replication/ReplicationPeerTransport.cs BTDB.Replication/ReplicationPeerTransport.cs:42— BTDB.Replication/ReplicationPeerTransport.cs changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in ReplicationPeerPoll.Validate at line 42. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 15:30:43 +01:00' --until='2026-11-12 15:30:43 +01:00' --full-history --no-merges -- BTDB.Replication/ReplicationPeerTransport.cs`: 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: BTDB.Replication.EventSourcing/EventPublisher.cs BTDB.Replication.EventSourcing/EventPublisher.cs:268— BTDB.Replication.EventSourcing/EventPublisher.cs changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 44 in EventPublisher.RunAsync at line 268. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 15:30:43 +01:00' --until='2026-11-12 15:30:43 +01:00' --full-history --no-merges -- BTDB.Replication.EventSourcing/EventPublisher.cs`: 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: BTDB.Replication.Azure/AzureReplicationStorage.cs BTDB.Replication.Azure/AzureReplicationStorage.cs:121— BTDB.Replication.Azure/AzureReplicationStorage.cs changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in AzureReplicationStorage.WriteAsync at line 121. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 15:30:43 +01:00' --until='2026-11-12 15:30:43 +01:00' --full-history --no-merges -- BTDB.Replication.Azure/AzureReplicationStorage.cs`: 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: BTDB/IOC/ContainerImpl.cs BTDB/IOC/ContainerImpl.cs:590— BTDB/IOC/ContainerImpl.cs changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 35 in ContainerImpl.CreateFactoryFromRegistration at line 590. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 15:30:43 +01:00' --until='2026-11-12 15:30:43 +01:00' --full-history --no-merges -- BTDB/IOC/ContainerImpl.cs`: 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: BTDB.Replication/EventLog/EventLogOptions.cs BTDB.Replication/EventLog/EventLogOptions.cs:120— BTDB.Replication/EventLog/EventLogOptions.cs changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in EventLogOptions.Validate at line 120. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 15:30:43 +01:00' --until='2026-11-12 15:30:43 +01:00' --full-history --no-merges -- BTDB.Replication/EventLog/EventLogOptions.cs`: 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: BTDB/ODBLayer/RelationBuilder.cs BTDB/ODBLayer/RelationBuilder.cs:257— BTDB/ODBLayer/RelationBuilder.cs changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in RelationBuilder.CreateVersionInfoByReflection at line 257. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 15:30:43 +01:00' --until='2026-11-12 15:30:43 +01:00' --full-history --no-merges -- BTDB/ODBLayer/RelationBuilder.cs`: 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: BTDB.Replication/LeadershipActivation.cs BTDB.Replication/LeadershipActivation.cs:95— BTDB.Replication/LeadershipActivation.cs changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in LeadershipActivation.ValidateAsync at line 95. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 15:30:43 +01:00' --until='2026-11-12 15:30:43 +01:00' --full-history --no-merges -- BTDB.Replication/LeadershipActivation.cs`: 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: BTDB.BackendActions/ActionWorker.cs BTDB.BackendActions/ActionWorker.cs:206— BTDB.BackendActions/ActionWorker.cs changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in Execution.RunAsync at line 206. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 15:30:43 +01:00' --until='2026-11-12 15:30:43 +01:00' --full-history --no-merges -- BTDB.BackendActions/ActionWorker.cs`: 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: Releaser/Releaser/Program.cs Releaser/Releaser/Program.cs:22— Releaser/Releaser/Program.cs changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 32 in Program.MainAsync at line 22. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 15:30:43 +01:00' --until='2026-11-12 15:30:43 +01:00' --full-history --no-merges -- Releaser/Releaser/Program.cs`: 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: BTDB.Replication/CheckpointPublisher.cs BTDB.Replication/CheckpointPublisher.cs:31— BTDB.Replication/CheckpointPublisher.cs changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 28 in CheckpointPublisher.PublishAsync at line 31. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 15:30:43 +01:00' --until='2026-11-12 15:30:43 +01:00' --full-history --no-merges -- BTDB.Replication/CheckpointPublisher.cs`: 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: BTDB.Replication/TrlPrefixComparer.cs BTDB.Replication/TrlPrefixComparer.cs:40— BTDB.Replication/TrlPrefixComparer.cs changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in TrlPrefixComparer.CompareAsync at line 40. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 15:30:43 +01:00' --until='2026-11-12 15:30:43 +01:00' --full-history --no-merges -- BTDB.Replication/TrlPrefixComparer.cs`: 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: BTDB.Replication/EventLog/EventLogFormat.cs BTDB.Replication/EventLog/EventLogFormat.cs:249— BTDB.Replication/EventLog/EventLogFormat.cs changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 32 in EventLogFormat.Parse at line 249. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 15:30:43 +01:00' --until='2026-11-12 15:30:43 +01:00' --full-history --no-merges -- BTDB.Replication/EventLog/EventLogFormat.cs`: 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.
TooManyMethods: SourceGenerator BTDB.SourceGenerator/Main.cs— TooManyMethods — 3759 significant lines (blank, comment-only and punctuation-only lines excluded), 136 methods. The bar is 30 methods; this is 106 over it, 4.53× the bar. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
TooManyMethods: BTreeKeyValueDB BTDB/KVDBLayer/Implementation/BTreeKeyValueDB.cs— TooManyMethods — 1853 significant lines (blank, comment-only and punctuation-only lines excluded), 116 methods. The bar is 30 methods; this is 86 over it, 3.87× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: MemReader BTDB/StreamLayer/MemReader.cs— TooManyMethods — 883 significant lines (blank, comment-only and punctuation-only lines excluded), 107 methods. The bar is 30 methods; this is 77 over it, 3.57× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: LsmKeyValueDB BTDB.LSM/LsmKeyValueDB.cs— TooManyMethods — 1306 significant lines (blank, comment-only and punctuation-only lines excluded), 105 methods, declared across 7 files: BTDB.LSM/LsmKeyValueDB.cs (30), BTDB.LSM/LsmKeyValueDB.Background.cs (26), BTDB.LSM/LsmKeyValueDB.Lease.cs (15), BTDB.LSM/LsmKeyValueDB.Spill.cs (10), +3 more file(s). The bar is 30 methods; this is 75 over it, 3.50× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: RelationBuilder BTDB/ODBLayer/RelationBuilder.cs— TooManyMethods — 1460 significant lines (blank, comment-only and punctuation-only lines excluded), 87 methods. The bar is 30 methods; this is 57 over it, 2.90× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: MemWriter BTDB/StreamLayer/MemWriter.cs— TooManyMethods — 608 significant lines (blank, comment-only and punctuation-only lines excluded), 84 methods. The bar is 30 methods; this is 54 over it, 2.80× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: RelationQueryCompiler BTDB/ODBLayer/RelationQuery.cs— TooManyMethods — 1318 significant lines (blank, comment-only and punctuation-only lines excluded), 81 methods. The bar is 30 methods; this is 51 over it, 2.70× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: PackUnpack BTDB/Buffer/PackUnpack.cs— TooManyMethods — 683 significant lines (blank, comment-only and punctuation-only lines excluded), 75 methods. The bar is 30 methods; this is 45 over it, 2.50× the bar. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
TooManyMethods: RoaringBitmaps BTDB/Buffer/RoaringBitmaps.cs— TooManyMethods — 637 significant lines (blank, comment-only and punctuation-only lines excluded), 72 methods. The bar is 30 methods; this is 42 over it, 2.40× the bar. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
TooManyMethods: RelationDBManipulator BTDB/ODBLayer/RelationDBManipulator.cs— TooManyMethods — 1096 significant lines (blank, comment-only and punctuation-only lines excluded), 69 methods. The bar is 30 methods; this is 39 over it, 2.30× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Interpreter BTDB/Interpreter/Interpreter.cs— TooManyMethods — 1676 significant lines (blank, comment-only and punctuation-only lines excluded), 68 methods. The bar is 30 methods; this is 38 over it, 2.27× the bar. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
TooManyMethods: BTreeImpl12 BTDB/BTreeLib/BTreeImpl12.cs— TooManyMethods — 1451 significant lines (blank, comment-only and punctuation-only lines excluded), 64 methods. The bar is 30 methods; this is 34 over it, 2.13× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: RelationInfo BTDB/ODBLayer/RelationInfo.cs— TooManyMethods — 1211 significant lines (blank, comment-only and punctuation-only lines excluded), 62 methods. The bar is 30 methods; this is 32 over it, 2.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: ActionPlanner BTDB.BackendActions/ActionPlanner.cs— TooManyMethods — 694 significant lines (blank, comment-only and punctuation-only lines excluded), 57 methods. The bar is 30 methods; this is 27 over it, 1.90× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: ObjectDBTransaction BTDB/ODBLayer/ObjectDBTransaction.cs— TooManyMethods — 666 significant lines (blank, comment-only and punctuation-only lines excluded), 57 methods. The bar is 30 methods; this is 27 over it, 1.90× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: InterpreterBuilder BTDB/Interpreter/Interpreter.cs— TooManyMethods — 603 significant lines (blank, comment-only and punctuation-only lines excluded), 54 methods. The bar is 30 methods; this is 24 over it, 1.80× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: BackendActions BTDB.BackendActions/BackendActions.cs— TooManyMethods — 370 significant lines (blank, comment-only and punctuation-only lines excluded), 46 methods, declared across 3 files: BTDB.BackendActions/BackendActions.cs (36), BTDB.BackendActions/Monitoring.cs (6), BTDB.BackendActions/Import.cs (4). The bar is 30 methods; this is 16 over it, 1.53× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: NativeMemtable BTDB.LSM/Engine/NativeMemtable.cs— TooManyMethods — 327 significant lines (blank, comment-only and punctuation-only lines excluded), 46 methods. The bar is 30 methods; this is 16 over it, 1.53× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: StructList BTDB/Collections/StructList.cs— TooManyMethods — 245 significant lines (blank, comment-only and punctuation-only lines excluded), 46 methods. The bar is 30 methods; this is 16 over it, 1.53× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: RelationQueryBenchmark DBBenchmark/RelationQueryBenchmark.cs— TooManyMethods — 143 significant lines (blank, comment-only and punctuation-only lines excluded), 44 methods. The bar is 30 methods; this is 14 over it, 1.47× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: BonBuilder BTDB/Bon/Bon.cs— TooManyMethods — 393 significant lines (blank, comment-only and punctuation-only lines excluded), 43 methods. The bar is 30 methods; this is 13 over it, 1.43× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: ReplicationFileSet BTDB.Replication/ReplicationFileSet.Collection.cs— TooManyMethods — 405 significant lines (blank, comment-only and punctuation-only lines excluded), 42 methods, declared across 2 files: BTDB.Replication/ReplicationFileSet.Collection.cs (31), BTDB.Replication/ReplicationFileSet.cs (11). The bar is 30 methods; this is 12 over it, 1.40× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: ObjectDB BTDB/ODBLayer/ObjectDB.cs— TooManyMethods — 335 significant lines (blank, comment-only and punctuation-only lines excluded), 41 methods. The bar is 30 methods; this is 11 over it, 1.37× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: ContainerImpl BTDB/IOC/ContainerImpl.cs— TooManyMethods — 553 significant lines (blank, comment-only and punctuation-only lines excluded), 39 methods. The bar is 30 methods; this is 9 over it, 1.30× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: BTreeKeyValueDBCursor BTDB/KVDBLayer/Implementation/BTreeKeyValueDBCursor.cs— TooManyMethods — 437 significant lines (blank, comment-only and punctuation-only lines excluded), 38 methods. The bar is 30 methods; this is 8 over it, 1.27× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
Swallowed exception (empty catch) BTDB/ChunkCache/DiskChunkCache.cs:400— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) BTDB/ChunkCache/DiskChunkCache.cs:431— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) BTDB/EventStoreLayer/TypeSerializers.cs:321— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) ODbDump/Program.cs:614— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) DBBenchmark/EventLog/EventLogStorageScreening.cs:261— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) DBBenchmark/EventLog/EventLogStorageScreening.cs:303— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) BTDB.SourceGenerator/Main.cs:2951— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) BTDB.Replication/EventLog/EventLogService.cs:566— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) BTDB.Replication/EventLog/EventLogService.cs:784— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) BTDB.Replication/EventLog/EventLogService.cs:936— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) BTDB.Replication/EventLog/EventLogService.cs:1006— An empty catch block silently discards the error — failures vanish with no log and no rethrow. On a teardown path letting it propagate is not an option (throwing out of `Dispose()` masks the failure already in flight and abandons the rest of the cleanup), so make the swallow deliberate instead: record it through whatever this codebase already uses to report problems — or, if one specific failure truly cannot matter, catch exactly that exception type and say why in a comment on the catch (a comment on a catch-all still swallows everything else).
Swallowed exception (empty catch) BTDB.Replication/EventLog/EventLogStorageReader.cs:225— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) BTDB.Replication/ReplicationApplicationData.cs:90— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) BTDB.Replication/ReplicationFileSet.Collection.cs:402— An empty catch block silently discards the error — failures vanish with no log and no rethrow. On a teardown path letting it propagate is not an option (throwing out of `Dispose()` masks the failure already in flight and abandons the rest of the cleanup), so make the swallow deliberate instead: record it through whatever this codebase already uses to report problems — or, if one specific failure truly cannot matter, catch exactly that exception type and say why in a comment on the catch (a comment on a catch-all still swallows everything else).
Swallowed exception (empty catch) BTDB.Replication/ReplicationLeadership.cs:191— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) BTDB.Replication/ReplicationNodeCoordinator.cs:186— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) BTDB.Replication/ReplicationNodeCoordinator.cs:459— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) BTDB.Replication/ReplicationNodeCoordinator.cs:772— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) BTDB.Replication/ReplicationTimeouts.cs:13— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) BTDB.Replication.Azure/AzureLeaderStorage.cs:83— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) BTDB.Replication.Azure/AzureReplicationStorage.cs:349— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) BTDB.Replication.Azure/AzureReplicationStorage.cs:570— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) BTDB.Replication.Azure/AzureReplicationStorage.cs:571— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) BTDB.Replication.EventSourcing/EventPublisher.cs:536— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) REDACTED:64— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
FileTooLong: BTDB.SourceGenerator/Main.cs BTDB.SourceGenerator/Main.cs— FileTooLong — 3906 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 3406 over it, 7.81× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: ODBLayer/RelationQuery.cs BTDB/ODBLayer/RelationQuery.cs— FileTooLong — 3607 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 3107 over it, 7.21× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: Interpreter/Interpreter.cs BTDB/Interpreter/Interpreter.cs— FileTooLong — 2898 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 2398 over it, 5.80× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: Implementation/BTreeKeyValueDB.cs BTDB/KVDBLayer/Implementation/BTreeKeyValueDB.cs— FileTooLong — 1884 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1384 over it, 3.77× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: ODBLayer/RelationInfo.cs BTDB/ODBLayer/RelationInfo.cs— FileTooLong — 1834 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1334 over it, 3.67× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: BTreeLib/BTreeImpl12.cs BTDB/BTreeLib/BTreeImpl12.cs— FileTooLong — 1724 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1224 over it, 3.45× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: ODBLayer/RelationBuilder.cs BTDB/ODBLayer/RelationBuilder.cs— FileTooLong — 1481 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 981 over it, 2.96× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: ODBLayer/RelationDBManipulator.cs BTDB/ODBLayer/RelationDBManipulator.cs— FileTooLong — 1190 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 690 over it, 2.38× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: Bon/Bon.cs BTDB/Bon/Bon.cs— FileTooLong — 1075 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 575 over it, 2.15× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: Serialization/BonSerializer.cs BTDB/Serialization/BonSerializer.cs— FileTooLong — 1012 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 512 over it, 2.02× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: BTDB.BackendActions/ActionPlanner.cs BTDB.BackendActions/ActionPlanner.cs— FileTooLong — 933 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 433 over it, 1.87× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: StreamLayer/MemReader.cs BTDB/StreamLayer/MemReader.cs— FileTooLong — 896 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 396 over it, 1.79× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: Buffer/RoaringBitmaps.cs BTDB/Buffer/RoaringBitmaps.cs— FileTooLong — 834 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 334 over it, 1.67× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: Serialization/DefaultTypeConverterFactory.cs BTDB/Serialization/DefaultTypeConverterFactory.cs— FileTooLong — 797 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 297 over it, 1.59× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: ODBLayer/Constraint.cs BTDB/ODBLayer/Constraint.cs— FileTooLong — 793 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 293 over it, 1.59× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: ODBLayer/RelationEnumerator.cs BTDB/ODBLayer/RelationEnumerator.cs— FileTooLong — 724 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 224 over it, 1.45× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: Buffer/PackUnpack.cs BTDB/Buffer/PackUnpack.cs— FileTooLong — 695 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 195 over it, 1.39× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: ODBLayer/ObjectDBTransaction.cs BTDB/ODBLayer/ObjectDBTransaction.cs— FileTooLong — 680 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 180 over it, 1.36× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: BTDB.AzureStorage/AzureBlobFileCollection.cs BTDB.AzureStorage/AzureBlobFileCollection.cs— FileTooLong — 671 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 171 over it, 1.34× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: EventStoreLayer/ListTypeDescriptor.cs BTDB/EventStoreLayer/ListTypeDescriptor.cs— FileTooLong — 665 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 165 over it, 1.33× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: EventLog/EventLogService.cs BTDB.Replication/EventLog/EventLogService.cs— FileTooLong — 642 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 142 over it, 1.28× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: StreamLayer/MemWriter.cs BTDB/StreamLayer/MemWriter.cs— FileTooLong — 622 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 122 over it, 1.24× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: ODbDump/Program.cs ODbDump/Program.cs— FileTooLong — 615 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 115 over it, 1.23× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: ODBLayer/TableInfo.cs BTDB/ODBLayer/TableInfo.cs— FileTooLong — 612 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 112 over it, 1.22× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: IOC/ContainerImpl.cs BTDB/IOC/ContainerImpl.cs— FileTooLong — 606 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 106 over it, 1.21× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
Sync-over-async blocking — 30 blocking call(s) on async work (.Wait()/.GetAwaiter().GetResult()) — these waste a thread and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
Sync-over-async blocking BTDB/ChunkCache/DiskChunkCache.cs:398— `task.Wait()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
Sync-over-async blocking BTDB/IOC/ContainerImpl.cs:1005— `.GetAwaiter().GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
Sync-over-async blocking BTDB/KVDBLayer/Implementation/LazyFileCollectionWithFileInfos.cs:139— `.GetAwaiter().GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
Sync-over-async blocking BTDB/ODBLayer/LazyUlongList.cs:195— `.GetAwaiter().GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
Sync-over-async blocking BTDB/ODBLayer/RoaringBitmap.cs:648— `.GetAwaiter().GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
Sync-over-async blocking DBBenchmark/LSM/LsmSpillBenchmark.cs:120— `.GetAwaiter().GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
Sync-over-async blocking DBBenchmark/TransactionBatchingBenchmark.cs:43— `.GetAwaiter().GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
Sync-over-async blocking DBBenchmark/TransactionBatchingBenchmark.cs:74— `.GetAwaiter().GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
Sync-over-async blocking DBBenchmark/TransactionBatchingBenchmark.cs:87— `.GetAwaiter().GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
Sync-over-async blocking DBBenchmark/TransactionBatchingBenchmark.cs:100— `.GetAwaiter().GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
Sync-over-async blocking BTDB.AzureStorage/AzureBlobFileCollection.cs:238— `.GetAwaiter().GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
Sync-over-async blocking BTDB.Replication/CanonicalTrlPublisher.cs:82— `_lane.Wait()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
Sync-over-async blocking BTDB.Replication/ReplicationFileSet.Collection.cs:392— `.GetAwaiter().GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
Sync-over-async blocking BTDB.Replication.Azure/AzureReplicationStorage.cs:533— `.GetAwaiter().GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
Sync-over-async blocking BTDB.Replication.Azure/AzureReplicationStorage.cs:596— `.GetAwaiter().GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
Sync-over-async blocking BTDB.LSM/Format/Table.cs:464— `.GetAwaiter().GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
Sync-over-async blocking BTDB.LSM/Format/Table.cs:731— `.GetAwaiter().GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
Sync-over-async blocking BTDB.LSM/LsmKeyValueDB.Background.cs:440— `.GetAwaiter().GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
Sync-over-async blocking BTDB.LSM/LsmKeyValueDB.Background.cs:442— `.GetAwaiter().GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
Sync-over-async blocking BTDB.LSM/LsmKeyValueDB.Background.cs:560— `.GetAwaiter().GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
Sync-over-async blocking BTDB.LSM/LsmKeyValueDB.cs:212— `.GetAwaiter().GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
Sync-over-async blocking BTDB.LSM/LsmKeyValueDB.cs:269— `.GetAwaiter().GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
Sync-over-async blocking BTDB.LSM/LsmKeyValueDB.cs:363— `.GetAwaiter().GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
Sync-over-async blocking BTDB.LSM/LsmKeyValueDB.cs:422— `.GetAwaiter().GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
Duplicated block (7 lines × 2) BTDB/Serialization/DefaultTypeConverterFactory.cs:1207— BTDB/Serialization/DefaultTypeConverterFactory.cs:1207-1213 | BTDB/Serialization/DefaultTypeConverterFactory.cs:1263-1269 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/Serialization/DefaultTypeConverterFactory.cs:1207` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) BTDB/Serialization/BonSerializer.cs:1437— BTDB/Serialization/BonSerializer.cs:1437-1443 | BTDB/Serialization/BonSerializer.cs:1501-1507 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/Serialization/BonSerializer.cs:1437` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) BTDB/BTreeLib/BTreeImpl12.cs:2695— BTDB/BTreeLib/BTreeImpl12.cs:2695-2701 | BTDB/BTreeLib/BTreeImpl12.cs:2798-2804 — both copies are in the same file, so extract the 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) BTDB/Buffer/PackUnpack.cs:775— BTDB/Buffer/PackUnpack.cs:775-781 | BTDB/Buffer/PackUnpack.cs:785-791 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/Buffer/PackUnpack.cs:775` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) BTDB/EventStoreLayer/DictionaryTypeDescriptor.cs:680— BTDB/EventStoreLayer/DictionaryTypeDescriptor.cs:680-686 | BTDB/EventStoreLayer/DictionaryTypeDescriptor.cs:720-726 — both copies are in the same file, so extract the 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) BTDB/EventStoreLayer/DictionaryTypeDescriptor.cs:756— BTDB/EventStoreLayer/DictionaryTypeDescriptor.cs:756-762 | BTDB/FieldHandler/ListFieldOrderedHandler.cs:127-133 — 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) BTDB/EventStoreLayer/ListTypeDescriptor.cs:865— BTDB/EventStoreLayer/ListTypeDescriptor.cs:865-871 | BTDB/EventStoreLayer/ListTypeDescriptor.cs:899-905 — both copies are in the same file, so extract the 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) BTDB/FieldHandler/DictionaryFieldHandler.cs:257— BTDB/FieldHandler/DictionaryFieldHandler.cs:257-263 | BTDB/FieldHandler/ListFieldHandler.cs:237-243 — before extracting anything, compare `BTDB/FieldHandler/DictionaryFieldHandler.cs` and `BTDB/FieldHandler/ListFieldHandler.cs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 92 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/FieldHandler/DictionaryFieldHandler.cs:257` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `BTDB/FieldHandler/DictionaryFieldHandler.cs:253` calls `Load`, `FindStackAllocatorByType` and `BTDB/FieldHandler/ListFieldHandler.cs:235` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7 lines × 2) BTDB/FieldHandler/ListFieldHandler.cs:329— BTDB/FieldHandler/ListFieldHandler.cs:329-335 | BTDB/FieldHandler/ListFieldOrderedHandler.cs:285-291 — before extracting anything, compare `BTDB/FieldHandler/ListFieldHandler.cs` and `BTDB/FieldHandler/ListFieldOrderedHandler.cs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 176 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) BTDB/Serialization/RawData.cs:331— BTDB/Serialization/RawData.cs:331-337 | BTDB/Serialization/RawData.cs:358-364 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/Serialization/RawData.cs:331` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) BTDB/EventStoreLayer/ObjectTypeDescriptor.cs:433— BTDB/EventStoreLayer/ObjectTypeDescriptor.cs:433-439 | BTDB/ODBLayer/RelationInfo.cs:1438-1444 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/EventStoreLayer/ObjectTypeDescriptor.cs:433` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (7 lines × 2) BTDB/EventStoreLayer/TupleTypeDescriptor.cs:314— BTDB/EventStoreLayer/TupleTypeDescriptor.cs:314-320 | BTDB/EventStoreLayer/TupleTypeDescriptor.cs:339-345 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/EventStoreLayer/TupleTypeDescriptor.cs:314` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) BTDB/FieldHandler/BasicSerializersFactory.cs:280— BTDB/FieldHandler/BasicSerializersFactory.cs:280-286 | BTDB/FieldHandler/BasicSerializersFactory.cs:293-299 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/FieldHandler/BasicSerializersFactory.cs:280` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) BTDB/FieldHandler/DictionaryFieldHandler.cs:94— BTDB/FieldHandler/DictionaryFieldHandler.cs:94-100 | BTDB/FieldHandler/ListFieldHandler.cs:92-98 — before extracting anything, compare `BTDB/FieldHandler/DictionaryFieldHandler.cs` and `BTDB/FieldHandler/ListFieldHandler.cs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 92 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) BTDB/FieldHandler/TupleFieldHandler.cs:328— BTDB/FieldHandler/TupleFieldHandler.cs:328-334 | BTDB/FieldHandler/TupleFieldHandler.cs:353-359 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/FieldHandler/TupleFieldHandler.cs:328` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) BTDB/Buffer/PackUnpack.cs:515— BTDB/Buffer/PackUnpack.cs:515-521 | BTDB/Buffer/PackUnpack.cs:522-528 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/Buffer/PackUnpack.cs:515` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (7 lines × 2) BTDB/KVDBLayer/Implementation/InMemoryFileCollection.cs:112— BTDB/KVDBLayer/Implementation/InMemoryFileCollection.cs:112-118 | BTDB/KVDBLayer/Implementation/InMemoryReplicationFileStorage.cs:112-118 — before extracting anything, compare `BTDB/KVDBLayer/Implementation/InMemoryFileCollection.cs` and `BTDB/KVDBLayer/Implementation/InMemoryReplicationFileStorage.cs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 162 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (7 lines × 2) BTDB/KVDBLayer/Implementation/OnDiskFileCollection.cs:85— BTDB/KVDBLayer/Implementation/OnDiskFileCollection.cs:85-91 | BTDB/KVDBLayer/Implementation/OnDiskFileCollection.cs:107-113 — both copies are in the same file, so extract the 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) BTDB/ODBLayer/RelationQuery.cs:3127— BTDB/ODBLayer/RelationQuery.cs:3127-3133 | BTDB/ODBLayer/RelationQuery.cs:3176-3182 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/ODBLayer/RelationQuery.cs:3127` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (7 lines × 2) BTDB/SnappyCompression/SnappyCompress.cs:45— BTDB/SnappyCompression/SnappyCompress.cs:45-51 | BTDB/SnappyCompression/SnappyCompress.cs:55-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. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/SnappyCompression/SnappyCompress.cs:45` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (7 lines × 2) BTDB/StreamLayer/PositionLessStreamReader.cs:34— BTDB/StreamLayer/PositionLessStreamReader.cs:34-40 | BTDB/StreamLayer/PositionLessStreamReader.cs:55-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 (7 lines × 2) DBBenchmark/EventLog/EventLogStorageScreening.cs:332— DBBenchmark/EventLog/EventLogStorageScreening.cs:332-338 | DBBenchmark/LSM/LsmStorageScreening.cs:325-338 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `DBBenchmark/EventLog/EventLogStorageScreening.cs:331` calls `GetEnvironmentVariable` and `DBBenchmark/LSM/LsmStorageScreening.cs:324` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7 lines × 2) BTDB.Replication.Azure/AzureReplicationStorage.cs:459— BTDB.Replication.Azure/AzureReplicationStorage.cs:459-465 | BTDB.Replication/FileSystem/FileSystemReplicationStorage.cs:299-305 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (7 lines × 2) BTDB/FieldHandler/ListFieldHandler.cs:53— BTDB/FieldHandler/ListFieldHandler.cs:53-59 | BTDB/FieldHandler/ListFieldOrderedHandler.cs:54-60 — before extracting anything, compare `BTDB/FieldHandler/ListFieldHandler.cs` and `BTDB/FieldHandler/ListFieldOrderedHandler.cs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 176 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (7 lines × 2) BTDB/KVDBLayer/Implementation/InMemoryFileCollection.cs:122— BTDB/KVDBLayer/Implementation/InMemoryFileCollection.cs:122-128 | BTDB/KVDBLayer/Implementation/InMemoryReplicationFileStorage.cs:122-128 — before extracting anything, compare `BTDB/KVDBLayer/Implementation/InMemoryFileCollection.cs` and `BTDB/KVDBLayer/Implementation/InMemoryReplicationFileStorage.cs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 162 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (8 lines × 2) BTDB/Bon/Bon.cs:880— BTDB/Bon/Bon.cs:880-887 | BTDB/Bon/Bon.cs:896-903 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/Bon/Bon.cs:880` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `value` to `string?` in one and `ReadOnlySpan<byte>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (8 lines × 2) BTDB/StreamLayer/MemWriter.cs:510— BTDB/StreamLayer/MemWriter.cs:510-517 | BTDB/StreamLayer/MemWriter.cs:614-621 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/StreamLayer/MemWriter.cs:510` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) BTDB/Collections/RefDictionary.cs:141— BTDB/Collections/RefDictionary.cs:141-148 | BTDB/Collections/SpanByteNoRemoveDictionary.cs:149-156 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/Collections/RefDictionary.cs:141` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) BTDB/EventStoreLayer/DictionaryTypeDescriptor.cs:284— BTDB/EventStoreLayer/DictionaryTypeDescriptor.cs:284-291 | BTDB/EventStoreLayer/ListTypeDescriptor.cs:294-301 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/EventStoreLayer/DictionaryTypeDescriptor.cs:284` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) BTDB/IOC/SingleRegistration.cs:215— BTDB/IOC/SingleRegistration.cs:215-222 | BTDB/IOC/SingleRegistration.cs:230-237 — both copies are in the same file, so extract the 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) BTDB.SourceGenerator/Main.cs:5793— BTDB.SourceGenerator/Main.cs:5793-5800 | BTDB.SourceGenerator/Main.cs:5943-5950 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8 lines × 2) BTDB/Collections/RefDictionary.cs:86— BTDB/Collections/RefDictionary.cs:86-93 | BTDB/Collections/RefDictionary.cs:110-117 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/Collections/RefDictionary.cs:86` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) BTDB/Collections/SpanByteNoRemoveDictionary.cs:78— BTDB/Collections/SpanByteNoRemoveDictionary.cs:78-85 | BTDB/Collections/SpanByteNoRemoveDictionary.cs:118-125 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/Collections/SpanByteNoRemoveDictionary.cs:78` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) BTDB/FieldHandler/DictionaryFieldHandler.cs:102— BTDB/FieldHandler/DictionaryFieldHandler.cs:102-109 | BTDB/FieldHandler/ListFieldHandler.cs:101-108 — before extracting anything, compare `BTDB/FieldHandler/DictionaryFieldHandler.cs` and `BTDB/FieldHandler/ListFieldHandler.cs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 92 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 2) BTDB/KVDBLayer/Implementation/OnDiskFileCollection.cs:108— BTDB/KVDBLayer/Implementation/OnDiskFileCollection.cs:108-115 | BTDB/StreamLayer/PositionLessStreamReader.cs:56-63 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/KVDBLayer/Implementation/OnDiskFileCollection.cs:108` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) BTDB/ODBLayer/ODBLazyUlongList.cs:38— BTDB/ODBLayer/ODBLazyUlongList.cs:38-45 | BTDB/ODBLayer/ODBRoaringBitmap.cs:47-54 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/ODBLayer/ODBLazyUlongList.cs:38` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) BTDB/ODBLayer/RelationBuilder.cs:875— BTDB/ODBLayer/RelationBuilder.cs:875-882 | BTDB/ODBLayer/RelationBuilder.cs:891-898 — both copies are in the same file, so extract the 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) BTDB/Serialization/DefaultTypeConverterFactory.cs:70— BTDB/Serialization/DefaultTypeConverterFactory.cs:70-77 | BTDB/Serialization/DefaultTypeConverterFactory.cs:92-99 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/Serialization/DefaultTypeConverterFactory.cs:70` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) DBBenchmark/EventLog/EventLogStorageScreening.cs:88— DBBenchmark/EventLog/EventLogStorageScreening.cs:88-95 | DBBenchmark/EventLog/EventLogStorageScreening.cs:116-123 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `DBBenchmark/EventLog/EventLogStorageScreening.cs:114` calls `Clear` and `DBBenchmark/EventLog/EventLogStorageScreening.cs:87` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (8 lines × 2) BTDB/EventStoreLayer/NullableTypeDescriptor.cs:219— BTDB/EventStoreLayer/NullableTypeDescriptor.cs:219-226 | BTDB/EventStoreLayer/NullableTypeDescriptor.cs:239-247 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/EventStoreLayer/NullableTypeDescriptor.cs:219` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (8 lines × 2) BTDB/Interpreter/Interpreter.cs:1002— BTDB/Interpreter/Interpreter.cs:1002-1009 | BTDB/Interpreter/Interpreter.cs:1012-1019 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/Interpreter/Interpreter.cs:1012` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8 lines × 2) BTDB/ODBLayer/Constraint.cs:318— BTDB/ODBLayer/Constraint.cs:318-325 | BTDB/ODBLayer/Constraint.cs:412-419 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (8 lines × 2) BTDB/ODBLayer/Constraint.cs:327— BTDB/ODBLayer/Constraint.cs:327-334 | BTDB/ODBLayer/Constraint.cs:419-426 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (8 lines × 2) BTDB/ODBLayer/Constraint.cs:336— BTDB/ODBLayer/Constraint.cs:336-343 | BTDB/ODBLayer/Constraint.cs:426-433 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (8 lines × 2) BTDB/ODBLayer/Constraint.cs:354— BTDB/ODBLayer/Constraint.cs:354-361 | BTDB/ODBLayer/Constraint.cs:440-447 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (8 lines × 2) BTDB/ODBLayer/Constraint.cs:363— BTDB/ODBLayer/Constraint.cs:363-370 | BTDB/ODBLayer/Constraint.cs:447-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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (8 lines × 2) BTDB/ODBLayer/RelationBuilder.cs:955— BTDB/ODBLayer/RelationBuilder.cs:955-963 | BTDB/ODBLayer/RelationBuilder.cs:1159-1166 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/ODBLayer/RelationBuilder.cs:955` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) BTDB/SnappyCompression/SnappyCompress.cs:112— BTDB/SnappyCompression/SnappyCompress.cs:112-119 | BTDB/SnappyCompression/SnappyCompress.cs:120-127 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/SnappyCompression/SnappyCompress.cs:112` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (8 lines × 2) ODbDump/Program.cs:568— ODbDump/Program.cs:568-575 | ODbDump/Program.cs:586-593 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ODbDump/Program.cs:568` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) BTDB/FieldHandler/EncryptedStringHandler.cs:87— BTDB/FieldHandler/EncryptedStringHandler.cs:87-94 | BTDB/FieldHandler/OrderedEncryptedStringHandler.cs:87-94 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (9 lines × 2) BTDB/EventStoreLayer/ListTypeDescriptor.cs:825— BTDB/EventStoreLayer/ListTypeDescriptor.cs:825-833 | BTDB/EventStoreLayer/ListTypeDescriptor.cs:861-869 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/EventStoreLayer/ListTypeDescriptor.cs:825` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `BTDB/EventStoreLayer/ListTypeDescriptor.cs:870` calls `Mark` and `BTDB/EventStoreLayer/ListTypeDescriptor.cs:834` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (9 lines × 2) BTDB/Reactive/FastBehaviourSubject.cs:138— BTDB/Reactive/FastBehaviourSubject.cs:138-146 | BTDB/Reactive/FastSubject.cs:80-88 — before extracting anything, compare `BTDB/Reactive/FastBehaviourSubject.cs` and `BTDB/Reactive/FastSubject.cs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 73 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/Reactive/FastBehaviourSubject.cs:138` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) BTDB/Serialization/BonSerializer.cs:409— BTDB/Serialization/BonSerializer.cs:409-417 | BTDB/Serialization/BonSerializer.cs:439-447 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/Serialization/BonSerializer.cs:409` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) BTDB/Bon/Bon.cs:1209— BTDB/Bon/Bon.cs:1209-1217 | BTDB/Bon/Bon.cs:1242-1250 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (9 lines × 2) BTDB/Bon/Bon.cs:1269— BTDB/Bon/Bon.cs:1269-1277 | BTDB/Bon/Bon.cs:1294-1302 — both copies are in the same file, so extract the 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) BTDB/Buffer/PackUnpack.cs:439— BTDB/Buffer/PackUnpack.cs:439-447 | BTDB/Buffer/PackUnpack.cs:457-465 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/Buffer/PackUnpack.cs:439` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (9 lines × 2) BTDB/Collections/LruCache.cs:125— BTDB/Collections/LruCache.cs:125-133 | BTDB/Collections/RefDictionary.cs:197-205 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/Collections/LruCache.cs:125` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) BTDB/Collections/RefDictionary.cs:245— BTDB/Collections/RefDictionary.cs:245-253 | BTDB/Collections/RefDictionary.cs:301-309 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/Collections/RefDictionary.cs:245` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) BTDB/FieldHandler/ListFieldHandler.cs:399— BTDB/FieldHandler/ListFieldHandler.cs:399-407 | BTDB/FieldHandler/ListFieldOrderedHandler.cs:341-349 — before extracting anything, compare `BTDB/FieldHandler/ListFieldHandler.cs` and `BTDB/FieldHandler/ListFieldOrderedHandler.cs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 176 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/FieldHandler/ListFieldHandler.cs:399` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) BTDB/KVDBLayer/Implementation/BTreeKeyValueDBCursor.cs:370— BTDB/KVDBLayer/Implementation/BTreeKeyValueDBCursor.cs:370-378 | BTDB/KVDBLayer/Implementation/BTreeKeyValueDBCursor.cs:399-407 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/KVDBLayer/Implementation/BTreeKeyValueDBCursor.cs:370` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) DBBenchmark/LSM/LsmAzureBenchmark.cs:36— DBBenchmark/LSM/LsmAzureBenchmark.cs:36-44 | DBBenchmark/LSM/LsmSpillBenchmark.cs:44-52 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (9 lines × 2) BTDB.LSM/Engine/MergingIterator.cs:108— BTDB.LSM/Engine/MergingIterator.cs:108-116 | BTDB.LSM/Engine/MergingIterator.cs:152-160 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB.LSM/Engine/MergingIterator.cs:108` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (9 lines × 2) BTDB/Buffer/PackUnpack.cs:1068— BTDB/Buffer/PackUnpack.cs:1068-1076 | BTDB/Buffer/PackUnpack.cs:1152-1160 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/Buffer/PackUnpack.cs:1068` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind `span` to `bool WasEnd) DetectLengthOfSimpleCharacters(ReadOnlySpan<byte>` in one and `bool WasEnd) ReadAndExpandSimpleCharacters(ReadOnlySpan<byte>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `BTDB/Buffer/PackUnpack.cs:1161` calls `Grow` and `BTDB/Buffer/PackUnpack.cs:1077` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (9 lines × 2) BTDB/EventStoreLayer/ListTypeDescriptor.cs:386— BTDB/EventStoreLayer/ListTypeDescriptor.cs:386-394 | BTDB/EventStoreLayer/ListTypeDescriptor.cs:512-520 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/EventStoreLayer/ListTypeDescriptor.cs:386` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (9 lines × 2) BTDB/EventStoreLayer/TupleTypeDescriptor.cs:392— BTDB/EventStoreLayer/TupleTypeDescriptor.cs:392-400 | BTDB/EventStoreLayer/TupleTypeDescriptor.cs:418-426 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/EventStoreLayer/TupleTypeDescriptor.cs:392` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (9 lines × 2) BTDB/FieldHandler/ListFieldOrderedHandler.cs:276— BTDB/FieldHandler/ListFieldOrderedHandler.cs:276-284 | BTDB/FieldHandler/ListFieldOrderedHandler.cs:289-297 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/FieldHandler/ListFieldOrderedHandler.cs:276` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (9 lines × 2) BTDB/KVDBLayer/BTreeMem/BTreeBranch.cs:168— BTDB/KVDBLayer/BTreeMem/BTreeBranch.cs:168-176 | BTDB/KVDBLayer/BTreeMem/BTreeBranch.cs:209-217 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/KVDBLayer/BTreeMem/BTreeBranch.cs:168` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `ctx` to `ref CreateOrUpdateCtx` in one and `ref UpdateKeySuffixCtx` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (9 lines × 2) BTDB/KVDBLayer/Helpers/PtrLenList.cs:88— BTDB/KVDBLayer/Helpers/PtrLenList.cs:88-96 | BTDB/KVDBLayer/Helpers/PtrLenList.cs:127-135 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/KVDBLayer/Helpers/PtrLenList.cs:88` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (9 lines × 2) BTDB/KVDBLayer/MemoryImplementation/InMemoryKeyValueDBCursor.cs:118— BTDB/KVDBLayer/MemoryImplementation/InMemoryKeyValueDBCursor.cs:118-126 | BTDB/KVDBLayer/MemoryImplementation/InMemoryKeyValueDBCursor.cs:255-263 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (9 lines × 2) BTDB/ODBLayer/ODBDictionary.cs:59— BTDB/ODBLayer/ODBDictionary.cs:59-67 | BTDB/ODBLayer/ODBSet.cs:41-49 — before extracting anything, compare `BTDB/ODBLayer/ODBDictionary.cs` and `BTDB/ODBLayer/ODBSet.cs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 133 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) BTDB/ODBLayer/ODBDictionaryFieldHandler.cs:47— BTDB/ODBLayer/ODBDictionaryFieldHandler.cs:47-55 | BTDB/ODBLayer/ODBSetFieldHandler.cs:39-47 — before extracting anything, compare `BTDB/ODBLayer/ODBDictionaryFieldHandler.cs` and `BTDB/ODBLayer/ODBSetFieldHandler.cs` 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. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/ODBLayer/ODBDictionaryFieldHandler.cs:47` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `BTDB/ODBLayer/ODBDictionaryFieldHandler.cs:56` calls `CreateFromReader` and `BTDB/ODBLayer/ODBSetFieldHandler.cs:48` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (9 lines × 2) BTDB/KVDBLayer/Implementation/BTreeKeyValueDB.cs:773— BTDB/KVDBLayer/Implementation/BTreeKeyValueDB.cs:773-781 | ODbDump/Program.cs:580-588 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/KVDBLayer/Implementation/BTreeKeyValueDB.cs:773` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `ODbDump/Program.cs:578` calls `DefaultCompressionKviStrategy` and `BTDB/KVDBLayer/Implementation/BTreeKeyValueDB.cs:771` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (9 lines × 2) BTDB/ODBLayer/ODBDictionaryFieldHandler.cs:338— BTDB/ODBLayer/ODBDictionaryFieldHandler.cs:338-346 | BTDB/ODBLayer/ODBSetFieldHandler.cs:209-217 — before extracting anything, compare `BTDB/ODBLayer/ODBDictionaryFieldHandler.cs` and `BTDB/ODBLayer/ODBSetFieldHandler.cs` 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. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/ODBLayer/ODBDictionaryFieldHandler.cs:338` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (9 lines × 2) BTDB/SnappyCompression/SnappyCompress.cs:32— BTDB/SnappyCompression/SnappyCompress.cs:32-40 | BTDB/SnappyCompression/SnappyCompress.cs:41-49 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/SnappyCompression/SnappyCompress.cs:32` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (9 lines × 2) BTDB.SourceGenerator/Main.cs:142— BTDB.SourceGenerator/Main.cs:142-150 | BTDB.SourceGenerator/Main.cs:1856-1865 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB.SourceGenerator/Main.cs:142` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (5 lines × 2) BTDB/ODBLayer/ODBIterator.cs:186— BTDB/ODBLayer/ODBIterator.cs:186-190 | BTDB/ODBLayer/ODBIterator.cs:225-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. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/ODBLayer/ODBIterator.cs:186` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (5 lines × 2) BTDB/EventStoreLayer/DictionaryTypeDescriptor.cs:503— BTDB/EventStoreLayer/DictionaryTypeDescriptor.cs:503-507 | BTDB/EventStoreLayer/ListTypeDescriptor.cs:690-694 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/EventStoreLayer/DictionaryTypeDescriptor.cs:503` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `BTDB/EventStoreLayer/DictionaryTypeDescriptor.cs:509` calls `DeclareLocal` and `BTDB/EventStoreLayer/ListTypeDescriptor.cs:695` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (5 lines × 2) DBBenchmark/LSM/LsmStorageScreening.cs:141— DBBenchmark/LSM/LsmStorageScreening.cs:141-145 | DBBenchmark/LSM/LsmStorageScreening.cs:179-183 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `DBBenchmark/LSM/LsmStorageScreening.cs:141` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) BTDB/EventStoreLayer/ObjectTypeDescriptor.cs:780— BTDB/EventStoreLayer/ObjectTypeDescriptor.cs:780-784 | BTDB/EventStoreLayer/TupleTypeDescriptor.cs:597-601 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/EventStoreLayer/ObjectTypeDescriptor.cs:780` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (5 lines × 2) BTDB/ODBLayer/RelationConstraintReverseEnumerator.cs:184— BTDB/ODBLayer/RelationConstraintReverseEnumerator.cs:184-188 | BTDB/ODBLayer/RelationEnumerator.cs:247-251 — before extracting anything, compare `BTDB/ODBLayer/RelationConstraintReverseEnumerator.cs` and `BTDB/ODBLayer/RelationEnumerator.cs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 154 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/ODBLayer/RelationConstraintReverseEnumerator.cs:184` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) BTDB/ODBLayer/RelationEnumerator.cs:119— BTDB/ODBLayer/RelationEnumerator.cs:119-123 | BTDB/ODBLayer/RelationEnumerator.cs:361-365 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (5 lines × 2) BTDB/EventStoreLayer/DictionaryTypeDescriptor.cs:506— BTDB/EventStoreLayer/DictionaryTypeDescriptor.cs:506-510 | BTDB/EventStoreLayer/DictionaryTypeDescriptor.cs:719-723 — both copies are in the same file, so extract the 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) BTDB/Interpreter/Interpreter.cs:694— BTDB/Interpreter/Interpreter.cs:694-698 | BTDB/Interpreter/Interpreter.cs:742-746 — both copies are in the same file, so extract the 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) BTDB/Interpreter/Interpreter.cs:2606— BTDB/Interpreter/Interpreter.cs:2606-2610 | BTDB/Interpreter/Interpreter.cs:2697-2701 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/Interpreter/Interpreter.cs:2606` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) BTDB/ODBLayer/RelationInfo.cs:1748— BTDB/ODBLayer/RelationInfo.cs:1748-1752 | BTDB/ODBLayer/RelationInfo.cs:1816-1820 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/ODBLayer/RelationInfo.cs:1748` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `BTDB/ODBLayer/RelationInfo.cs:1754` calls `NoControllerGetCurrentPosition` and `BTDB/ODBLayer/RelationInfo.cs:1821` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (5 lines × 2) BTDB/EventStoreLayer/EnumTypeDescriptor.cs:42— BTDB/EventStoreLayer/EnumTypeDescriptor.cs:42-46 | BTDB/FieldHandler/EnumFieldHandler.cs:41-45 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (5 lines × 2) BTDB/IOC/SingleRegistration.cs:199— BTDB/IOC/SingleRegistration.cs:199-203 | BTDB/IOC/SingleRegistration.cs: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. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/IOC/SingleRegistration.cs:199` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (5 lines × 2) BTDB/ODBLayer/ODBLazyUlongList.cs:175— BTDB/ODBLayer/ODBLazyUlongList.cs:175-179 | BTDB/ODBLayer/ODBRoaringBitmap.cs:174-178 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/ODBLayer/ODBLazyUlongList.cs:175` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) BTDB/ODBLayer/RelationDBManipulator.cs:558— BTDB/ODBLayer/RelationDBManipulator.cs:558-562 | BTDB/ODBLayer/RelationDBManipulator.cs:667-671 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note first that the copies are not typed on the same thing: the declarations holding them bind `keyBytes` to `scoped in ReadOnlySpan<byte>` in one and `in ReadOnlySpan<byte>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (5 lines × 2) BTDB/ODBLayer/RelationQuery.cs:586— BTDB/ODBLayer/RelationQuery.cs:586-590 | BTDB/ODBLayer/RelationQuery.cs:702-707 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/ODBLayer/RelationQuery.cs:586` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) BTDB/BTreeLib/RootNode12.cs:117— BTDB/BTreeLib/RootNode12.cs:117-121 | BTDB/KVDBLayer/BTreeMem/BTreeRoot.cs:360-364 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (5 lines × 2) BTDB/EventStoreLayer/ListTypeDescriptor.cs:81— BTDB/EventStoreLayer/ListTypeDescriptor.cs:81-85 | BTDB/EventStoreLayer/NullableTypeDescriptor.cs:77-81 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (5 lines × 2) BTDB/FieldHandler/EncryptedStringHandler.cs:146— BTDB/FieldHandler/EncryptedStringHandler.cs:146-150 | BTDB/FieldHandler/OrderedEncryptedStringHandler.cs:143-147 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (5 lines × 2) BTDB/KVDBLayer/Implementation/InMemoryFileCollection.cs:177— BTDB/KVDBLayer/Implementation/InMemoryFileCollection.cs:177-181 | BTDB/KVDBLayer/Implementation/InMemoryReplicationFileStorage.cs:177-181 — before extracting anything, compare `BTDB/KVDBLayer/Implementation/InMemoryFileCollection.cs` and `BTDB/KVDBLayer/Implementation/InMemoryReplicationFileStorage.cs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 162 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (5 lines × 2) BTDB/KVDBLayer/Implementation/InMemoryFileCollection.cs:221— BTDB/KVDBLayer/Implementation/InMemoryFileCollection.cs:221-225 | BTDB/KVDBLayer/Implementation/InMemoryReplicationFileStorage.cs:221-225 — before extracting anything, compare `BTDB/KVDBLayer/Implementation/InMemoryFileCollection.cs` and `BTDB/KVDBLayer/Implementation/InMemoryReplicationFileStorage.cs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 162 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) BTDB.Replication/ReplicationFileSet.Streaming.cs:103— BTDB.Replication/ReplicationFileSet.Streaming.cs:103-107 | BTDB/KVDBLayer/Implementation/OnDiskReplicationFileStorage.cs:472-476 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (5 lines × 2) BTDB/ODBLayer/ODBDictionary.cs:185— BTDB/ODBLayer/ODBDictionary.cs:185-189 | BTDB/ODBLayer/ODBSet.cs:207-211 — before extracting anything, compare `BTDB/ODBLayer/ODBDictionary.cs` and `BTDB/ODBLayer/ODBSet.cs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 133 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (5 lines × 2) BTDB/ODBLayer/ODBDictionary.cs:192— BTDB/ODBLayer/ODBDictionary.cs:192-196 | BTDB/ODBLayer/ODBSet.cs:214-218 — before extracting anything, compare `BTDB/ODBLayer/ODBDictionary.cs` and `BTDB/ODBLayer/ODBSet.cs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 133 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (5 lines × 2) BTDB/ODBLayer/ODBDictionary.cs:826— BTDB/ODBLayer/ODBDictionary.cs:826-830 | BTDB/ODBLayer/RelationEnumerator.cs:1106-1110 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (5 lines × 2) BTDB/StreamLayer/MemReader.cs:77— BTDB/StreamLayer/MemReader.cs:77-81 | BTDB/StreamLayer/MemWriter.cs:63-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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (10 lines × 2) BTDB/ODBLayer/RelationDBManipulator.cs:1202— BTDB/ODBLayer/RelationDBManipulator.cs:1202-1211 | BTDB/ODBLayer/RelationDBManipulator.cs:1534-1543 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/ODBLayer/RelationDBManipulator.cs:1202` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) BTDB.SourceGenerator/Main.cs:5815— BTDB.SourceGenerator/Main.cs:5815-5824 | BTDB.SourceGenerator/Main.cs:5965-5974 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (10 lines × 2) BTDB/KVDBLayer/BTreeMem/BTreeLeafComp.cs:400— BTDB/KVDBLayer/BTreeMem/BTreeLeafComp.cs:400-409 | BTDB/KVDBLayer/BTreeMem/BTreeLeafComp.cs:420-429 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/KVDBLayer/BTreeMem/BTreeLeafComp.cs:400` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (10 lines × 2) BTDB.SourceGenerator/Main.cs:640— BTDB.SourceGenerator/Main.cs:640-649 | BTDB.SourceGenerator/Main.cs:661-670 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB.SourceGenerator/Main.cs:640` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (10 lines × 2) BTDB/EventStoreLayer/DictionaryTypeDescriptor.cs:657— BTDB/EventStoreLayer/DictionaryTypeDescriptor.cs:657-666 | BTDB/EventStoreLayer/ListTypeDescriptor.cs:806-815 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (10 lines × 2) BTDB/FieldHandler/DictionaryFieldHandler.cs:187— BTDB/FieldHandler/DictionaryFieldHandler.cs:187-196 | BTDB/FieldHandler/ListFieldHandler.cs:182-191 — before extracting anything, compare `BTDB/FieldHandler/DictionaryFieldHandler.cs` and `BTDB/FieldHandler/ListFieldHandler.cs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 92 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `BTDB/FieldHandler/DictionaryFieldHandler.cs:184` calls `GetGenericArguments`, `DeclareLocal` and `BTDB/FieldHandler/ListFieldHandler.cs:180` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (10 lines × 2) BTDB/IOC/ContainerImpl.cs:645— BTDB/IOC/ContainerImpl.cs:645-654 | BTDB/IOC/ContainerImpl.cs:748-757 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/IOC/ContainerImpl.cs:645` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) BTDB/ODBLayer/RelationBuilder.cs:1097— BTDB/ODBLayer/RelationBuilder.cs:1097-1106 | BTDB/ODBLayer/RelationBuilder.cs:1126-1135 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/ODBLayer/RelationBuilder.cs:1097` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (10 lines × 2) BTDB.SourceGenerator/Main.cs:6057— BTDB.SourceGenerator/Main.cs:6057-6066 | BTDB.SourceGenerator/Main.cs:6074-6083 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB.SourceGenerator/Main.cs:6057` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) BTDB/BTreeLib/NodeUtils12.cs:42— BTDB/BTreeLib/NodeUtils12.cs:42-51 | BTDB/BTreeLib/NodeUtils12.cs:71-80 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/BTreeLib/NodeUtils12.cs:42` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) BTDB/BTreeLib/NodeUtils12.cs:131— BTDB/BTreeLib/NodeUtils12.cs:131-140 | BTDB/BTreeLib/NodeUtils12.cs:150-159 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/BTreeLib/NodeUtils12.cs:131` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `BTDB/BTreeLib/NodeUtils12.cs:149` calls `Assert` and `BTDB/BTreeLib/NodeUtils12.cs:130` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (10 lines × 2) BTDB/EventStoreLayer/DictionaryTypeDescriptor.cs:447— BTDB/EventStoreLayer/DictionaryTypeDescriptor.cs:447-456 | BTDB/EventStoreLayer/ListTypeDescriptor.cs:634-643 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/EventStoreLayer/DictionaryTypeDescriptor.cs:447` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) BTDB/FieldHandler/DictionaryFieldHandler.cs:148— BTDB/FieldHandler/DictionaryFieldHandler.cs:148-157 | BTDB/FieldHandler/ListFieldHandler.cs:147-156 — before extracting anything, compare `BTDB/FieldHandler/DictionaryFieldHandler.cs` and `BTDB/FieldHandler/ListFieldHandler.cs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 92 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) BTDB/FieldHandler/ListFieldHandler.cs:26— BTDB/FieldHandler/ListFieldHandler.cs:26-35 | BTDB/FieldHandler/ListFieldOrderedHandler.cs:26-35 — before extracting anything, compare `BTDB/FieldHandler/ListFieldHandler.cs` and `BTDB/FieldHandler/ListFieldOrderedHandler.cs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 176 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (10 lines × 2) BTDB/FieldHandler/ListFieldHandler.cs:175— BTDB/FieldHandler/ListFieldHandler.cs:175-184 | BTDB/FieldHandler/ListFieldOrderedHandler.cs:152-161 — before extracting anything, compare `BTDB/FieldHandler/ListFieldHandler.cs` and `BTDB/FieldHandler/ListFieldOrderedHandler.cs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 176 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `BTDB/FieldHandler/ListFieldOrderedHandler.cs:149` calls `DefineLabel` and `BTDB/FieldHandler/ListFieldHandler.cs:172` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (10 lines × 2) BTDB/KVDBLayer/BTreeMem/BTreeLeaf.cs:326— BTDB/KVDBLayer/BTreeMem/BTreeLeaf.cs:326-335 | BTDB/KVDBLayer/BTreeMem/BTreeLeafComp.cs:480-489 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (10 lines × 2) BTDB/KVDBLayer/Implementation/InMemoryFileCollection.cs:354— BTDB/KVDBLayer/Implementation/InMemoryFileCollection.cs:354-363 | BTDB/KVDBLayer/Implementation/OnDiskFileCollection.cs:343-352 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/KVDBLayer/Implementation/InMemoryFileCollection.cs:354` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (10 lines × 2) BTDB/ODBLayer/ODBDictionaryFieldHandler.cs:255— BTDB/ODBLayer/ODBDictionaryFieldHandler.cs:255-264 | BTDB/ODBLayer/ODBDictionaryFieldHandler.cs:278-287 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `BTDB/ODBLayer/ODBDictionaryFieldHandler.cs:265` calls `Do`, `Call`, `GetMethod` and `BTDB/ODBLayer/ODBDictionaryFieldHandler.cs:288` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (10 lines × 2) BTDB/ODBLayer/ODBSetFieldHandler.cs:126— BTDB/ODBLayer/ODBSetFieldHandler.cs:126-135 | BTDB/ODBLayer/ODBSetFieldHandler.cs:149-158 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `BTDB/ODBLayer/ODBSetFieldHandler.cs:136` calls `Do`, `Call`, `GetMethod` and `BTDB/ODBLayer/ODBSetFieldHandler.cs:159` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (10 lines × 2) BTDB/Serialization/BonSerializer.cs:1388— BTDB/Serialization/BonSerializer.cs:1388-1397 | BTDB/Serialization/BonSerializer.cs:1437-1446 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/Serialization/BonSerializer.cs:1388` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) BTDB/BTreeLib/BTreeImpl12.cs:1709— BTDB/BTreeLib/BTreeImpl12.cs:1709-1718 | BTDB/BTreeLib/BTreeImpl12.cs:1777-1786 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/BTreeLib/BTreeImpl12.cs:1709` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (10 lines × 2) BTDB.SourceGenerator/EquatableArray.cs:13— BTDB.SourceGenerator/EquatableArray.cs:13-22 | BTDB/Collections/EquatableArray.cs:13-22 — before extracting anything, compare `BTDB.SourceGenerator/EquatableArray.cs` and `BTDB/Collections/EquatableArray.cs` as WHOLE FILES: 98% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB.SourceGenerator/EquatableArray.cs:13` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) BTDB/FieldHandler/DictionaryFieldHandler.cs:135— BTDB/FieldHandler/DictionaryFieldHandler.cs:135-144 | BTDB/FieldHandler/ListFieldHandler.cs:134-143 — before extracting anything, compare `BTDB/FieldHandler/DictionaryFieldHandler.cs` and `BTDB/FieldHandler/ListFieldHandler.cs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 92 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/FieldHandler/DictionaryFieldHandler.cs:135` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) BTDB.Replication/ReplicationFileSet.Collection.cs:263— BTDB.Replication/ReplicationFileSet.Collection.cs:263-272 | BTDB/KVDBLayer/Implementation/FileIdAllocator.cs:19-28 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB.Replication/ReplicationFileSet.Collection.cs:263` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) BTDB/Serialization/DefaultTypeConverterFactory.cs:58— BTDB/Serialization/DefaultTypeConverterFactory.cs:58-67 | BTDB/Serialization/DefaultTypeConverterFactory.cs:80-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. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/Serialization/DefaultTypeConverterFactory.cs:58` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (6 lines × 2) BTDB/ODBLayer/ODBIterator.cs:461— BTDB/ODBLayer/ODBIterator.cs:461-466 | BTDB/ODBLayer/ODBIterator.cs:509-514 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (6 lines × 2) BTDB/Serialization/BonSerializer.cs:491— BTDB/Serialization/BonSerializer.cs:491-496 | BTDB/Serialization/BonSerializer.cs:531-536 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/Serialization/BonSerializer.cs:491` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `BTDB/Serialization/BonSerializer.cs:490` calls `Assert` and `BTDB/Serialization/BonSerializer.cs:530` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (6 lines × 2) BTDB/BTreeLib/BTreeImpl12.cs:1730— BTDB/BTreeLib/BTreeImpl12.cs:1730-1735 | BTDB/BTreeLib/BTreeImpl12.cs:1794-1799 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/BTreeLib/BTreeImpl12.cs:1730` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) REDACTED:200— REDACTED:200-205 | BTDB/FieldHandler/DictionaryFieldHandler.cs:182-187 — 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) BTDB/ODBLayer/ODBLazyUlongListFieldHandler.cs:43— BTDB/ODBLayer/ODBLazyUlongListFieldHandler.cs:43-48 | BTDB/ODBLayer/ODBRoaringBitmapFieldHandler.cs:43-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) BTDB/ODBLayer/RelationQuery.cs:3113— BTDB/ODBLayer/RelationQuery.cs:3113-3118 | BTDB/ODBLayer/RelationQuery.cs:3160-3165 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/ODBLayer/RelationQuery.cs:3113` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) BTDB.SourceGenerator/Main.cs:5211— BTDB.SourceGenerator/Main.cs:5211-5216 | BTDB.SourceGenerator/Main.cs:5237-5242 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB.SourceGenerator/Main.cs:5211` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) BTDB/Collections/Utf16Utf8Dictionary.cs:211— BTDB/Collections/Utf16Utf8Dictionary.cs:211-216 | BTDB/Collections/Utf16Utf8Dictionary.cs:245-250 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/Collections/Utf16Utf8Dictionary.cs:211` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) BTDB/Collections/Utf16Utf8Dictionary.cs:228— BTDB/Collections/Utf16Utf8Dictionary.cs:228-233 | BTDB/Collections/Utf16Utf8Dictionary.cs:262-267 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/Collections/Utf16Utf8Dictionary.cs:228` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) BTDB/FieldHandler/DBObjectFieldHandler.cs:335— BTDB/FieldHandler/DBObjectFieldHandler.cs:335-340 | BTDB/ODBLayer/RelationInfo.cs:753-758 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `BTDB/FieldHandler/DBObjectFieldHandler.cs:342` calls `GetVisibleInstanceProperties` and `BTDB/ODBLayer/RelationInfo.cs:760` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (6 lines × 2) BTDB/ODBLayer/ObjectDBTransaction.cs:94— BTDB/ODBLayer/ObjectDBTransaction.cs:94-99 | BTDB/ODBLayer/ObjectDBTransaction.cs:130-135 — both copies are in the same file, so extract the 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) BTDB/ODBLayer/ODBIterator.cs:192— BTDB/ODBLayer/ODBIterator.cs:192-197 | BTDB/ODBLayer/ODBIterator.cs:230-235 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/ODBLayer/ODBIterator.cs:192` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) BTDB/ODBLayer/RelationDBManipulator.cs:112— BTDB/ODBLayer/RelationDBManipulator.cs:112-117 | BTDB/ODBLayer/RelationDBManipulator.cs:202-207 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note first that the copies are not typed on the same thing: the declarations holding them bind `obj` to `T` in one and `uint NewValueSize) ShallowUpsertWithSizes(T` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (6 lines × 2) DBBenchmark/LSM/LsmAzureBenchmark.cs:110— DBBenchmark/LSM/LsmAzureBenchmark.cs:110-115 | DBBenchmark/LSM/LsmAzureBenchmark.cs:271-276 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `DBBenchmark/LSM/LsmAzureBenchmark.cs:110` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `DBBenchmark/LSM/LsmAzureBenchmark.cs:116` calls `SetCommitUlong` and `DBBenchmark/LSM/LsmAzureBenchmark.cs:277` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (6 lines × 2) BTDB.Replication.Azure/AzureReplicationStorage.cs:409— BTDB.Replication.Azure/AzureReplicationStorage.cs:409-414 | BTDB.Replication/FileSystem/FileSystemReplicationStorage.cs:270-275 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (6 lines × 2) BTDB/Interpreter/Interpreter.cs:963— BTDB/Interpreter/Interpreter.cs:963-968 | BTDB/Interpreter/Interpreter.cs:1034-1040 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/Interpreter/Interpreter.cs:963` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (6 lines × 2) BTDB/Interpreter/Interpreter.cs:2092— BTDB/Interpreter/Interpreter.cs:2092-2097 | BTDB/Interpreter/Interpreter.cs:2101-2106 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/Interpreter/Interpreter.cs:2092` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) BTDB/KVDBLayer/Implementation/BTreeKeyValueDB.cs:2652— BTDB/KVDBLayer/Implementation/BTreeKeyValueDB.cs:2652-2657 | BTDB/KVDBLayer/Implementation/BTreeKeyValueDB.cs:2658-2663 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (6 lines × 2) BTDB/KVDBLayer/Implementation/FileCollectionWithFileInfos.cs:212— BTDB/KVDBLayer/Implementation/FileCollectionWithFileInfos.cs:212-217 | BTDB/KVDBLayer/Implementation/LazyFileCollectionWithFileInfos.cs:147-152 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/KVDBLayer/Implementation/FileCollectionWithFileInfos.cs:212` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (6 lines × 2) BTDB/ODBLayer/Constraint.cs:372— BTDB/ODBLayer/Constraint.cs:372-377 | BTDB/ODBLayer/Constraint.cs:454-459 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (6 lines × 2) DBBenchmark/BackendActions/PlannerScenario.cs:118— DBBenchmark/BackendActions/PlannerScenario.cs:118-123 | DBBenchmark/BackendActions/PlannerScenario.cs:145-150 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `DBBenchmark/BackendActions/PlannerScenario.cs:118` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (6 lines × 2) BTDB.Replication.Azure/AzureReplicationStorage.cs:295— BTDB.Replication.Azure/AzureReplicationStorage.cs:295-300 | BTDB.Replication.Azure/AzureReplicationStorage.cs:338-343 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB.Replication.Azure/AzureReplicationStorage.cs:295` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `BTDB.Replication.Azure/AzureReplicationStorage.cs:338` calls `GetUtcNow` and `BTDB.Replication.Azure/AzureReplicationStorage.cs:295` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (6 lines × 2) BTDB/ODBLayer/RelationInfo.cs:706— BTDB/ODBLayer/RelationInfo.cs:706-711 | BTDB/ODBLayer/TableInfo.cs:591-596 — 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) BTDB/KVDBLayer/Implementation/Compactor.cs:372— BTDB/KVDBLayer/Implementation/Compactor.cs:372-377 | BTDB/KVDBLayer/Implementation/ReplicationCompactor.cs:298-303 — before extracting anything, compare `BTDB/KVDBLayer/Implementation/Compactor.cs` and `BTDB/KVDBLayer/Implementation/ReplicationCompactor.cs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 132 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (6 lines × 2) BTDB/ODBLayer/ODBDictionary.cs:229— BTDB/ODBLayer/ODBDictionary.cs:229-234 | BTDB/ODBLayer/ODBSet.cs:155-160 — before extracting anything, compare `BTDB/ODBLayer/ODBDictionary.cs` and `BTDB/ODBLayer/ODBSet.cs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 133 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
SC1 · Supply-chain hygiene· NuGet dependencies are not locked · ×24
NuGet dependencies are not locked BTDB.AzureStorage.Test/BTDB.AzureStorage.Test.csproj:9— BTDB.AzureStorage.Test/BTDB.AzureStorage.Test.csproj declares NuGet packages that no committed packages.lock.json resolves and no central package management pins — restores aren't reproducible or pinned (SSDF PW.4.4). Enable <RestorePackagesWithLockFile>true</RestorePackagesWithLockFile> (commit the lockfile) or adopt Directory.Packages.props. Advisory — never scored.
NuGet dependencies are not locked BTDB.AzureStorage/BTDB.AzureStorage.csproj:35— BTDB.AzureStorage/BTDB.AzureStorage.csproj declares NuGet packages that no committed packages.lock.json resolves and no central package management pins — restores aren't reproducible or pinned (SSDF PW.4.4). Enable <RestorePackagesWithLockFile>true</RestorePackagesWithLockFile> (commit the lockfile) or adopt Directory.Packages.props. Advisory — never scored.
NuGet dependencies are not locked BTDB.BackendActions.Process.Test/BTDB.BackendActions.Process.Test.csproj:15— BTDB.BackendActions.Process.Test/BTDB.BackendActions.Process.Test.csproj declares NuGet packages that no committed packages.lock.json resolves and no central package management pins — restores aren't reproducible or pinned (SSDF PW.4.4). Enable <RestorePackagesWithLockFile>true</RestorePackagesWithLockFile> (commit the lockfile) or adopt Directory.Packages.props. Advisory — never scored.
NuGet dependencies are not locked BTDB.BackendActions.Test/BTDB.BackendActions.Test.csproj:14— BTDB.BackendActions.Test/BTDB.BackendActions.Test.csproj declares NuGet packages that no committed packages.lock.json resolves and no central package management pins — restores aren't reproducible or pinned (SSDF PW.4.4). Enable <RestorePackagesWithLockFile>true</RestorePackagesWithLockFile> (commit the lockfile) or adopt Directory.Packages.props. Advisory — never scored.
NuGet dependencies are not locked BTDB.LSM.Azure.Test/BTDB.LSM.Azure.Test.csproj:11— BTDB.LSM.Azure.Test/BTDB.LSM.Azure.Test.csproj declares NuGet packages that no committed packages.lock.json resolves and no central package management pins — restores aren't reproducible or pinned (SSDF PW.4.4). Enable <RestorePackagesWithLockFile>true</RestorePackagesWithLockFile> (commit the lockfile) or adopt Directory.Packages.props. Advisory — never scored.
NuGet dependencies are not locked BTDB.LSM.Azure/BTDB.LSM.Azure.csproj:28— BTDB.LSM.Azure/BTDB.LSM.Azure.csproj declares NuGet packages that no committed packages.lock.json resolves and no central package management pins — restores aren't reproducible or pinned (SSDF PW.4.4). Enable <RestorePackagesWithLockFile>true</RestorePackagesWithLockFile> (commit the lockfile) or adopt Directory.Packages.props. Advisory — never scored.
NuGet dependencies are not locked BTDB.LSM.Process.Test/BTDB.LSM.Process.Test.csproj:12— BTDB.LSM.Process.Test/BTDB.LSM.Process.Test.csproj declares NuGet packages that no committed packages.lock.json resolves and no central package management pins — restores aren't reproducible or pinned (SSDF PW.4.4). Enable <RestorePackagesWithLockFile>true</RestorePackagesWithLockFile> (commit the lockfile) or adopt Directory.Packages.props. Advisory — never scored.
NuGet dependencies are not locked BTDB.LSM.Test/BTDB.LSM.Test.csproj:10— BTDB.LSM.Test/BTDB.LSM.Test.csproj declares NuGet packages that no committed packages.lock.json resolves and no central package management pins — restores aren't reproducible or pinned (SSDF PW.4.4). Enable <RestorePackagesWithLockFile>true</RestorePackagesWithLockFile> (commit the lockfile) or adopt Directory.Packages.props. Advisory — never scored.
NuGet dependencies are not locked BTDB.Replication.Azure.Test/BTDB.Replication.Azure.Test.csproj:13— BTDB.Replication.Azure.Test/BTDB.Replication.Azure.Test.csproj declares NuGet packages that no committed packages.lock.json resolves and no central package management pins — restores aren't reproducible or pinned (SSDF PW.4.4). Enable <RestorePackagesWithLockFile>true</RestorePackagesWithLockFile> (commit the lockfile) or adopt Directory.Packages.props. Advisory — never scored.
NuGet dependencies are not locked BTDB.Replication.Azure/BTDB.Replication.Azure.csproj:27— BTDB.Replication.Azure/BTDB.Replication.Azure.csproj declares NuGet packages that no committed packages.lock.json resolves and no central package management pins — restores aren't reproducible or pinned (SSDF PW.4.4). Enable <RestorePackagesWithLockFile>true</RestorePackagesWithLockFile> (commit the lockfile) or adopt Directory.Packages.props. Advisory — never scored.
NuGet dependencies are not locked BTDB.Replication.EventSourcing.Test/BTDB.Replication.EventSourcing.Test.csproj:14— BTDB.Replication.EventSourcing.Test/BTDB.Replication.EventSourcing.Test.csproj declares NuGet packages that no committed packages.lock.json resolves and no central package management pins — restores aren't reproducible or pinned (SSDF PW.4.4). Enable <RestorePackagesWithLockFile>true</RestorePackagesWithLockFile> (commit the lockfile) or adopt Directory.Packages.props. Advisory — never scored.
NuGet dependencies are not locked BTDB.Replication.Http.Test/BTDB.Replication.Http.Test.csproj:10— BTDB.Replication.Http.Test/BTDB.Replication.Http.Test.csproj declares NuGet packages that no committed packages.lock.json resolves and no central package management pins — restores aren't reproducible or pinned (SSDF PW.4.4). Enable <RestorePackagesWithLockFile>true</RestorePackagesWithLockFile> (commit the lockfile) or adopt Directory.Packages.props. Advisory — never scored.
NuGet dependencies are not locked BTDB.Replication.Process.Test/BTDB.Replication.Process.Test.csproj:14— BTDB.Replication.Process.Test/BTDB.Replication.Process.Test.csproj declares NuGet packages that no committed packages.lock.json resolves and no central package management pins — restores aren't reproducible or pinned (SSDF PW.4.4). Enable <RestorePackagesWithLockFile>true</RestorePackagesWithLockFile> (commit the lockfile) or adopt Directory.Packages.props. Advisory — never scored.
NuGet dependencies are not locked BTDB.Replication.Test/BTDB.Replication.Test.csproj:10— BTDB.Replication.Test/BTDB.Replication.Test.csproj declares NuGet packages that no committed packages.lock.json resolves and no central package management pins — restores aren't reproducible or pinned (SSDF PW.4.4). Enable <RestorePackagesWithLockFile>true</RestorePackagesWithLockFile> (commit the lockfile) or adopt Directory.Packages.props. Advisory — never scored.
NuGet dependencies are not locked BTDB.SourceGenerator.Test/BTDB.SourceGenerator.Tests.csproj:15— BTDB.SourceGenerator.Test/BTDB.SourceGenerator.Tests.csproj declares NuGet packages that no committed packages.lock.json resolves and no central package management pins — restores aren't reproducible or pinned (SSDF PW.4.4). Enable <RestorePackagesWithLockFile>true</RestorePackagesWithLockFile> (commit the lockfile) or adopt Directory.Packages.props. Advisory — never scored.
NuGet dependencies are not locked BTDB.SourceGenerator/BTDB.SourceGenerator.csproj:30— BTDB.SourceGenerator/BTDB.SourceGenerator.csproj declares NuGet packages that no committed packages.lock.json resolves and no central package management pins — restores aren't reproducible or pinned (SSDF PW.4.4). Enable <RestorePackagesWithLockFile>true</RestorePackagesWithLockFile> (commit the lockfile) or adopt Directory.Packages.props. Advisory — never scored.
NuGet dependencies are not locked BTDB/BTDB.csproj:31— BTDB/BTDB.csproj declares NuGet packages that no committed packages.lock.json resolves and no central package management pins — restores aren't reproducible or pinned (SSDF PW.4.4). Enable <RestorePackagesWithLockFile>true</RestorePackagesWithLockFile> (commit the lockfile) or adopt Directory.Packages.props. Advisory — never scored.
NuGet dependencies are not locked BTDBTest/BTDBTest.csproj:12— BTDBTest/BTDBTest.csproj declares NuGet packages that no committed packages.lock.json resolves and no central package management pins — restores aren't reproducible or pinned (SSDF PW.4.4). Enable <RestorePackagesWithLockFile>true</RestorePackagesWithLockFile> (commit the lockfile) or adopt Directory.Packages.props. Advisory — never scored.
NuGet dependencies are not locked DBBenchmark/DBBenchmark.csproj:23— DBBenchmark/DBBenchmark.csproj declares NuGet packages that no committed packages.lock.json resolves and no central package management pins — restores aren't reproducible or pinned (SSDF PW.4.4). Enable <RestorePackagesWithLockFile>true</RestorePackagesWithLockFile> (commit the lockfile) or adopt Directory.Packages.props. Advisory — never scored.
NuGet dependencies are not locked EventLogBench/EventLogBench.csproj:17— EventLogBench/EventLogBench.csproj declares NuGet packages that no committed packages.lock.json resolves and no central package management pins — restores aren't reproducible or pinned (SSDF PW.4.4). Enable <RestorePackagesWithLockFile>true</RestorePackagesWithLockFile> (commit the lockfile) or adopt Directory.Packages.props. Advisory — never scored.
NuGet dependencies are not locked ODbDump/ODbDump.csproj:19— ODbDump/ODbDump.csproj declares NuGet packages that no committed packages.lock.json resolves and no central package management pins — restores aren't reproducible or pinned (SSDF PW.4.4). Enable <RestorePackagesWithLockFile>true</RestorePackagesWithLockFile> (commit the lockfile) or adopt Directory.Packages.props. Advisory — never scored.
NuGet dependencies are not locked Releaser/Releaser/Releaser.csproj:14— Releaser/Releaser/Releaser.csproj declares NuGet packages that no committed packages.lock.json resolves and no central package management pins — restores aren't reproducible or pinned (SSDF PW.4.4). Enable <RestorePackagesWithLockFile>true</RestorePackagesWithLockFile> (commit the lockfile) or adopt Directory.Packages.props. Advisory — never scored.
NuGet dependencies are not locked Sample3rdPartyLib/Sample3rdPartyLib.csproj:11— Sample3rdPartyLib/Sample3rdPartyLib.csproj declares NuGet packages that no committed packages.lock.json resolves and no central package management pins — restores aren't reproducible or pinned (SSDF PW.4.4). Enable <RestorePackagesWithLockFile>true</RestorePackagesWithLockFile> (commit the lockfile) or adopt Directory.Packages.props. Advisory — never scored.
NuGet dependencies are not locked SimpleTester/SimpleTester.csproj:13— SimpleTester/SimpleTester.csproj declares NuGet packages that no committed packages.lock.json resolves and no central package management pins — restores aren't reproducible or pinned (SSDF PW.4.4). Enable <RestorePackagesWithLockFile>true</RestorePackagesWithLockFile> (commit the lockfile) or adopt Directory.Packages.props. Advisory — never scored.
D4 · Code Duplication· Edited copy of a member (9 corresponding lines) · ×22
Edited copy of a member (9 corresponding lines) BTDB.LSM/LsmKeyValueDBCursor.cs:163— BTDB.LSM/LsmKeyValueDBCursor.cs:163-171 | BTDB.LSM/LsmKeyValueDBCursor.cs:174-182 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) DBBenchmark/LSM/LsmStorageScreening.cs:379— DBBenchmark/LSM/LsmStorageScreening.cs:379-388 | DBBenchmark/LSM/LsmStorageScreening.cs:390-398 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) BTDB/KVDBLayer/Implementation/FileCollectionWithFileInfos.cs:212— BTDB/KVDBLayer/Implementation/FileCollectionWithFileInfos.cs:212-220 | BTDB/KVDBLayer/Implementation/LazyFileCollectionWithFileInfos.cs:147-156 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) BTDB.LSM/Format/BloomFilter.cs:43— BTDB.LSM/Format/BloomFilter.cs:43-51 | BTDB.LSM/Format/BloomFilter.cs:54-65 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) BTDB/BTreeLib/BTreeImpl12.cs:579— BTDB/BTreeLib/BTreeImpl12.cs:579-587 | BTDB/BTreeLib/BTreeImpl12.cs:590-598 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) BTDB.LSM/Engine/MergingIterator.cs:78— BTDB.LSM/Engine/MergingIterator.cs:78-86 | BTDB.LSM/Engine/MergingIterator.cs:89-97 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) BTDB.SourceGenerator/Main.cs:1745— BTDB.SourceGenerator/Main.cs:1745-1753 | BTDB/ODBLayer/RelationInfo.cs:2359-2369 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) BTDB/EventStoreLayer/NullableTypeDescriptor.cs:391— BTDB/EventStoreLayer/NullableTypeDescriptor.cs:391-400 | BTDB/FieldHandler/NullableFieldHandler.cs:128-136 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) AotQuerySmoke/Program.cs:212— AotQuerySmoke/Program.cs:212-221 | AotActionsSmoke/Program.cs:239-247 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) BTDB.Replication/FileSystem/FileSystemReplicationStorage.cs:75— BTDB.Replication/FileSystem/FileSystemReplicationStorage.cs:75-84 | BTDB.Replication/EventLog/FileSystemEventLogStorage.cs:42-50 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) BTDB/ODBLayer/RelationBuilder.cs:246— BTDB/ODBLayer/RelationBuilder.cs:246-255 | BTDB/ODBLayer/TableFieldInfo.cs:108-116 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) BTDB/Reactive/FastBehaviourSubject.cs:41— BTDB/Reactive/FastBehaviourSubject.cs:41-49 | BTDB/Reactive/FastSubject.cs:24-32 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) BTDB/KVDBLayer/Implementation/BTreeKeyValueDBTransaction.cs:237— BTDB/KVDBLayer/Implementation/BTreeKeyValueDBTransaction.cs:237-245 | BTDB/KVDBLayer/MemoryImplementation/InMemoryKeyValueDBTransaction.cs:177-185 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) BTDB/KVDBLayer/Implementation/OnDiskReplicationFileStorage.cs:495— BTDB/KVDBLayer/Implementation/OnDiskReplicationFileStorage.cs:495-503 | BTDB.Replication/ReplicationFileSet.Streaming.cs:126-134 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) BTDB/Collections/RefDictionary.cs:69— BTDB/Collections/RefDictionary.cs:69-78 | BTDB/Collections/SpanByteNoRemoveDictionary.cs:62-70 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) BTDB/KVDBLayer/Implementation/OnDiskFileCollection.cs:43— BTDB/KVDBLayer/Implementation/OnDiskFileCollection.cs:43-51 | BTDB/KVDBLayer/Implementation/OnDiskMemoryMappedFileCollection.cs:46-55 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) BTDB/EventStoreLayer/DictionaryTypeDescriptor.cs:261— BTDB/EventStoreLayer/DictionaryTypeDescriptor.cs:261-270 | BTDB/EventStoreLayer/ListTypeDescriptor.cs:269-277 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) BTDB/FieldHandler/EncryptedStringHandler.cs:86— BTDB/FieldHandler/EncryptedStringHandler.cs:86-94 | BTDB/FieldHandler/OrderedEncryptedStringHandler.cs:86-94 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) BTDB/FieldHandler/EncryptedStringHandler.cs:186— BTDB/FieldHandler/EncryptedStringHandler.cs:186-194 | BTDB/FieldHandler/OrderedEncryptedStringHandler.cs:183-191 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) BTDB/EventStoreLayer/ListTypeDescriptor.cs:102— BTDB/EventStoreLayer/ListTypeDescriptor.cs:102-110 | BTDB/EventStoreLayer/NullableTypeDescriptor.cs:96-104 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) BTDB/EventStoreLayer/ObjectTypeDescriptor.cs:698— BTDB/EventStoreLayer/ObjectTypeDescriptor.cs:698-706 | BTDB.SourceGenerator/Main.cs:6352-6360 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) BTDB/Collections/LruCache.cs:186— BTDB/Collections/LruCache.cs:186-194 | BTDB/Collections/SpanByteLruCache.cs:258-268 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
X2 · Cancellation propagation· Async method without CancellationToken · ×22
Async method without CancellationToken: ExportAsync BTDB/KVDBLayer/Helpers/KeyValueDBExportImporter.cs:16— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: ImportAsync BTDB/KVDBLayer/Helpers/KeyValueDBExportImporter.cs:118— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: ReadSizedAsync BTDB/KVDBLayer/Helpers/KeyValueDBExportImporter.cs:228— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: ReadFullyAsync BTDB/KVDBLayer/Helpers/KeyValueDBExportImporter.cs:247— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: ReferenceDurableLastCommittedAsync BTDB/KVDBLayer/Implementation/BTreeKeyValueDB.cs:709— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: FlushTransactionLog BTDB/KVDBLayer/Implementation/BTreeKeyValueDB.cs:1695— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: StartWritingTransaction BTDB/KVDBLayer/Implementation/BTreeKeyValueDB.cs:1794— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: Run BTDB/KVDBLayer/Implementation/Compactor.cs:104— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: Run BTDB/KVDBLayer/Implementation/ReplicationCompactor.cs:82— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: StartWritingTransaction BTDB/ODBLayer/ObjectDB.cs:239— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: InitializeRelations BTDB/ODBLayer/ObjectDB.cs:318— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: TryInitializeRelationsWithoutWriting BTDB/ODBLayer/ObjectDB.cs:336— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: RunAsync DBBenchmark/EventLog/EventLogStorageScreening.cs:23— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: RunAsync DBBenchmark/LSM/LsmAzureBenchmark.cs:80— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: CompareBTree DBBenchmark/LSM/LsmAzureBenchmark.cs:256— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: RunAsync DBBenchmark/LSM/LsmDurableBenchmark.cs:124— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: RunAsync DBBenchmark/LSM/LsmSpillBenchmark.cs:124— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: RunAsync DBBenchmark/LSM/LsmStorageScreening.cs:30— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: RunAsync DBBenchmark/Replication/ClockMeasurement.cs:41— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: GlobalSetup DBBenchmark/Replication/ReplicationCommitBenchmark.cs:47— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: Commit DBBenchmark/Replication/ReplicationCommitBenchmark.cs:85— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: Cleanup DBBenchmark/Replication/ReplicationCommitBenchmark.cs:96— No CancellationToken parameter — this work can't be stopped early once started.
BarePragmaDisable BTDB/EventStoreLayer/TypeSerializers.cs:325— #pragma warning disable CS0162 // Unreachable code detected — the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line — what makes this site legitimately different — or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
BarePragmaDisable BTDB/ODBLayer/RelationInfo.cs:278— #pragma warning disable CS0162 // Unreachable code detected — the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line — what makes this site legitimately different — or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
BarePragmaDisable BTDB/ODBLayer/RelationInfo.cs:545— #pragma warning disable CS0162 // Unreachable code detected — the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line — what makes this site legitimately different — or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
BarePragmaDisable BTDB/ODBLayer/TableInfo.cs:309— #pragma warning disable CS0162 // Unreachable code detected — the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line — what makes this site legitimately different — or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
BarePragmaDisable BTDB/ODBLayer/TableInfo.cs:608— #pragma warning disable CS0162 // Unreachable code detected — the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line — what makes this site legitimately different — or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
BarePragmaDisable BTDB/Interpreter/Interpreter.cs:3576— #pragma warning disable CS0649 — the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line — what makes this site legitimately different — or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
BarePragmaDisable BTDB/KVDBLayer/Implementation/ChunkStorageInKV.cs:112— #pragma warning disable 420 — the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line — what makes this site legitimately different — or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
BarePragmaDisable BTDB/StreamLayer/MemWriter.cs:969— #pragma warning disable 612, 618 — the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line — what makes this site legitimately different — or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
BarePragmaDisable BTDBTest/AssertionException.cs:21— #pragma warning disable SYSLIB0051 — the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line — what makes this site legitimately different — or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
BarePragmaDisable BTDBTest/EventStoreTest.cs:231— #pragma warning disable 659 — the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line — what makes this site legitimately different — or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
BarePragmaDisable BTDBTest/EventStoreTest.cs:329— #pragma warning disable 659 — the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line — what makes this site legitimately different — or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
BarePragmaDisable BTDBTest/TypeSerializersTest.cs:152— #pragma warning disable 659 — the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line — what makes this site legitimately different — or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
BarePragmaDisable BTDBTest/ObjectDBTest.cs:814— #pragma warning disable CS8714 — the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line — what makes this site legitimately different — or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
BarePragmaDisable BTDBTest/ObjectDBTest.cs:826— #pragma warning disable CS8714 — the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line — what makes this site legitimately different — or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
BarePragmaDisable BTDBTest/ObjectDBTest.cs:869— #pragma warning disable CS8714 — the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line — what makes this site legitimately different — or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
BarePragmaDisable BTDBTest/ObjectDBTest.cs:954— #pragma warning disable CS8714 — the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line — what makes this site legitimately different — or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
BarePragmaDisable BTDBTest/ObjectDBTest.cs:966— #pragma warning disable CS8714 — the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line — what makes this site legitimately different — or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
BarePragmaDisable BTDBTest/ObjectDBTest.cs:1001— #pragma warning disable CS8714 — the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line — what makes this site legitimately different — or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
BarePragmaDisable BTDBTest/SerializationTests/MemoryLayoutTest.cs:12— #pragma warning disable CS0169, CS0649 — the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line — what makes this site legitimately different — or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
BarePragmaDisable SimpleTester/RelationPartialView.cs:113— #pragma warning disable CA1816 — the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line — what makes this site legitimately different — or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
D4 · Code Duplication· Edited copy of a member (8 corresponding lines) · ×20
Edited copy of a member (8 corresponding lines) BTDB.Replication.Http/HttpReplicationPeerTransport.cs:280— BTDB.Replication.Http/HttpReplicationPeerTransport.cs:280-289 | BTDB.Replication.Http/HttpReplicationPeerTransport.cs:293-300 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) BTDB/KVDBLayer/Implementation/InMemoryFileCollection.cs:111— BTDB/KVDBLayer/Implementation/InMemoryFileCollection.cs:111-118 | BTDB/KVDBLayer/Implementation/InMemoryReplicationFileStorage.cs:111-118 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) BTDB/KVDBLayer/Implementation/OnDiskReplicationFileStorage.cs:462— BTDB/KVDBLayer/Implementation/OnDiskReplicationFileStorage.cs:462-469 | BTDB.Replication/ReplicationFileSet.Streaming.cs:93-100 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) BTDB/ODBLayer/RelationInfo.cs:1816— BTDB/ODBLayer/RelationInfo.cs:1816-1823 | BTDB/ODBLayer/RelationInfo.cs:1886-1893 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) BTDB/ODBLayer/Constraint.cs:1100— BTDB/ODBLayer/Constraint.cs:1100-1108 | BTDB/ODBLayer/Constraint.cs:1111-1118 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) BTDB/Interpreter/Interpreter.cs:693— BTDB/Interpreter/Interpreter.cs:693-700 | BTDB/Interpreter/Interpreter.cs:741-748 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) BTDB/KVDBLayer/Implementation/OnDiskMemoryMappedFileCollection.cs:197— BTDB/KVDBLayer/Implementation/OnDiskMemoryMappedFileCollection.cs:197-204 | BTDB.AzureStorage/AzureBlobFileCollection.cs:879-890 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) DBBenchmark/Replication/BenchmarkReplicationStorage.cs:142— DBBenchmark/Replication/BenchmarkReplicationStorage.cs:142-149 | DBBenchmark/Replication/BenchmarkReplicationStorage.cs:152-159 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) BTDB.Replication/FileSystem/FileSystemReplicationStorage.cs:167— BTDB.Replication/FileSystem/FileSystemReplicationStorage.cs:167-174 | BTDB.Replication/FileSystem/FileSystemReplicationStorage.cs:177-186 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) BTDB/KVDBLayer/Implementation/InMemoryFileCollection.cs:121— BTDB/KVDBLayer/Implementation/InMemoryFileCollection.cs:121-128 | BTDB/KVDBLayer/Implementation/InMemoryReplicationFileStorage.cs:121-128 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) BTDB/ODBLayer/ODBLazyUlongListFieldHandler.cs:59— BTDB/ODBLayer/ODBLazyUlongListFieldHandler.cs:59-66 | BTDB/ODBLayer/ODBRoaringBitmapFieldHandler.cs:59-66 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) BTDB.SourceGenerator/Extensions.cs:191— BTDB.SourceGenerator/Extensions.cs:191-198 | BTDB.SourceGenerator/Main.cs:1326-1335 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) BTDB/KVDBLayer/Implementation/OnDiskMemoryMappedFileCollection.cs:81— BTDB/KVDBLayer/Implementation/OnDiskMemoryMappedFileCollection.cs:81-88 | BTDB.AzureStorage/AzureBlobFileCollection.cs:751-758 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) BTDB/KVDBLayer/Implementation/InMemoryFileCollection.cs:167— BTDB/KVDBLayer/Implementation/InMemoryFileCollection.cs:167-174 | BTDB/KVDBLayer/Implementation/InMemoryReplicationFileStorage.cs:167-174 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) BTDB/FieldHandler/ListFieldHandler.cs:52— BTDB/FieldHandler/ListFieldHandler.cs:52-59 | BTDB/FieldHandler/ListFieldOrderedHandler.cs:53-60 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) BTDB/KVDBLayer/Implementation/OnDiskFileCollection.cs:150— BTDB/KVDBLayer/Implementation/OnDiskFileCollection.cs:150-158 | BTDB/StreamLayer/PositionLessStreamReader.cs:104-111 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) BTDB/ODBLayer/ODBDictionary.cs:466— BTDB/ODBLayer/ODBDictionary.cs:466-474 | BTDB/ODBLayer/ODBSet.cs:260-267 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) BTDB/ODBLayer/ODBDictionary.cs:477— BTDB/ODBLayer/ODBDictionary.cs:477-485 | BTDB/ODBLayer/ODBSet.cs:270-277 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) BTDB/ODBLayer/ODBDictionary.cs:920— BTDB/ODBLayer/ODBDictionary.cs:920-927 | BTDB/ODBLayer/RelationEnumerator.cs:1208-1215 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) BTDB/Buffer/XxHash64.cs:144— BTDB/Buffer/XxHash64.cs:144-151 | BTDB.SourceGenerator/HashCode.cs:242-249 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Sync-over-async (deadlock risk) BTDB/ChunkCache/DiskChunkCache.cs:398— Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` can deadlock (and wastes a thread). Prefer awaiting it: make the caller `async` and `await` instead. Where a synchronous entry point must stay — a public sync API you cannot break, or a process entry point that must not return until the work finishes — the block belongs in ONE documented bridge and never inside code that is already async; and where it already is that bridge, give the wait a TIMEOUT so a hung task fails the call instead of hanging the process.
Sync-over-async (deadlock risk) BTDB/IOC/ContainerImpl.cs:1005— Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` can deadlock (and wastes a thread). Prefer awaiting it: make the caller `async` and `await` instead. Where a synchronous entry point must stay — a public sync API you cannot break, or a process entry point that must not return until the work finishes — the block belongs in ONE documented bridge and never inside code that is already async; and where it already is that bridge, give the wait a TIMEOUT so a hung task fails the call instead of hanging the process.
Sync-over-async (deadlock risk) BTDB/KVDBLayer/Implementation/LazyFileCollectionWithFileInfos.cs:139— Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` can deadlock (and wastes a thread). Prefer awaiting it: make the caller `async` and `await` instead. Where a synchronous entry point must stay — a public sync API you cannot break, or a process entry point that must not return until the work finishes — the block belongs in ONE documented bridge and never inside code that is already async; and where it already is that bridge, give the wait a TIMEOUT so a hung task fails the call instead of hanging the process.
Sync-over-async (deadlock risk) BTDB/ODBLayer/LazyUlongList.cs:195— Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` can deadlock (and wastes a thread). Prefer awaiting it: make the caller `async` and `await` instead. Where a synchronous entry point must stay — a public sync API you cannot break, or a process entry point that must not return until the work finishes — the block belongs in ONE documented bridge and never inside code that is already async; and where it already is that bridge, give the wait a TIMEOUT so a hung task fails the call instead of hanging the process.
Sync-over-async (deadlock risk) BTDB/ODBLayer/RoaringBitmap.cs:648— Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` can deadlock (and wastes a thread). Prefer awaiting it: make the caller `async` and `await` instead. Where a synchronous entry point must stay — a public sync API you cannot break, or a process entry point that must not return until the work finishes — the block belongs in ONE documented bridge and never inside code that is already async; and where it already is that bridge, give the wait a TIMEOUT so a hung task fails the call instead of hanging the process.
Sync-over-async (deadlock risk) DBBenchmark/LSM/LsmSpillBenchmark.cs:120— Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` wastes a thread and, if the task needs a context this one is holding, deadlocks. `Dispose()` returns void by contract, so it cannot simply `await`: signal the work to stop first (cancel its token, set its stop flag) so the wait is short, give the wait a TIMEOUT so a hung task cannot hang shutdown, and — where callers can use it — add an awaitable teardown (`DisposeAsync`/`StopAsync`) beside the synchronous one and let `Dispose()` remain the bounded fallback.
Sync-over-async (deadlock risk) DBBenchmark/TransactionBatchingBenchmark.cs:43— Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` can deadlock (and wastes a thread). Prefer awaiting it: make the caller `async` and `await` instead. Where a synchronous entry point must stay — a public sync API you cannot break, or a process entry point that must not return until the work finishes — the block belongs in ONE documented bridge and never inside code that is already async; and where it already is that bridge, give the wait a TIMEOUT so a hung task fails the call instead of hanging the process.
Sync-over-async (deadlock risk) DBBenchmark/TransactionBatchingBenchmark.cs:74— Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` can deadlock (and wastes a thread). Prefer awaiting it: make the caller `async` and `await` instead. Where a synchronous entry point must stay — a public sync API you cannot break, or a process entry point that must not return until the work finishes — the block belongs in ONE documented bridge and never inside code that is already async; and where it already is that bridge, give the wait a TIMEOUT so a hung task fails the call instead of hanging the process.
Sync-over-async (deadlock risk) DBBenchmark/TransactionBatchingBenchmark.cs:87— Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` can deadlock (and wastes a thread). Prefer awaiting it: make the caller `async` and `await` instead. Where a synchronous entry point must stay — a public sync API you cannot break, or a process entry point that must not return until the work finishes — the block belongs in ONE documented bridge and never inside code that is already async; and where it already is that bridge, give the wait a TIMEOUT so a hung task fails the call instead of hanging the process.
Sync-over-async (deadlock risk) DBBenchmark/TransactionBatchingBenchmark.cs:100— Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` can deadlock (and wastes a thread). Prefer awaiting it: make the caller `async` and `await` instead. Where a synchronous entry point must stay — a public sync API you cannot break, or a process entry point that must not return until the work finishes — the block belongs in ONE documented bridge and never inside code that is already async; and where it already is that bridge, give the wait a TIMEOUT so a hung task fails the call instead of hanging the process.
Sync-over-async (deadlock risk) BTDB.AzureStorage/AzureBlobFileCollection.cs:238— Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` wastes a thread and, if the task needs a context this one is holding, deadlocks. `Dispose()` returns void by contract, so it cannot simply `await`: signal the work to stop first (cancel its token, set its stop flag) so the wait is short, give the wait a TIMEOUT so a hung task cannot hang shutdown, and — where callers can use it — add an awaitable teardown (`DisposeAsync`/`StopAsync`) beside the synchronous one and let `Dispose()` remain the bounded fallback.
Sync-over-async (deadlock risk) BTDB.Replication/ReplicationFileSet.Collection.cs:392— Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` wastes a thread and, if the task needs a context this one is holding, deadlocks. `Dispose()` returns void by contract, so it cannot simply `await`: signal the work to stop first (cancel its token, set its stop flag) so the wait is short, give the wait a TIMEOUT so a hung task cannot hang shutdown, and — where callers can use it — add an awaitable teardown (`DisposeAsync`/`StopAsync`) beside the synchronous one and let `Dispose()` remain the bounded fallback.
Sync-over-async (deadlock risk) BTDB.Replication.Azure/AzureReplicationStorage.cs:533— Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` can deadlock (and wastes a thread). Prefer awaiting it: make the caller `async` and `await` instead. Where a synchronous entry point must stay — a public sync API you cannot break, or a process entry point that must not return until the work finishes — the block belongs in ONE documented bridge and never inside code that is already async; and where it already is that bridge, give the wait a TIMEOUT so a hung task fails the call instead of hanging the process.
Sync-over-async (deadlock risk) BTDB.Replication.Azure/AzureReplicationStorage.cs:596— Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` wastes a thread and, if the task needs a context this one is holding, deadlocks. `Dispose()` returns void by contract, so it cannot simply `await`: signal the work to stop first (cancel its token, set its stop flag) so the wait is short, give the wait a TIMEOUT so a hung task cannot hang shutdown, and — where callers can use it — add an awaitable teardown (`DisposeAsync`/`StopAsync`) beside the synchronous one and let `Dispose()` remain the bounded fallback.
Sync-over-async (deadlock risk) BTDB.LSM/Format/Table.cs:464— Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` can deadlock (and wastes a thread). Prefer awaiting it: make the caller `async` and `await` instead. Where a synchronous entry point must stay — a public sync API you cannot break, or a process entry point that must not return until the work finishes — the block belongs in ONE documented bridge and never inside code that is already async; and where it already is that bridge, give the wait a TIMEOUT so a hung task fails the call instead of hanging the process.
Sync-over-async (deadlock risk) BTDB.LSM/Format/Table.cs:731— Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` can deadlock (and wastes a thread). Prefer awaiting it: make the caller `async` and `await` instead. Where a synchronous entry point must stay — a public sync API you cannot break, or a process entry point that must not return until the work finishes — the block belongs in ONE documented bridge and never inside code that is already async; and where it already is that bridge, give the wait a TIMEOUT so a hung task fails the call instead of hanging the process.
Sync-over-async (deadlock risk) BTDB.LSM/LsmKeyValueDB.Background.cs:440— Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` can deadlock (and wastes a thread). Prefer awaiting it: make the caller `async` and `await` instead. Where a synchronous entry point must stay — a public sync API you cannot break, or a process entry point that must not return until the work finishes — the block belongs in ONE documented bridge and never inside code that is already async; and where it already is that bridge, give the wait a TIMEOUT so a hung task fails the call instead of hanging the process.
Sync-over-async (deadlock risk) BTDB.LSM/LsmKeyValueDB.Background.cs:442— Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` can deadlock (and wastes a thread). Prefer awaiting it: make the caller `async` and `await` instead. Where a synchronous entry point must stay — a public sync API you cannot break, or a process entry point that must not return until the work finishes — the block belongs in ONE documented bridge and never inside code that is already async; and where it already is that bridge, give the wait a TIMEOUT so a hung task fails the call instead of hanging the process.
Sync-over-async (deadlock risk) BTDB.LSM/LsmKeyValueDB.Background.cs:560— Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` can deadlock (and wastes a thread). Prefer awaiting it: make the caller `async` and `await` instead. Where a synchronous entry point must stay — a public sync API you cannot break, or a process entry point that must not return until the work finishes — the block belongs in ONE documented bridge and never inside code that is already async; and where it already is that bridge, give the wait a TIMEOUT so a hung task fails the call instead of hanging the process.
Sync-over-async (deadlock risk) BTDB.LSM/LsmKeyValueDB.cs:212— Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` can deadlock (and wastes a thread). Prefer awaiting it: make the caller `async` and `await` instead. Where a synchronous entry point must stay — a public sync API you cannot break, or a process entry point that must not return until the work finishes — the block belongs in ONE documented bridge and never inside code that is already async; and where it already is that bridge, give the wait a TIMEOUT so a hung task fails the call instead of hanging the process.
No authorization — No [Authorize]/policies and no imperative guard methods (throw-on-violation) were found — endpoints may be unprotected.
No authorization BTDB.Replication.Http/HttpEventLogPeerTransport.cs:63— `MapPost("/submit")` serves requests and nothing authorizes it: no [Authorize] or RequireAuthorization on it or its controller/group, no fallback policy, no auth-gate middleware and no imperative guard in this codebase.
No authorization BTDB.Replication.Http/HttpEventLogPeerTransport.cs:69— `MapPost("/bounds")` serves requests and nothing authorizes it: no [Authorize] or RequireAuthorization on it or its controller/group, no fallback policy, no auth-gate middleware and no imperative guard in this codebase.
No authorization BTDB.Replication.Http/HttpEventLogPeerTransport.cs:75— `MapPost("/subscribe")` serves requests and nothing authorizes it: no [Authorize] or RequireAuthorization on it or its controller/group, no fallback policy, no auth-gate middleware and no imperative guard in this codebase.
No authorization BTDB.Replication.Http/HttpReplicationPeerTransport.cs:44— `MapPost(Path)` serves requests and nothing authorizes it: no [Authorize] or RequireAuthorization on it or its controller/group, no fallback policy, no auth-gate middleware and no imperative guard in this codebase.
No authorization BTDB.Replication/LeaseSessionController.cs:24— `LeaseSessionController.ProposeTransfer` serves requests and nothing authorizes it: no [Authorize] or RequireAuthorization on it or its controller/group, no fallback policy, no auth-gate middleware and no imperative guard in this codebase.
No authorization BTDB.Replication/LeaseSessionController.cs:29— `LeaseSessionController.TransferAsync` serves requests and nothing authorizes it: no [Authorize] or RequireAuthorization on it or its controller/group, no fallback policy, no auth-gate middleware and no imperative guard in this codebase.
No authorization BTDB.Replication/LeaseSessionController.cs:42— `LeaseSessionController.Disqualify` serves requests and nothing authorizes it: no [Authorize] or RequireAuthorization on it or its controller/group, no fallback policy, no auth-gate middleware and no imperative guard in this codebase.
No authorization BTDB.Replication/LeaseSessionController.cs:64— `LeaseSessionController.RunAsync` serves requests and nothing authorizes it: no [Authorize] or RequireAuthorization on it or its controller/group, no fallback policy, no auth-gate middleware and no imperative guard in this codebase.
No authorization BTDB.Replication/LeaseSessionController.cs:116— `LeaseSessionController.MaintainAsync` serves requests and nothing authorizes it: no [Authorize] or RequireAuthorization on it or its controller/group, no fallback policy, no auth-gate middleware and no imperative guard in this codebase.
No authorization BTDB.Replication/LeaseSessionController.cs:176— `LeaseSessionController.Close` serves requests and nothing authorizes it: no [Authorize] or RequireAuthorization on it or its controller/group, no fallback policy, no auth-gate middleware and no imperative guard in this codebase.
No authorization EventLogBench/Program.cs:75— `MapGet("/ctl/info")` serves requests and nothing authorizes it: no [Authorize] or RequireAuthorization on it or its controller/group, no fallback policy, no auth-gate middleware and no imperative guard in this codebase.
No authorization EventLogBench/Program.cs:76— `MapGet("/ctl/clock")` serves requests and nothing authorizes it: no [Authorize] or RequireAuthorization on it or its controller/group, no fallback policy, no auth-gate middleware and no imperative guard in this codebase.
No authorization EventLogBench/Program.cs:77— `MapPost("/ctl/prepare")` serves requests and nothing authorizes it: no [Authorize] or RequireAuthorization on it or its controller/group, no fallback policy, no auth-gate middleware and no imperative guard in this codebase.
No authorization EventLogBench/Program.cs:89— `MapPost("/ctl/start")` serves requests and nothing authorizes it: no [Authorize] or RequireAuthorization on it or its controller/group, no fallback policy, no auth-gate middleware and no imperative guard in this codebase.
No authorization EventLogBench/Program.cs:95— `MapGet("/ctl/status")` serves requests and nothing authorizes it: no [Authorize] or RequireAuthorization on it or its controller/group, no fallback policy, no auth-gate middleware and no imperative guard in this codebase.
No authorization EventLogBench/Program.cs:96— `MapGet("/ctl/storage")` serves requests and nothing authorizes it: no [Authorize] or RequireAuthorization on it or its controller/group, no fallback policy, no auth-gate middleware and no imperative guard in this codebase.
No authorization EventLogBench/Program.cs:97— `MapGet("/ctl/report")` serves requests and nothing authorizes it: no [Authorize] or RequireAuthorization on it or its controller/group, no fallback policy, no auth-gate middleware and no imperative guard in this codebase.
No authorization EventLogBench/Program.cs:98— `MapPost("/ctl/cleanup")` serves requests and nothing authorizes it: no [Authorize] or RequireAuthorization on it or its controller/group, no fallback policy, no auth-gate middleware and no imperative guard in this codebase.
Deprecated: System.Reactive.Core BTDBTest/BTDBTest.csproj:14— System.Reactive.Core 6.1.0 — Legacy — the publisher's replacement is `System.Reactive`; migrate the reference to it.
Deprecated: System.Reactive.Interfaces BTDBTest/BTDBTest.csproj:15— System.Reactive.Interfaces 6.1.0 — Legacy — the publisher's replacement is `System.Reactive`; migrate the reference to it.
Deprecated: Verify.Xunit BTDBTest/BTDBTest.csproj:16— Verify.Xunit 31.12.5 — Legacy — the publisher's replacement is `Verify.XunitV3`; that is the next major line under a new package id, so the move is a breaking rename rather than a version bump — budget for API changes in the code that uses it, not only the reference swap.
Deprecated: Verify.Xunit BTDB.SourceGenerator.Test/BTDB.SourceGenerator.Tests.csproj:24— Verify.Xunit 31.12.5 — Legacy — the publisher's replacement is `Verify.XunitV3`; that is the next major line under a new package id, so the move is a breaking rename rather than a version bump — budget for API changes in the code that uses it, not only the reference swap.
Deprecated: Verify.Xunit BTDB.BackendActions.Test/BTDB.BackendActions.Test.csproj:15— Verify.Xunit 31.12.5 — Legacy — the publisher's replacement is `Verify.XunitV3`; that is the next major line under a new package id, so the move is a breaking rename rather than a version bump — budget for API changes in the code that uses it, not only the reference swap.
Deprecated: xunit BTDBTest/BTDBTest.csproj:17— xunit 2.9.3 — Legacy — the publisher's replacement is `xunit.v3`; that is the next major line under a new package id, so the move is a breaking rename rather than a version bump — budget for API changes in the code that uses it, not only the reference swap.
Deprecated: xunit BTDB.SourceGenerator.Test/BTDB.SourceGenerator.Tests.csproj:25— xunit 2.9.3 — Legacy — the publisher's replacement is `xunit.v3`; that is the next major line under a new package id, so the move is a breaking rename rather than a version bump — budget for API changes in the code that uses it, not only the reference swap.
Deprecated: xunit BTDB.AzureStorage.Test/BTDB.AzureStorage.Test.csproj:10— xunit 2.9.3 — Legacy — the publisher's replacement is `xunit.v3`; that is the next major line under a new package id, so the move is a breaking rename rather than a version bump — budget for API changes in the code that uses it, not only the reference swap.
Deprecated: xunit BTDB.Replication.Test/BTDB.Replication.Test.csproj:11— xunit 2.9.3 — Legacy — the publisher's replacement is `xunit.v3`; that is the next major line under a new package id, so the move is a breaking rename rather than a version bump — budget for API changes in the code that uses it, not only the reference swap.
Deprecated: xunit BTDB.Replication.Azure.Test/BTDB.Replication.Azure.Test.csproj:15— xunit 2.9.3 — Legacy — the publisher's replacement is `xunit.v3`; that is the next major line under a new package id, so the move is a breaking rename rather than a version bump — budget for API changes in the code that uses it, not only the reference swap.
Deprecated: xunit BTDB.Replication.Http.Test/BTDB.Replication.Http.Test.csproj:11— xunit 2.9.3 — Legacy — the publisher's replacement is `xunit.v3`; that is the next major line under a new package id, so the move is a breaking rename rather than a version bump — budget for API changes in the code that uses it, not only the reference swap.
Deprecated: xunit BTDB.Replication.Process.Test/BTDB.Replication.Process.Test.csproj:16— xunit 2.9.3 — Legacy — the publisher's replacement is `xunit.v3`; that is the next major line under a new package id, so the move is a breaking rename rather than a version bump — budget for API changes in the code that uses it, not only the reference swap.
Deprecated: xunit BTDB.Replication.EventSourcing.Test/BTDB.Replication.EventSourcing.Test.csproj:16— xunit 2.9.3 — Legacy — the publisher's replacement is `xunit.v3`; that is the next major line under a new package id, so the move is a breaking rename rather than a version bump — budget for API changes in the code that uses it, not only the reference swap.
Deprecated: xunit BTDB.LSM.Test/BTDB.LSM.Test.csproj:11— xunit 2.9.3 — Legacy — the publisher's replacement is `xunit.v3`; that is the next major line under a new package id, so the move is a breaking rename rather than a version bump — budget for API changes in the code that uses it, not only the reference swap.
Deprecated: xunit BTDB.LSM.Azure.Test/BTDB.LSM.Azure.Test.csproj:13— xunit 2.9.3 — Legacy — the publisher's replacement is `xunit.v3`; that is the next major line under a new package id, so the move is a breaking rename rather than a version bump — budget for API changes in the code that uses it, not only the reference swap.
Deprecated: xunit BTDB.LSM.Process.Test/BTDB.LSM.Process.Test.csproj:13— xunit 2.9.3 — Legacy — the publisher's replacement is `xunit.v3`; that is the next major line under a new package id, so the move is a breaking rename rather than a version bump — budget for API changes in the code that uses it, not only the reference swap.
Deprecated: xunit BTDB.BackendActions.Test/BTDB.BackendActions.Test.csproj:16— xunit 2.9.3 — Legacy — the publisher's replacement is `xunit.v3`; that is the next major line under a new package id, so the move is a breaking rename rather than a version bump — budget for API changes in the code that uses it, not only the reference swap.
Deprecated: xunit BTDB.BackendActions.Process.Test/BTDB.BackendActions.Process.Test.csproj:17— xunit 2.9.3 — Legacy — the publisher's replacement is `xunit.v3`; that is the next major line under a new package id, so the move is a breaking rename rather than a version bump — budget for API changes in the code that uses it, not only the reference swap.
Deprecated: Microsoft.CodeAnalysis.CSharp.SourceGenerators.Testing.XUnit BTDB.SourceGenerator.Test/BTDB.SourceGenerator.Tests.csproj:15— Microsoft.CodeAnalysis.CSharp.SourceGenerators.Testing.XUnit 1.1.2 — Legacy — the publisher's replacement is `Microsoft.CodeAnalysis.CSharp.SourceGenerators.Testing`; migrate the reference to it.
No assertions: CouldBeCreated BTDBTest/BTreeLibTests/RootNode12Tests.cs:27— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: CanCreateSnapshot BTDBTest/BTreeLibTests/RootNode12Tests.cs:35— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: CanRevertToSnapshot BTDBTest/BTreeLibTests/RootNode12Tests.cs:46— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: CreateEmptyCache BTDBTest/DiskChunkCacheTest.cs:120— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: CanFinalizeEventStoreOnEverySectorPosition BTDBTest/EventStoreTest.cs:151— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: UseArrayForStoreIList BTDBTest/EventStoreTest.cs:850— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: StoreListThenArray BTDBTest/EventStoreTest.cs:1214— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: StoreVariousComplexCombinations BTDBTest/EventStoreTest.cs:1224— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: CreateEmptyDatabase BTDBTest/KeyValueDBTestBase.cs:15— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: LocalDateTimeKeysAreRefusedWhenForbidden BTDBTest/ObjectDbDateTimeKeyKindTest.cs:75— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: LocalAndUnspecifiedNullableDateTimeKeysAreRefusedWhenForbidden BTDBTest/ObjectDbDateTimeKeyKindTest.cs:121— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: NeedFreeContentWorksOnComplexInlineClass BTDBTest/ObjectDbTableFreeContentTest.cs:2450— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: AutoRegisterOfRelationWorks BTDBTest/ObjectDbTableTest.cs:2282— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: CheckObjectTypeIsGoodDto_GivenRecord_WhenContainsNotStoredGettersAndGeneratedGetters_ShouldIgnoreGeneratedGetters BTDBTest/ObjectTypeDescriptorTest.cs:26— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: MatchingBatchAndEmptyHeartbeatAreAccepted BTDB.Replication.Test/ReplicationPeerPollTest.cs:19— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: EndpointMayBePlainHttpOrHttpsOutsideLoopback BTDB.Replication.Http.Test/ReplicationHostingTest.cs:422— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
D4 · Code Duplication· Edited copy of a member (11 corresponding lines) · ×16
Edited copy of a member (11 corresponding lines) BTDB/EventStoreLayer/EnumTypeDescriptor.cs:36— BTDB/EventStoreLayer/EnumTypeDescriptor.cs:36-61 | BTDB/FieldHandler/EnumFieldHandler.cs:29-53 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) BTDB.Replication.Azure/AzureEventLogStorage.cs:131— BTDB.Replication.Azure/AzureEventLogStorage.cs:131-150 | BTDB.Replication.Azure/AzureEventLogStorage.cs:154-164 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) BTDB/Buffer/RoaringBitmaps.cs:683— BTDB/Buffer/RoaringBitmaps.cs:683-693 | BTDB/Buffer/RoaringBitmaps.cs:696-706 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) BTDB/KVDBLayer/Helpers/KeyValueDBExportImporter.cs:216— BTDB/KVDBLayer/Helpers/KeyValueDBExportImporter.cs:216-226 | BTDB/KVDBLayer/Helpers/KeyValueDBExportImporter.cs:229-239 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) BTDB/ODBLayer/RelationInfo.cs:1019— BTDB/ODBLayer/RelationInfo.cs:1019-1029 | BTDB/ODBLayer/RelationInfo.cs:1033-1044 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) DBBenchmark/LSM/LsmAzureBenchmark.cs:34— DBBenchmark/LSM/LsmAzureBenchmark.cs:34-44 | DBBenchmark/LSM/LsmSpillBenchmark.cs:42-52 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) BTDB.LSM/Storage/InMemoryLsmStorage.cs:108— BTDB.LSM/Storage/InMemoryLsmStorage.cs:108-119 | BTDB.LSM/Storage/InMemoryLsmStorage.cs:123-133 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) BTDB.LSM/Engine/LevelComponent.cs:131— BTDB.LSM/Engine/LevelComponent.cs:131-143 | BTDB.LSM/Format/Table.cs:443-453 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) BTDB.LSM/Engine/LevelComponent.cs:44— BTDB.LSM/Engine/LevelComponent.cs:44-54 | BTDB.LSM/Engine/LevelComponent.cs:58-68 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) BTDB.Replication/EventLog/FileSystemEventLogStorage.cs:144— BTDB.Replication/EventLog/FileSystemEventLogStorage.cs:144-154 | BTDB.Replication/EventLog/InMemoryEventLogStorage.cs:143-153 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) BTDB/FieldHandler/OrderedEncryptedStringHandler.cs:55— BTDB/FieldHandler/OrderedEncryptedStringHandler.cs:55-65 | BTDB/FieldHandler/OrderedEncryptedStringHandler.cs:73-83 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) DBBenchmark/CompanyUserRoleScanBenchmark.cs:103— DBBenchmark/CompanyUserRoleScanBenchmark.cs:103-113 | DBBenchmark/CompanyUserRoleScanBenchmark.cs:117-127 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) BTDB/EventStoreLayer/EnumTypeDescriptor.cs:575— BTDB/EventStoreLayer/EnumTypeDescriptor.cs:575-585 | BTDB/FieldHandler/EnumFieldHandler.cs:258-268 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) BTDB/KVDBLayer/Implementation/OnDiskMemoryMappedFileCollection.cs:179— BTDB/KVDBLayer/Implementation/OnDiskMemoryMappedFileCollection.cs:179-189 | BTDB.AzureStorage/AzureBlobFileCollection.cs:861-871 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) BTDB.Replication/FileSystem/FileSystemReplicationStorage.cs:88— BTDB.Replication/FileSystem/FileSystemReplicationStorage.cs:88-100 | BTDB.Replication/EventLog/FileSystemEventLogStorage.cs:54-64 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) BTDB/EventStoreLayer/ObjectTypeDescriptor.cs:752— BTDB/EventStoreLayer/ObjectTypeDescriptor.cs:752-762 | BTDB/EventStoreLayer/TupleTypeDescriptor.cs:569-579 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (12 lines × 2) BTDB/IOC/MultiRegistration.cs:94— BTDB/IOC/MultiRegistration.cs:94-105 | BTDB/IOC/MultiRegistration.cs:130-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. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/IOC/MultiRegistration.cs:94` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) BTDB/Bon/Bon.cs:940— BTDB/Bon/Bon.cs:940-951 | BTDB/Bon/Bon.cs:960-971 — both copies are in the same file, so extract the 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) BTDB/FieldHandler/ListFieldHandler.cs:295— BTDB/FieldHandler/ListFieldHandler.cs:295-306 | BTDB/FieldHandler/ListFieldOrderedHandler.cs:256-267 — before extracting anything, compare `BTDB/FieldHandler/ListFieldHandler.cs` and `BTDB/FieldHandler/ListFieldOrderedHandler.cs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 176 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/FieldHandler/ListFieldHandler.cs:295` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) BTDB/ODBLayer/RelationBuilder.cs:846— BTDB/ODBLayer/RelationBuilder.cs:846-857 | BTDB/ODBLayer/RelationBuilder.cs:959-970 — both copies are in the same file, so extract the 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) BTDB/Serialization/BonSerializer.cs:423— BTDB/Serialization/BonSerializer.cs:423-434 | BTDB/Serialization/BonSerializer.cs:454-465 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/Serialization/BonSerializer.cs:423` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `BTDB/Serialization/BonSerializer.cs:453` calls `ListItems` and `BTDB/Serialization/BonSerializer.cs:422` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (12 lines × 2) BTDB/BTreeLib/BTreeImpl12.cs:2061— BTDB/BTreeLib/BTreeImpl12.cs:2061-2072 | BTDB/BTreeLib/BTreeImpl12.cs:2117-2128 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/BTreeLib/BTreeImpl12.cs:2061` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (12 lines × 2) BTDB/BTreeLib/BTreeImpl12.cs:2307— BTDB/BTreeLib/BTreeImpl12.cs:2307-2318 | BTDB/BTreeLib/BTreeImpl12.cs:2360-2371 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/BTreeLib/BTreeImpl12.cs:2307` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (12 lines × 2) BTDB/KVDBLayer/Implementation/Compactor.cs:325— BTDB/KVDBLayer/Implementation/Compactor.cs:325-336 | BTDB/KVDBLayer/Implementation/ReplicationCompactor.cs:250-261 — before extracting anything, compare `BTDB/KVDBLayer/Implementation/Compactor.cs` and `BTDB/KVDBLayer/Implementation/ReplicationCompactor.cs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 132 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (12 lines × 2) BTDB/ODBLayer/RelationBuilder.cs:1025— BTDB/ODBLayer/RelationBuilder.cs:1025-1036 | BTDB/ODBLayer/RelationBuilder.cs:1255-1266 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/ODBLayer/RelationBuilder.cs:1025` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) BTDB/EventStoreLayer/TypeSerializersMapping.cs:447— BTDB/EventStoreLayer/TypeSerializersMapping.cs:447-458 | BTDB/EventStoreLayer/TypeSerializersMapping.cs:532-543 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/EventStoreLayer/TypeSerializersMapping.cs:447` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) BTDB/KVDBLayer/Implementation/Compactor.cs:182— BTDB/KVDBLayer/Implementation/Compactor.cs:182-193 | BTDB/KVDBLayer/Implementation/ReplicationCompactor.cs:128-139 — before extracting anything, compare `BTDB/KVDBLayer/Implementation/Compactor.cs` and `BTDB/KVDBLayer/Implementation/ReplicationCompactor.cs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 132 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/KVDBLayer/Implementation/Compactor.cs:182` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) BTDB/KVDBLayer/Implementation/Compactor.cs:248— BTDB/KVDBLayer/Implementation/Compactor.cs:248-259 | BTDB/KVDBLayer/Implementation/ReplicationCompactor.cs:183-194 — before extracting anything, compare `BTDB/KVDBLayer/Implementation/Compactor.cs` and `BTDB/KVDBLayer/Implementation/ReplicationCompactor.cs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 132 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/KVDBLayer/Implementation/Compactor.cs:248` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `BTDB/KVDBLayer/Implementation/Compactor.cs:247` calls `GetOrFakeValueRef`, `IsFreeToDelete` and `BTDB/KVDBLayer/Implementation/ReplicationCompactor.cs:182` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (12 lines × 2) BTDB/ODBLayer/RelationBuilder.cs:1091— BTDB/ODBLayer/RelationBuilder.cs:1091-1102 | BTDB/ODBLayer/RelationBuilder.cs:1277-1290 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/ODBLayer/RelationBuilder.cs:1091` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (12 lines × 2) BTDB/ODBLayer/RelationBuilder.cs:1120— BTDB/ODBLayer/RelationBuilder.cs:1120-1131 | BTDB/ODBLayer/RelationBuilder.cs:1312-1324 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/ODBLayer/RelationBuilder.cs:1120` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (12 lines × 2) BTDB/StreamLayer/MemWriter.cs:553— BTDB/StreamLayer/MemWriter.cs:553-564 | BTDB/StreamLayer/MemWriter.cs:658-669 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12 lines × 2) BTDB/Reactive/FastBehaviourSubject.cs:53— BTDB/Reactive/FastBehaviourSubject.cs:53-64 | BTDB/Reactive/FastSubject.cs:36-47 — before extracting anything, compare `BTDB/Reactive/FastBehaviourSubject.cs` and `BTDB/Reactive/FastSubject.cs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 73 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication· Edited copy of a member (7 corresponding lines) · ×14
Edited copy of a member (7 corresponding lines) BTDB.LSM/Engine/Memtable.cs:211— BTDB.LSM/Engine/Memtable.cs:211-217 | BTDB.LSM/Engine/Memtable.cs:221-229 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) BTDB.Replication.Azure/AzureLeaderStorage.cs:21— BTDB.Replication.Azure/AzureLeaderStorage.cs:21-27 | BTDB.Replication.Azure/AzureLeaderStorage.cs:59-71 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) BTDB/ODBLayer/RelationDBManipulator.cs:1963— BTDB/ODBLayer/RelationDBManipulator.cs:1963-1969 | BTDB/ODBLayer/RelationDBManipulator.cs:1972-1978 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) BTDB/ODBLayer/RelationQueryInterception.cs:48— BTDB/ODBLayer/RelationQueryInterception.cs:48-54 | BTDB/ODBLayer/RelationQueryInterception.cs:58-64 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) BTDB.SourceGenerator/Main.cs:5570— BTDB.SourceGenerator/Main.cs:5570-5576 | BTDB.SourceGenerator/Main.cs:5579-5586 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) BTDB/ODBLayer/ODBDictionary.cs:228— BTDB/ODBLayer/ODBDictionary.cs:228-234 | BTDB/ODBLayer/ODBSet.cs:154-160 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) BTDB/ODBLayer/RelationQueryCache.cs:641— BTDB/ODBLayer/RelationQueryCache.cs:641-647 | BTDB/ODBLayer/RelationQueryCache.cs:653-659 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) BTDB.AzureStorage/AzureBlobFileCollection.cs:1139— BTDB.AzureStorage/AzureBlobFileCollection.cs:1139-1145 | BTDB.AzureStorage/AzureBlobFileCollection.cs:1166-1173 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) BTDB/EventStoreLayer/NullableTypeDescriptor.cs:43— BTDB/EventStoreLayer/NullableTypeDescriptor.cs:43-50 | BTDB/EventStoreLayer/ListTypeDescriptor.cs:48-54 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) BTDB/KVDBLayer/Implementation/Compactor.cs:371— BTDB/KVDBLayer/Implementation/Compactor.cs:371-377 | BTDB/KVDBLayer/Implementation/ReplicationCompactor.cs:297-303 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) BTDB/ODBLayer/ODBLazyUlongListFieldHandler.cs:69— BTDB/ODBLayer/ODBLazyUlongListFieldHandler.cs:69-75 | BTDB/ODBLayer/ODBRoaringBitmapFieldHandler.cs:69-75 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) BTDB/ODBLayer/ODBLazyUlongListFieldHandler.cs:85— BTDB/ODBLayer/ODBLazyUlongListFieldHandler.cs:85-91 | BTDB/ODBLayer/ODBRoaringBitmapFieldHandler.cs:85-91 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) BTDB/KVDBLayer/Implementation/OnDiskMemoryMappedFileCollection.cs:222— BTDB/KVDBLayer/Implementation/OnDiskMemoryMappedFileCollection.cs:222-231 | BTDB.AzureStorage/AzureBlobFileCollection.cs:621-627 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) BTDB/ODBLayer/ODBDictionary.cs:687— BTDB/ODBLayer/ODBDictionary.cs:687-693 | BTDB/ODBLayer/ODBSet.cs:365-372 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (5 corresponding lines) · ×14
Edited copy of a member (5 corresponding lines) BTDB.LSM/Engine/NativeMemtable.cs:471— BTDB.LSM/Engine/NativeMemtable.cs:471-475 | BTDB.LSM/Engine/Memtable.cs:311-315 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (5 corresponding lines) BTDB/KVDBLayer/Implementation/BTreeKeyValueDBTransaction.cs:269— BTDB/KVDBLayer/Implementation/BTreeKeyValueDBTransaction.cs:269-274 | BTDB/KVDBLayer/MemoryImplementation/InMemoryKeyValueDBTransaction.cs:211-215 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (5 corresponding lines) BTDB/FieldHandler/ByteArrayFieldHandler.cs:39— BTDB/FieldHandler/ByteArrayFieldHandler.cs:39-43 | BTDB/FieldHandler/ByteArrayLastFieldHandler.cs:21-25 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (5 corresponding lines) BTDB/StreamLayer/MemReader.cs:1417— BTDB/StreamLayer/MemReader.cs:1417-1421 | BTDB/StreamLayer/MemWriter.cs:1111-1115 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (5 corresponding lines) BTDB/StreamLayer/BrotliCompressMemWriter.cs:74— BTDB/StreamLayer/BrotliCompressMemWriter.cs:74-78 | BTDB/StreamLayer/HashingMemWriter.cs:39-43 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (5 corresponding lines) BTDB/FieldHandler/ByteArrayFieldHandler.cs:59— BTDB/FieldHandler/ByteArrayFieldHandler.cs:59-63 | BTDB/FieldHandler/ByteArrayLastFieldHandler.cs:52-56 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (5 corresponding lines) BTDB/ODBLayer/RelationQueryCache.cs:181— BTDB/ODBLayer/RelationQueryCache.cs:181-185 | EventLogBench/Model.cs:79-83 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (5 corresponding lines) BTDB/KVDBLayer/Implementation/OnDiskMemoryMappedFileCollection.cs:106— BTDB/KVDBLayer/Implementation/OnDiskMemoryMappedFileCollection.cs:106-110 | BTDB.AzureStorage/AzureBlobFileCollection.cs:779-786 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (5 corresponding lines) BTDB/ODBLayer/LazyUlongList.cs:209— BTDB/ODBLayer/LazyUlongList.cs:209-213 | BTDB/ODBLayer/RoaringBitmap.cs:693-697 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (5 corresponding lines) BTDB/FieldHandler/ByteArrayFieldHandler.cs:137— BTDB/FieldHandler/ByteArrayFieldHandler.cs:137-142 | BTDB/FieldHandler/ByteArrayLastFieldHandler.cs:45-49 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (5 corresponding lines) BTDB/FieldHandler/EncryptedStringHandler.cs:33— BTDB/FieldHandler/EncryptedStringHandler.cs:33-37 | BTDB/FieldHandler/OrderedEncryptedStringHandler.cs:33-37 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (5 corresponding lines) BTDB/FieldHandler/EncryptedStringHandler.cs:40— BTDB/FieldHandler/EncryptedStringHandler.cs:40-44 | BTDB/FieldHandler/OrderedEncryptedStringHandler.cs:40-44 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (5 corresponding lines) BTDB/StreamLayer/MemReader.cs:28— BTDB/StreamLayer/MemReader.cs:28-32 | BTDB/StreamLayer/MemWriter.cs:36-40 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (5 corresponding lines) BTDB/KVDBLayer/Implementation/FilePureValues.cs:32— BTDB/KVDBLayer/Implementation/FilePureValues.cs:32-36 | BTDB/KVDBLayer/Implementation/FileTransactionLog.cs:47-52 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (6 corresponding lines) · ×13
Edited copy of a member (6 corresponding lines) BTDB.BackendActions/ActionPlanner.cs:1475— BTDB.BackendActions/ActionPlanner.cs:1475-1480 | BTDB.BackendActions/ActionPlanner.cs:1515-1520 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (6 corresponding lines) BTDB/KVDBLayer/Implementation/Compactor.cs:90— BTDB/KVDBLayer/Implementation/Compactor.cs:90-102 | BTDB/KVDBLayer/Implementation/ReplicationCompactor.cs:75-80 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (6 corresponding lines) BTDB/EventStoreLayer/ListTypeDescriptor.cs:113— BTDB/EventStoreLayer/ListTypeDescriptor.cs:113-119 | BTDB/EventStoreLayer/NullableTypeDescriptor.cs:107-112 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (6 corresponding lines) BTDB/KVDBLayer/Implementation/OnDiskMemoryMappedFileCollection.cs:171— BTDB/KVDBLayer/Implementation/OnDiskMemoryMappedFileCollection.cs:171-176 | BTDB.AzureStorage/AzureBlobFileCollection.cs:847-858 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (6 corresponding lines) BTDB/ODBLayer/ODBDictionary.cs:238— BTDB/ODBLayer/ODBDictionary.cs:238-249 | BTDB/ODBLayer/ODBSet.cs:237-242 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (6 corresponding lines) BTDB/ODBLayer/ODBDictionary.cs:825— BTDB/ODBLayer/ODBDictionary.cs:825-830 | BTDB/ODBLayer/RelationEnumerator.cs:1105-1110 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (6 corresponding lines) BTDB/KVDBLayer/Implementation/FilePureValuesWithId.cs:35— BTDB/KVDBLayer/Implementation/FilePureValuesWithId.cs:35-40 | BTDB/KVDBLayer/Implementation/HashKeyIndex.cs:49-55 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (6 corresponding lines) DBBenchmark/OrderedStringConversionBenchmark.cs:32— DBBenchmark/OrderedStringConversionBenchmark.cs:32-37 | DBBenchmark/VarIntCopyBenchmark.cs:39-45 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (6 corresponding lines) BTDB/FieldHandler/ByteArrayFieldHandler.cs:129— BTDB/FieldHandler/ByteArrayFieldHandler.cs:129-134 | BTDB/FieldHandler/ByteArrayLastFieldHandler.cs:59-64 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (6 corresponding lines) BTDB/StreamLayer/MemReader.cs:76— BTDB/StreamLayer/MemReader.cs:76-81 | BTDB/StreamLayer/MemWriter.cs:62-67 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (6 corresponding lines) BTDB/EventStoreLayer/ListTypeDescriptor.cs:968— BTDB/EventStoreLayer/ListTypeDescriptor.cs:968-973 | BTDB/EventStoreLayer/NullableTypeDescriptor.cs:404-409 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (6 corresponding lines) BTDB/Buffer/PackUnpack.cs:229— BTDB/Buffer/PackUnpack.cs:229-234 | BTDB/ODBLayer/LazyUlongList.cs:115-121 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (6 corresponding lines) BTDB/EventStoreLayer/ListTypeDescriptor.cs:80— BTDB/EventStoreLayer/ListTypeDescriptor.cs:80-85 | BTDB/EventStoreLayer/NullableTypeDescriptor.cs:76-81 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (13 lines × 2) BTDB/KVDBLayer/Implementation/BTreeKeyValueDB.cs:1197— BTDB/KVDBLayer/Implementation/BTreeKeyValueDB.cs:1197-1209 | BTDB/KVDBLayer/Implementation/BTreeKeyValueDB.cs:1283-1295 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (13 lines × 2) BTDB/ODBLayer/RelationDBManipulator.cs:1444— BTDB/ODBLayer/RelationDBManipulator.cs:1444-1456 | BTDB/ODBLayer/RelationDBManipulator.cs:1545-1557 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/ODBLayer/RelationDBManipulator.cs:1444` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (13 lines × 2) BTDB.Replication.Azure/AzureReplicationStorage.cs:474— BTDB.Replication.Azure/AzureReplicationStorage.cs:474-486 | BTDB.Replication/FileSystem/FileSystemReplicationStorage.cs:313-325 — 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 (13 lines × 2) BTDB/KVDBLayer/Implementation/Compactor.cs:234— BTDB/KVDBLayer/Implementation/Compactor.cs:234-246 | BTDB/KVDBLayer/Implementation/ReplicationCompactor.cs:170-182 — before extracting anything, compare `BTDB/KVDBLayer/Implementation/Compactor.cs` and `BTDB/KVDBLayer/Implementation/ReplicationCompactor.cs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 132 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/KVDBLayer/Implementation/Compactor.cs:234` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `BTDB/KVDBLayer/Implementation/Compactor.cs:247` calls `GetOrFakeValueRef`, `IsFreeToDelete` and `BTDB/KVDBLayer/Implementation/ReplicationCompactor.cs:183` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (13 lines × 2) BTDB/KVDBLayer/Implementation/Compactor.cs:340— BTDB/KVDBLayer/Implementation/Compactor.cs:340-352 | BTDB/KVDBLayer/Implementation/ReplicationCompactor.cs:265-277 — before extracting anything, compare `BTDB/KVDBLayer/Implementation/Compactor.cs` and `BTDB/KVDBLayer/Implementation/ReplicationCompactor.cs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 132 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (13 lines × 2) BTDB/KVDBLayer/Implementation/InMemoryFileCollection.cs:195— BTDB/KVDBLayer/Implementation/InMemoryFileCollection.cs:195-207 | BTDB/KVDBLayer/Implementation/InMemoryReplicationFileStorage.cs:195-207 — before extracting anything, compare `BTDB/KVDBLayer/Implementation/InMemoryFileCollection.cs` and `BTDB/KVDBLayer/Implementation/InMemoryReplicationFileStorage.cs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 162 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (13 lines × 2) BTDB/KVDBLayer/Implementation/OnDiskFileCollection.cs:86— BTDB/KVDBLayer/Implementation/OnDiskFileCollection.cs:86-98 | BTDB/StreamLayer/PositionLessStreamReader.cs:35-47 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/KVDBLayer/Implementation/OnDiskFileCollection.cs:86` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) BTDB/ODBLayer/ODBDictionaryFieldHandler.cs:257— BTDB/ODBLayer/ODBDictionaryFieldHandler.cs:257-269 | BTDB/ODBLayer/ODBSetFieldHandler.cs:128-140 — before extracting anything, compare `BTDB/ODBLayer/ODBDictionaryFieldHandler.cs` and `BTDB/ODBLayer/ODBSetFieldHandler.cs` 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. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/ODBLayer/ODBDictionaryFieldHandler.cs:257` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) BTDB/ODBLayer/TableInfo.cs:208— BTDB/ODBLayer/TableInfo.cs:208-220 | BTDB/ODBLayer/TableInfo.cs:758-770 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/ODBLayer/TableInfo.cs:208` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `BTDB/ODBLayer/TableInfo.cs:207` calls `NeedsCtx` and `BTDB/ODBLayer/TableInfo.cs:757` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (13 lines × 2) BTDB/FieldHandler/ListFieldHandler.cs:157— BTDB/FieldHandler/ListFieldHandler.cs:157-169 | BTDB/FieldHandler/ListFieldOrderedHandler.cs:133-145 — before extracting anything, compare `BTDB/FieldHandler/ListFieldHandler.cs` and `BTDB/FieldHandler/ListFieldOrderedHandler.cs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 176 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/FieldHandler/ListFieldHandler.cs:157` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) BTDB/KVDBLayer/Implementation/BTreeKeyValueDBCursor.cs:39— BTDB/KVDBLayer/Implementation/BTreeKeyValueDBCursor.cs:39-51 | BTDB/KVDBLayer/MemoryImplementation/InMemoryKeyValueDBCursor.cs:28-40 — before extracting anything, compare `BTDB/KVDBLayer/Implementation/BTreeKeyValueDBCursor.cs` and `BTDB/KVDBLayer/MemoryImplementation/InMemoryKeyValueDBCursor.cs` as WHOLE FILES: this scan already matched 3 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: the declarations holding them bind `transaction` to `BTreeKeyValueDBTransaction` in one and `InMemoryKeyValueDBTransaction` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (13 lines × 2) BTDB/ODBLayer/RelationInfo.cs:1922— BTDB/ODBLayer/RelationInfo.cs:1922-1934 | BTDB/ODBLayer/RelationInfo.cs:1947-1959 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/ODBLayer/RelationInfo.cs:1922` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `BTDB/ODBLayer/RelationInfo.cs:1935` calls `stackalloc`, `CreateFromStackAllocatedSpan` and `BTDB/ODBLayer/RelationInfo.cs:1960` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (13 lines × 2) BTDB.SourceGenerator/Main.cs:2653— BTDB.SourceGenerator/Main.cs:2653-2665 | BTDB.SourceGenerator/Main.cs:2683-2695 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB.SourceGenerator/Main.cs:2653` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
ClassTooLong: BonSerializerFactory BTDB/Serialization/BonSerializer.cs— ClassTooLong — 945 significant lines (blank, comment-only and punctuation-only lines excluded), 25 methods. The bar is 400 significant lines; this is 545 over it, 2.36× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: DefaultTypeConverterFactory BTDB/Serialization/DefaultTypeConverterFactory.cs— ClassTooLong — 787 significant lines (blank, comment-only and punctuation-only lines excluded), 8 methods. The bar is 400 significant lines; this is 387 over it, 1.97× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: Program ODbDump/Program.cs— ClassTooLong — 584 significant lines (blank, comment-only and punctuation-only lines excluded), 8 methods. The bar is 400 significant lines; this is 184 over it, 1.46× the bar. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
ClassTooLong: TableInfo BTDB/ODBLayer/TableInfo.cs— ClassTooLong — 577 significant lines (blank, comment-only and punctuation-only lines excluded), 21 methods. The bar is 400 significant lines; this is 177 over it, 1.44× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: ReplicationNodeCoordinator BTDB.Replication/ReplicationNodeCoordinator.cs— ClassTooLong — 513 significant lines (blank, comment-only and punctuation-only lines excluded), 27 methods. The bar is 400 significant lines; this is 113 over it, 1.28× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: EventLogTopic BTDB.Replication/EventLog/EventLogService.cs— ClassTooLong — 506 significant lines (blank, comment-only and punctuation-only lines excluded), 29 methods. The bar is 400 significant lines; this is 106 over it, 1.27× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: ItemLoaderInfo BTDB/ODBLayer/RelationInfo.cs— ClassTooLong — 482 significant lines (blank, comment-only and punctuation-only lines excluded), 11 methods. The bar is 400 significant lines; this is 82 over it, 1.21× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: EventLogOwnerLane BTDB.Replication/EventLog/EventLogOwnerLane.cs— ClassTooLong — 476 significant lines (blank, comment-only and punctuation-only lines excluded), 28 methods. The bar is 400 significant lines; this is 76 over it, 1.19× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: EventSerializer BTDB/EventStore2Layer/EventSerializer.cs— ClassTooLong — 467 significant lines (blank, comment-only and punctuation-only lines excluded), 19 methods. The bar is 400 significant lines; this is 67 over it, 1.17× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: DictionaryTypeDescriptor BTDB/EventStoreLayer/DictionaryTypeDescriptor.cs— ClassTooLong — 451 significant lines (blank, comment-only and punctuation-only lines excluded), 27 methods. The bar is 400 significant lines; this is 51 over it, 1.13× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: ObjectTypeDescriptor BTDB/EventStoreLayer/ObjectTypeDescriptor.cs— ClassTooLong — 450 significant lines (blank, comment-only and punctuation-only lines excluded), 30 methods. The bar is 400 significant lines; this is 50 over it, 1.13× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: RelationQueryScanner BTDB/ODBLayer/RelationQuery.cs— ClassTooLong — 414 significant lines (blank, comment-only and punctuation-only lines excluded), 27 methods. The bar is 400 significant lines; this is 14 over it, 1.04× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D4 · Code Duplication· Members sharing a duplicated core (4 members, 50+ identical tokens) · ×12
Members sharing a duplicated core (4 members, 50+ identical tokens) BTDB/Buffer/RoaringBitmaps.cs:500— BTDB/Buffer/RoaringBitmaps.cs:500-520 | BTDB/Buffer/RoaringBitmaps.cs:523-543 | BTDB/Buffer/RoaringBitmaps.cs:546-566 | BTDB/Buffer/RoaringBitmaps.cs:569-589 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) BTDB/Collections/RefDictionary.cs:138— BTDB/Collections/RefDictionary.cs:138-182 | BTDB/Collections/SpanByteNoRemoveDictionary.cs:77-98 | BTDB/Collections/SpanByteNoRemoveDictionary.cs:117-143 | BTDB/Collections/SpanByteNoRemoveDictionary.cs:147-190 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) BTDB/Collections/RefDictionary.cs:244— BTDB/Collections/RefDictionary.cs:244-266 | BTDB/Collections/RefDictionary.cs:269-296 | BTDB/Collections/RefDictionary.cs:300-322 | BTDB/Collections/RefDictionary.cs:325-348 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) BTDB/Collections/Utf16Utf8Dictionary.cs:143— BTDB/Collections/Utf16Utf8Dictionary.cs:143-153 | BTDB/Collections/Utf16Utf8Dictionary.cs:184-194 | BTDB/Collections/Utf16Utf8Dictionary.cs:210-224 | BTDB/Collections/Utf16Utf8Dictionary.cs:244-258 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) BTDB/Collections/Utf16Utf8Dictionary.cs:156— BTDB/Collections/Utf16Utf8Dictionary.cs:156-166 | BTDB/Collections/Utf16Utf8Dictionary.cs:197-207 | BTDB/Collections/Utf16Utf8Dictionary.cs:227-241 | BTDB/Collections/Utf16Utf8Dictionary.cs:261-275 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) BTDB/EventStoreLayer/DictionaryTypeDescriptor.cs:488— BTDB/EventStoreLayer/DictionaryTypeDescriptor.cs:488-603 | BTDB/EventStoreLayer/DictionaryTypeDescriptor.cs:648-752 | BTDB/EventStoreLayer/ListTypeDescriptor.cs:673-760 | BTDB/EventStoreLayer/ListTypeDescriptor.cs:798-925 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) BTDB.Replication/ReplicationFileSet.Streaming.cs:113— BTDB.Replication/ReplicationFileSet.Streaming.cs:113-123 | BTDB/KVDBLayer/Implementation/InMemoryFileCollection.cs:136-147 | BTDB/KVDBLayer/Implementation/InMemoryReplicationFileStorage.cs:136-147 | BTDB/KVDBLayer/Implementation/OnDiskReplicationFileStorage.cs:482-492 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) BTDB/KVDBLayer/Implementation/OnDiskFileCollection.cs:82— BTDB/KVDBLayer/Implementation/OnDiskFileCollection.cs:82-98 | BTDB/KVDBLayer/Implementation/OnDiskFileCollection.cs:101-115 | BTDB/StreamLayer/PositionLessStreamReader.cs:31-47 | BTDB/StreamLayer/PositionLessStreamReader.cs:50-63 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) BTDB/ODBLayer/ODBDictionaryFieldHandler.cs:254— BTDB/ODBLayer/ODBDictionaryFieldHandler.cs:254-269 | BTDB/ODBLayer/ODBDictionaryFieldHandler.cs:277-290 | BTDB/ODBLayer/ODBSetFieldHandler.cs:125-140 | BTDB/ODBLayer/ODBSetFieldHandler.cs:148-161 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) BTDB/ODBLayer/RelationBuilder.cs:842— BTDB/ODBLayer/RelationBuilder.cs:842-866 | BTDB/ODBLayer/RelationBuilder.cs:955-1036 | BTDB/ODBLayer/RelationBuilder.cs:1142-1156 | BTDB/ODBLayer/RelationBuilder.cs:1159-1266 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) BTDB/ODBLayer/RelationBuilder.cs:1086— BTDB/ODBLayer/RelationBuilder.cs:1086-1112 | BTDB/ODBLayer/RelationBuilder.cs:1115-1139 | BTDB/ODBLayer/RelationBuilder.cs:1269-1301 | BTDB/ODBLayer/RelationBuilder.cs:1304-1333 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) BTDB/ODBLayer/RelationDBManipulator.cs:150— BTDB/ODBLayer/RelationDBManipulator.cs:150-196 | BTDB/ODBLayer/RelationDBManipulator.cs:278-335 | BTDB/ODBLayer/RelationDBManipulator.cs:345-380 | BTDB/ODBLayer/RelationDBManipulator.cs:384-423 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Duplicated block (11 lines × 2) BTDB/ODBLayer/RelationBuilder.cs:1712— BTDB/ODBLayer/RelationBuilder.cs:1712-1722 | BTDB/ODBLayer/RelationBuilder.cs:1763-1773 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/ODBLayer/RelationBuilder.cs:1712` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `BTDB/ODBLayer/RelationBuilder.cs:1774` calls `LdcI4` and `BTDB/ODBLayer/RelationBuilder.cs:1723` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (11 lines × 2) BTDB/EventStoreLayer/DictionaryTypeDescriptor.cs:724— BTDB/EventStoreLayer/DictionaryTypeDescriptor.cs:724-734 | BTDB/EventStoreLayer/ListTypeDescriptor.cs:901-911 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `BTDB/EventStoreLayer/DictionaryTypeDescriptor.cs:722` calls `DeclareLocal` and `BTDB/EventStoreLayer/ListTypeDescriptor.cs:899` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (11 lines × 2) BTDB/KVDBLayer/Implementation/BTreeKeyValueDB.cs:2942— BTDB/KVDBLayer/Implementation/BTreeKeyValueDB.cs:2942-2952 | BTDB/KVDBLayer/Implementation/BTreeKeyValueDB.cs:2996-3006 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/KVDBLayer/Implementation/BTreeKeyValueDB.cs:2942` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `buffer` to `ref Memory<byte>` in one and `scoped ref Span<byte>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (11 lines × 2) BTDB/Collections/RefDictionary.cs:381— BTDB/Collections/RefDictionary.cs:381-391 | BTDB/Collections/SpanByteNoRemoveDictionary.cs:259-269 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/Collections/RefDictionary.cs:381` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) BTDB/EventStoreLayer/DictionaryTypeDescriptor.cs:211— BTDB/EventStoreLayer/DictionaryTypeDescriptor.cs:211-221 | BTDB/EventStoreLayer/ListTypeDescriptor.cs:231-241 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (11 lines × 2) BTDB/Serialization/DefaultTypeConverterFactory.cs:36— BTDB/Serialization/DefaultTypeConverterFactory.cs:36-46 | BTDB/Serialization/DefaultTypeConverterFactory.cs:769-779 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (11 lines × 2) BTDB/Bon/Bon.cs:598— BTDB/Bon/Bon.cs:598-608 | BTDB/Bon/Bon.cs:630-640 — both copies are in the same file, so extract the 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) BTDB/Collections/LruCache.cs:52— BTDB/Collections/LruCache.cs:52-62 | BTDB/Collections/SpanByteLruCache.cs:57-67 — before extracting anything, compare `BTDB/Collections/LruCache.cs` and `BTDB/Collections/SpanByteLruCache.cs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 83 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (11 lines × 2) BTDB/EventStoreLayer/EnumTypeDescriptor.cs:463— BTDB/EventStoreLayer/EnumTypeDescriptor.cs:463-473 | BTDB/FieldHandler/EnumFieldHandler.cs:240-250 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/EventStoreLayer/EnumTypeDescriptor.cs:463` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) BTDB/EventStoreLayer/HashSetWithDescriptor.cs:23— BTDB/EventStoreLayer/HashSetWithDescriptor.cs:23-33 | BTDB/EventStoreLayer/ListWithDescriptor.cs:23-33 — before extracting anything, compare `BTDB/EventStoreLayer/HashSetWithDescriptor.cs` and `BTDB/EventStoreLayer/ListWithDescriptor.cs` as WHOLE FILES: 84% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (11 lines × 2) BTDB/EventStoreLayer/TypeSerializers.cs:336— BTDB/EventStoreLayer/TypeSerializers.cs:336-346 | BTDB/EventStoreLayer/TypeSerializers.cs:361-371 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/EventStoreLayer/TypeSerializers.cs:336` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (11 lines × 2) BTDB/ODBLayer/ODBDictionaryFieldHandler.cs:280— BTDB/ODBLayer/ODBDictionaryFieldHandler.cs:280-290 | BTDB/ODBLayer/ODBSetFieldHandler.cs:151-161 — before extracting anything, compare `BTDB/ODBLayer/ODBDictionaryFieldHandler.cs` and `BTDB/ODBLayer/ODBSetFieldHandler.cs` 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. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/ODBLayer/ODBDictionaryFieldHandler.cs:280` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D10 · Test Quality· Fixed-sleep synchronisation · ×11
Fixed-sleep synchronisation: ConcurrentSingletonResolutionWaitsForCreation BTDBTest/IOCCoverageTest.cs:408— This test starts a background task and then orders itself against it with `Task.Delay(50)` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
Fixed-sleep synchronisation: ConcurrentScopedResolutionWaitsForCreation BTDBTest/IOCCoverageTest.cs:429— This test starts a background task and then orders itself against it with `Task.Delay(50)` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
Fixed-sleep synchronisation: ConcurrentRemoveNeverExposesUnmappedMemoryToReaders BTDBTest/OnDiskReplicationFileStorageTest.cs:251— This test starts a background task and then orders itself against it with `Task.Delay(5)` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
Fixed-sleep synchronisation: PublicationsCommitOnceInCallOrderUnderPartitionsAndRestarts BTDB.Replication.Test/EventLog/EventLogClusterChaosTest.cs:26— This test starts a background task and then orders itself against it with `Task.Delay(300)` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
Fixed-sleep synchronisation: FollowerReceivesLiveRecordsWithoutReadingStorage BTDB.Replication.Test/EventLog/EventLogServiceTest.cs:273— This test starts a background task and then orders itself against it with `Task.Delay(100)` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
Fixed-sleep synchronisation: IdleDeposedOwnerAndItsSubscribersDiscoverTheTakeover BTDB.Replication.Test/EventLog/EventLogServiceTest.cs:321— This test starts a background task and then orders itself against it with `Task.Delay(100)` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
Fixed-sleep synchronisation: IdleTopicCostsOneStorageRequestPerHeartbeat BTDB.Replication.Test/EventLog/EventLogServiceTest.cs:382— This test starts a background task and then orders itself against it with `Task.Delay(200)` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
Fixed-sleep synchronisation: FollowerCutOffFromItsLeaderNeverTakesOverAndCatchesUpAfterHealing BTDB.Replication.Process.Test/ProcessFailoverTest.cs:298— This test starts a spawned process and then orders itself against it with `Task.Delay(TimeSpan.FromSeconds(17))` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
Fixed-sleep synchronisation: NodeKilledDuringRestoreRestoresAgainFromItsPartialLocalFiles BTDB.Replication.Process.Test/ProcessFailoverTest.cs:325— This test starts a spawned process and then orders itself against it with `Task.Delay(TimeSpan.FromSeconds(2))` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
Fixed-sleep synchronisation: TakeoverActivatesNoDatabaseUntilEveryDatabaseCaughtUp BTDB.Replication.Process.Test/ProcessFailoverTest.cs:357— This test starts a spawned process and then orders itself against it with `Task.Delay(TimeSpan.FromSeconds(2))` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
Fixed-sleep synchronisation: CheckpointDuringFlushKeepsLaterWal BTDB.LSM.Test/Api/LsmRegressionTest.cs:55— This test starts a background task and then orders itself against it with `Task.Delay(200)` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
D4 · Code Duplication· Edited copy of a member (12 corresponding lines) · ×11
Edited copy of a member (12 corresponding lines) BTDB/Buffer/XxHash64.cs:188— BTDB/Buffer/XxHash64.cs:188-213 | BTDB/Buffer/XxHash64.cs:217-228 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) BTDB/ODBLayer/RelationBuilder.cs:872— BTDB/ODBLayer/RelationBuilder.cs:872-883 | BTDB/ODBLayer/RelationBuilder.cs:888-899 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) BTDB/KVDBLayer/Implementation/InMemoryFileCollection.cs:274— BTDB/KVDBLayer/Implementation/InMemoryFileCollection.cs:274-289 | BTDB/KVDBLayer/Implementation/OnDiskReplicationFileStorage.cs:565-576 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) BTDB/StreamLayer/BrotliDecompressMemReader.cs:134— BTDB/StreamLayer/BrotliDecompressMemReader.cs:134-146 | BTDB/StreamLayer/ReadOnlySequenceMemReader.cs:70-81 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) BTDB/KVDBLayer/BTreeMem/BTreeLeaf.cs:259— BTDB/KVDBLayer/BTreeMem/BTreeLeaf.cs:259-271 | BTDB/KVDBLayer/BTreeMem/BTreeLeaf.cs:274-285 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) BTDB/ODBLayer/ODBDictionary.cs:206— BTDB/ODBLayer/ODBDictionary.cs:206-217 | BTDB/ODBLayer/ODBSet.cs:222-233 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) BTDB/KVDBLayer/Implementation/OnDiskFileCollection.cs:318— BTDB/KVDBLayer/Implementation/OnDiskFileCollection.cs:318-330 | BTDB/KVDBLayer/Implementation/OnDiskMemoryMappedFileCollection.cs:290-301 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) BTDB/Buffer/TreeNodeUtils.cs:113— BTDB/Buffer/TreeNodeUtils.cs:113-124 | BTDB/Buffer/TreeNodeUtils.cs:127-138 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) BTDB/Interpreter/Interpreter.cs:2398— BTDB/Interpreter/Interpreter.cs:2398-2411 | BTDB/Interpreter/Interpreter.cs:2415-2426 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) BTDB/ODBLayer/ODBLazyUlongList.cs:234— BTDB/ODBLayer/ODBLazyUlongList.cs:234-245 | BTDB/ODBLayer/ODBRoaringBitmap.cs:303-314 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) BTDB/EventStoreLayer/ObjectTypeDescriptor.cs:738— BTDB/EventStoreLayer/ObjectTypeDescriptor.cs:738-749 | BTDB/EventStoreLayer/TupleTypeDescriptor.cs:555-566 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (14 lines × 2) BTDB/ODBLayer/RelationDBManipulator.cs:749— BTDB/ODBLayer/RelationDBManipulator.cs:749-762 | BTDB/ODBLayer/RelationDBManipulator.cs:803-816 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/ODBLayer/RelationDBManipulator.cs:749` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) BTDB/Bon/Bon.cs:701— BTDB/Bon/Bon.cs:701-714 | BTDB/Bon/Bon.cs:756-769 — both copies are in the same file, so extract the 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) BTDB/EventStoreLayer/DictionaryTypeDescriptor.cs:684— BTDB/EventStoreLayer/DictionaryTypeDescriptor.cs:684-697 | BTDB/EventStoreLayer/ListTypeDescriptor.cs:831-844 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `BTDB/EventStoreLayer/DictionaryTypeDescriptor.cs:682` calls `DeclareLocal` and `BTDB/EventStoreLayer/ListTypeDescriptor.cs:829` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (14 lines × 2) BTDB/ODBLayer/ObjectDBTransaction.cs:639— BTDB/ODBLayer/ObjectDBTransaction.cs:639-652 | BTDB/ODBLayer/ObjectDBTransaction.cs:693-706 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/ODBLayer/ObjectDBTransaction.cs:639` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (14 lines × 2) DBBenchmark/BackendActions/PlannerScenario.cs:158— DBBenchmark/BackendActions/PlannerScenario.cs:158-171 | DBBenchmark/BackendActions/PlannerScenario.cs:176-189 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `DBBenchmark/BackendActions/PlannerScenario.cs:158` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) BTDB/KVDBLayer/Implementation/InMemoryFileCollection.cs:151— BTDB/KVDBLayer/Implementation/InMemoryFileCollection.cs:151-164 | BTDB/KVDBLayer/Implementation/InMemoryReplicationFileStorage.cs:151-164 — before extracting anything, compare `BTDB/KVDBLayer/Implementation/InMemoryFileCollection.cs` and `BTDB/KVDBLayer/Implementation/InMemoryReplicationFileStorage.cs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 162 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (14 lines × 2) BTDB/KVDBLayer/Implementation/InMemoryFileCollection.cs:229— BTDB/KVDBLayer/Implementation/InMemoryFileCollection.cs:229-242 | BTDB/KVDBLayer/Implementation/InMemoryReplicationFileStorage.cs:229-242 — before extracting anything, compare `BTDB/KVDBLayer/Implementation/InMemoryFileCollection.cs` and `BTDB/KVDBLayer/Implementation/InMemoryReplicationFileStorage.cs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 162 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (14 lines × 2) BTDB/BTreeLib/BTreeImpl12.cs:2018— BTDB/BTreeLib/BTreeImpl12.cs:2018-2032 | BTDB/BTreeLib/BTreeImpl12.cs:2059-2072 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/BTreeLib/BTreeImpl12.cs:2018` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (14 lines × 2) BTDB/StreamLayer/MemReader.cs:749— BTDB/StreamLayer/MemReader.cs:749-762 | BTDB/StreamLayer/MemReader.cs:783-796 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/StreamLayer/MemReader.cs:749` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) BTDB/StreamLayer/MemReader.cs:835— BTDB/StreamLayer/MemReader.cs:835-848 | BTDB/StreamLayer/MemReader.cs:869-882 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/StreamLayer/MemReader.cs:835` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
X2 · Cancellation propagation· Async local function without CancellationToken · ×10
Async local function without CancellationToken: Run DBBenchmark/EventLog/EventLogStorageScreening.cs:329— Neither takes a CancellationToken nor reads the one of the function it sits in, while it calls something that takes one — this work can't be stopped early once started. Take the token, or pass on the enclosing one.
Async local function without CancellationToken: Commit DBBenchmark/EventLog/EventLogStorageScreening.cs:349— Neither takes a CancellationToken nor reads the one of the function it sits in, while it calls something that takes one — this work can't be stopped early once started. Take the token, or pass on the enclosing one.
Async local function without CancellationToken: Lease DBBenchmark/EventLog/EventLogStorageScreening.cs:357— Neither takes a CancellationToken nor reads the one of the function it sits in, while it calls something that takes one — this work can't be stopped early once started. Take the token, or pass on the enclosing one.
Async local function without CancellationToken: Request DBBenchmark/EventLog/EventLogStorageScreening.cs:366— Neither takes a CancellationToken nor reads the one of the function it sits in, while it calls something that takes one — this work can't be stopped early once started. Take the token, or pass on the enclosing one.
Async local function without CancellationToken: Verify DBBenchmark/EventLog/EventLogStorageScreening.cs:379— Neither takes a CancellationToken nor reads the one of the function it sits in, while it calls something that takes one — this work can't be stopped early once started. Take the token, or pass on the enclosing one.
Async local function without CancellationToken: VerifyBlockEnds DBBenchmark/EventLog/EventLogStorageScreening.cs:389— Neither takes a CancellationToken nor reads the one of the function it sits in, while it calls something that takes one — this work can't be stopped early once started. Take the token, or pass on the enclosing one.
Async local function without CancellationToken: CommitAsync DBBenchmark/LSM/LsmDurableBenchmark.cs:182— Neither takes a CancellationToken nor reads the one of the function it sits in, while it calls something that takes one — this work can't be stopped early once started. Take the token, or pass on the enclosing one.
Async local function without CancellationToken: Run DBBenchmark/LSM/LsmStorageScreening.cs:323— Neither takes a CancellationToken nor reads the one of the function it sits in, while it calls something that takes one — this work can't be stopped early once started. Take the token, or pass on the enclosing one.
Async local function without CancellationToken: Request DBBenchmark/LSM/LsmStorageScreening.cs:368— Neither takes a CancellationToken nor reads the one of the function it sits in, while it calls something that takes one — this work can't be stopped early once started. Take the token, or pass on the enclosing one.
Async local function without CancellationToken: ReadRange DBBenchmark/LSM/LsmStorageScreening.cs:379— Neither takes a CancellationToken nor reads the one of the function it sits in, while it calls something that takes one — this work can't be stopped early once started. Take the token, or pass on the enclosing one.
Change coupling: BTreeImpl12.cs ↔ ICursor.cs BTDB/BTreeLib/BTreeImpl12.cs:1— `BTDB/BTreeLib/BTreeImpl12.cs` and `BTDB/BTreeLib/ICursor.cs` change together 79% of the time (11 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package — so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 11 shared commits counted here, the most recent 3 are `95a78801` Fix lost SetValue and cursor index tracking in key value DBs; `b005f3b8` Add FastIterateNoCursor method to cursor interfaces and implementations; `f8db9be6` Upgrade C#11 and .Net 7.0 - so much pain — run `git show` on any of them.
Change coupling: DictionaryTypeDescriptor.cs ↔ SimpleTypeDescriptor.cs BTDB/EventStoreLayer/DictionaryTypeDescriptor.cs:1— `BTDB/EventStoreLayer/DictionaryTypeDescriptor.cs` and `BTDB/EventStoreLayer/SimpleTypeDescriptor.cs` change together 75% of the time (15 of the 20 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package — so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 15 shared commits counted here, the most recent 3 are `830a6363` EventSerializer NoEmit GenerateNewDescriptor WIP; `ed8284b1` NoEmit for Descriptors WIP; `56bbf20f` Speedup Equals of ITypeDescriptor — run `git show` on any of them.
Change coupling: ListTypeDescriptor.cs ↔ SimpleTypeDescriptor.cs BTDB/EventStoreLayer/ListTypeDescriptor.cs:1— `BTDB/EventStoreLayer/ListTypeDescriptor.cs` and `BTDB/EventStoreLayer/SimpleTypeDescriptor.cs` change together 75% of the time (15 of the 20 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package — so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 15 shared commits counted here, the most recent 3 are `830a6363` EventSerializer NoEmit GenerateNewDescriptor WIP; `ed8284b1` NoEmit for Descriptors WIP; `56bbf20f` Speedup Equals of ITypeDescriptor — run `git show` on any of them.
Change coupling: DictionaryFieldHandler.cs ↔ ListFieldHandler.cs BTDB/FieldHandler/DictionaryFieldHandler.cs:1— `BTDB/FieldHandler/DictionaryFieldHandler.cs` and `BTDB/FieldHandler/ListFieldHandler.cs` change together 68% of the time (13 of the 19 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package — so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 13 shared commits counted here, the most recent 3 are `05b0b883` Hint ODB collection capacities by the bytes left, not a damaged count; `f7ba7c26` Fixed false positive in ReportTypeIncompatibility.; `ef7a7e6a` New interface `IFieldHandlerLogger` for logging type incompatibilities. — run `git show` on any of them.
Change coupling: EventDeserializer.cs ↔ EventSerializer.cs BTDB/EventStore2Layer/EventDeserializer.cs:1— `BTDB/EventStore2Layer/EventDeserializer.cs` and `BTDB/EventStore2Layer/EventSerializer.cs` change together 65% of the time (15 of the 23 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package — so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 15 shared commits counted here, the most recent 3 are `f6b252b9` Store again and load nested collections of events loaded without types; `3a2ef3bc` Fail too deep event objects with an exception instead of a crash; `9e836ef8` Make Preserving Descriptors optional. If you set it false, you will g… — run `git show` on any of them.
Change coupling: BTreeKeyValueDB.cs ↔ InMemoryKeyValueDB.cs BTDB/KVDBLayer/Implementation/BTreeKeyValueDB.cs:1— `BTDB/KVDBLayer/Implementation/BTreeKeyValueDB.cs` and `BTDB/KVDBLayer/MemoryImplementation/InMemoryKeyValueDB.cs` change together 60% of the time (9 of the 15 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder — so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `98074db0` Refactor database compaction and storage handling; `37db0ba3` A lot of improvements around compactor.; `535908c4` Disposing DB when there are still some transactions now throws BTDBEx… — run `git show` on any of them.
Change coupling: BTreeKeyValueDBTransaction.cs ↔ InMemoryKeyValueDBTransaction.cs BTDB/KVDBLayer/Implementation/BTreeKeyValueDBTransaction.cs:1— `BTDB/KVDBLayer/Implementation/BTreeKeyValueDBTransaction.cs` and `BTDB/KVDBLayer/MemoryImplementation/InMemoryKeyValueDBTransaction.cs` change together 58% of the time (19 of the 33 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder — so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 19 shared commits counted here, the most recent 3 are `47d52a68` Reject ulong indexes no array can hold and end replay at them; `6d9facfd` Fix repeated transaction disposal with pooled cursor reuse; `15170429` Enhance cursor management in KVDB: prevent reuse of pooled cursors in… — run `git show` on any of them.
Change coupling: DictionaryFieldHandler.cs ↔ SimpleFieldHandlerBase.cs BTDB/FieldHandler/DictionaryFieldHandler.cs:1— `BTDB/FieldHandler/DictionaryFieldHandler.cs` and `BTDB/FieldHandler/SimpleFieldHandlerBase.cs` change together 56% of the time (9 of the 16 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package — so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `14329db9` Dictionary should support `ReadOnlyMemory<byte>` as value.; `ef7a7e6a` New interface `IFieldHandlerLogger` for logging type incompatibilities.; `8b5cf49f` Fixed regression in 20.x in compatibility of Enums in relations with … — run `git show` on any of them.
Change coupling: ICursor.cs ↔ BTreeKeyValueDBTransaction.cs BTDB/BTreeLib/ICursor.cs:1— `BTDB/BTreeLib/ICursor.cs` and `BTDB/KVDBLayer/Implementation/BTreeKeyValueDBTransaction.cs` change together 50% of the time (7 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder — so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `7d2ded55` DBCursors WIP5; `becdded5` WIP2 on KVDB Cursors.; `f8db9be6` Upgrade C#11 and .Net 7.0 - so much pain — run `git show` on any of them.
D4 · Code Duplication· Edited copy of a member (26 corresponding lines) · ×9
Edited copy of a member (26 corresponding lines) BTDB/KVDBLayer/Implementation/Compactor.cs:233— BTDB/KVDBLayer/Implementation/Compactor.cs:233-259 | BTDB/KVDBLayer/Implementation/ReplicationCompactor.cs:169-194 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (26 corresponding lines) BTDB/ODBLayer/RelationDBManipulator.cs:1234— BTDB/ODBLayer/RelationDBManipulator.cs:1234-1259 | BTDB/ODBLayer/RelationDBManipulator.cs:1264-1290 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (26 corresponding lines) BTDB/KVDBLayer/Implementation/BTreeKeyValueDBCursor.cs:628— BTDB/KVDBLayer/Implementation/BTreeKeyValueDBCursor.cs:628-654 | BTDB/KVDBLayer/Implementation/BTreeKeyValueDBCursor.cs:657-682 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (26 corresponding lines) BTDB/KVDBLayer/Implementation/Compactor.cs:380— BTDB/KVDBLayer/Implementation/Compactor.cs:380-405 | BTDB/KVDBLayer/Implementation/ReplicationCompactor.cs:306-331 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (26 corresponding lines) BTDB/EventStoreLayer/EnumTypeDescriptor.cs:103— BTDB/EventStoreLayer/EnumTypeDescriptor.cs:103-128 | BTDB/EventStoreLayer/ObjectTypeDescriptor.cs:142-167 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (26 corresponding lines) BTDB/BTreeLib/BTreeImpl12.cs:2491— BTDB/BTreeLib/BTreeImpl12.cs:2491-2517 | BTDB/BTreeLib/BTreeImpl12.cs:2645-2670 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (26 corresponding lines) BTDB/KVDBLayer/Implementation/BTreeKeyValueDBCursor.cs:153— BTDB/KVDBLayer/Implementation/BTreeKeyValueDBCursor.cs:153-178 | BTDB/KVDBLayer/Implementation/BTreeKeyValueDBCursor.cs:181-207 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (26 corresponding lines) BTDB/KVDBLayer/MemoryImplementation/InMemoryKeyValueDBCursor.cs:173— BTDB/KVDBLayer/MemoryImplementation/InMemoryKeyValueDBCursor.cs:173-198 | BTDB/KVDBLayer/MemoryImplementation/InMemoryKeyValueDBCursor.cs:201-227 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (26 corresponding lines) BTDB/ODBLayer/ODBDictionary.cs:641— BTDB/ODBLayer/ODBDictionary.cs:641-669 | BTDB/ODBLayer/RelationDBManipulator.cs:514-539 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (14 corresponding lines) · ×9
Edited copy of a member (14 corresponding lines) BTDB/KVDBLayer/Implementation/OnDiskFileCollection.cs:123— BTDB/KVDBLayer/Implementation/OnDiskFileCollection.cs:123-138 | BTDB/StreamLayer/PositionLessStreamReader.cs:71-84 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) BTDB/StreamLayer/MemReader.cs:359— BTDB/StreamLayer/MemReader.cs:359-372 | BTDB/StreamLayer/MemReader.cs:383-396 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) BTDB/KVDBLayer/Implementation/FileIdAllocator.cs:19— BTDB/KVDBLayer/Implementation/FileIdAllocator.cs:19-32 | BTDB.Replication/ReplicationFileSet.Collection.cs:260-278 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) BTDB/ODBLayer/ODBDictionary.cs:80— BTDB/ODBLayer/ODBDictionary.cs:80-93 | BTDB/ODBLayer/ODBSet.cs:65-78 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) BTDB/Buffer/RoaringBitmaps.cs:709— BTDB/Buffer/RoaringBitmaps.cs:709-722 | BTDB/Buffer/RoaringBitmaps.cs:725-738 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) BTDB/Buffer/RoaringBitmaps.cs:1274— BTDB/Buffer/RoaringBitmaps.cs:1274-1287 | BTDB/Buffer/RoaringBitmaps.cs:1360-1373 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) BTDB/Bon/Bon.cs:869— BTDB/Bon/Bon.cs:869-887 | BTDB/Bon/Bon.cs:890-903 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) BTDB/ODBLayer/ODBDictionaryFieldHandler.cs:46— BTDB/ODBLayer/ODBDictionaryFieldHandler.cs:46-60 | BTDB/ODBLayer/ODBSetFieldHandler.cs:38-51 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) BTDB/KVDBLayer/Implementation/BTreeKeyValueDB.cs:1573— BTDB/KVDBLayer/Implementation/BTreeKeyValueDB.cs:1573-1588 | BTDB/KVDBLayer/Implementation/BTreeKeyValueDB.cs:1744-1757 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (18 lines × 2) BTDB.SourceGenerator/Main.cs:5260— BTDB.SourceGenerator/Main.cs:5260-5277 | BTDB.SourceGenerator/Main.cs:5289-5306 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB.SourceGenerator/Main.cs:5260` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (18 lines × 2) BTDB/ODBLayer/RelationBuilder.cs:701— BTDB/ODBLayer/RelationBuilder.cs:701-718 | BTDB/ODBLayer/RelationBuilder.cs:752-769 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/ODBLayer/RelationBuilder.cs:701` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (18 lines × 2) BTDB/ODBLayer/RelationDBManipulator.cs:1160— BTDB/ODBLayer/RelationDBManipulator.cs:1160-1177 | BTDB/ODBLayer/RelationDBManipulator.cs:1213-1230 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/ODBLayer/RelationDBManipulator.cs:1160` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (18 lines × 2) BTDB.SourceGenerator/Main.cs:5115— BTDB.SourceGenerator/Main.cs:5115-5132 | BTDB.SourceGenerator/Main.cs:5179-5196 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB.SourceGenerator/Main.cs:5115` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (18 lines × 2) BTDB/KVDBLayer/Helpers/KeyValueDBExportImporter.cs:120— BTDB/KVDBLayer/Helpers/KeyValueDBExportImporter.cs:120-137 | BTDB/KVDBLayer/Helpers/KeyValueDBExportImporter.cs:171-188 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/KVDBLayer/Helpers/KeyValueDBExportImporter.cs:120` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (18 lines × 2) BTDB/ODBLayer/ODBDictionary.cs:489— BTDB/ODBLayer/ODBDictionary.cs:489-506 | BTDB/ODBLayer/ODBSet.cs:281-298 — before extracting anything, compare `BTDB/ODBLayer/ODBDictionary.cs` and `BTDB/ODBLayer/ODBSet.cs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 133 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/ODBLayer/ODBDictionary.cs:489` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (18 lines × 2) BTDB/ODBLayer/ODBDictionary.cs:514— BTDB/ODBLayer/ODBDictionary.cs:514-531 | BTDB/ODBLayer/ODBSet.cs:305-322 — before extracting anything, compare `BTDB/ODBLayer/ODBDictionary.cs` and `BTDB/ODBLayer/ODBSet.cs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 133 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/ODBLayer/ODBDictionary.cs:514` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (18 lines × 2) BTDB/IL/IilGenForbiddenInstructionsCheating.cs:142— BTDB/IL/IilGenForbiddenInstructionsCheating.cs:142-159 | BTDB/IL/IilGenForbiddenInstructionsCheating.cs:165-182 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/IL/IilGenForbiddenInstructionsCheating.cs:142` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (18 lines × 2) BTDB/Serialization/BonSerializer.cs:472— BTDB/Serialization/BonSerializer.cs:472-489 | BTDB/Serialization/BonSerializer.cs:513-530 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/Serialization/BonSerializer.cs:472` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `BTDB/Serialization/BonSerializer.cs:490` calls `Assert` and `BTDB/Serialization/BonSerializer.cs:531` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Low cohesion: MemoryMappedMemReader (LCOM4 7) BTDB/StreamLayer/MemoryMappedMemReader.cs:9— MemoryMappedMemReader's methods fall into 7 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 7 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: SimpleTypeDescriptor (LCOM4 6) BTDB/EventStoreLayer/SimpleTypeDescriptor.cs:12— SimpleTypeDescriptor's methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 6 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: Reader (LCOM4 4) BTDB.AzureStorage/AzureBlobFileCollection.cs:760— Reader's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: ReadOnlyMappedReader (LCOM4 4) BTDB.AzureStorage/AzureBlobFileCollection.cs:1073— ReadOnlyMappedReader's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: BackendActions (LCOM4 4) BTDB.BackendActions/BackendActions.cs:34— BackendActions's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: DefaultCompressionKviStrategy (LCOM4 4) BTDB/KVDBLayer/Implementation/DefaultCompressionKviStrategy.cs:7— DefaultCompressionKviStrategy's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: Reader (LCOM4 4) BTDB/KVDBLayer/Implementation/OnDiskMemoryMappedFileCollection.cs:90— Reader's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: TableInfo (LCOM4 4) BTDB/ODBLayer/TableInfo.cs:26— TableInfo's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: ReadOnlyMemoryMemReader (LCOM4 4) BTDB/StreamLayer/ReadOnlyMemoryMemReader.cs:7— ReadOnlyMemoryMemReader's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Awaits without ConfigureAwait(false) — Only 468/618 awaits in library code use ConfigureAwait(false). A library that captures the caller's context can stall or deadlock its host — the classic way a dependency drags an app down.
Awaits without ConfigureAwait(false) BTDB/IOC/ContainerImpl.cs:1017— `await DisposeOwnedAsync(ownedInstances.Instance)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
Awaits without ConfigureAwait(false) BTDB/IOC/ContainerImpl.cs:1023— `await serviceScope.DisposeAsync()` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
Awaits without ConfigureAwait(false) BTDB/IOC/ContainerImpl.cs:1028— `await DisposeOwnedAsync(_serviceProvider)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
Awaits without ConfigureAwait(false) BTDB/IOC/ContainerImpl.cs:1036— `await asyncDisposable.DisposeAsync()` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
Awaits without ConfigureAwait(false) BTDB/KVDBLayer/Helpers/KeyValueDBExportImporter.cs:28— `await stream.WriteAsync(tempBuf.AsMemory(0, 16))` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
Awaits without ConfigureAwait(false) BTDB/KVDBLayer/Helpers/KeyValueDBExportImporter.cs:34— `await stream.WriteAsync(tempBuf.AsMemory(0, 4))` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
Awaits without ConfigureAwait(false) BTDB/KVDBLayer/Helpers/KeyValueDBExportImporter.cs:35— `await stream.WriteAsync(key)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
Awaits without ConfigureAwait(false) BTDB/KVDBLayer/Helpers/KeyValueDBExportImporter.cs:38— `await stream.WriteAsync(tempBuf.AsMemory(0, 4))` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
X18 · Disposal-pattern correctness· Disposes a dependency it does not own · ×9
Disposes a dependency it does not own BTDB/ODBLayer/ObjectDBTransaction.cs:66— `_keyValueTr` is never created by `ObjectDBTransaction` — every assignment to it takes a constructor parameter — yet this type disposes it here (line 66). Its declared type `IKeyValueDBTransaction` is an interface, so the instance came from whoever chose and created it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call — a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed.
Disposes a dependency it does not own BTDB/ODBLayer/ODBRoaringBitmap.cs:356— `_cursor` is never created by `PageReader` — every assignment to it takes a constructor parameter — yet this type disposes it here (line 356). Its declared type `IKeyValueDBCursor` is an interface, so the instance came from whoever chose and created it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call — a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed.
Disposes a dependency it does not own BTDB/ODBLayer/ODBRoaringBitmap.cs:446— `_cursor` is never created by `RoaringBitmapEnumerator` — every assignment to it takes a constructor parameter — yet this type disposes it here (line 446). Its declared type `IKeyValueDBCursor` is an interface, so the instance came from whoever chose and created it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call — a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed.
Disposes a dependency it does not own BTDB/ODBLayer/RoaringBitmap.cs:315— `_inner` is never created by `BoundedPageReader` — every assignment to it takes a constructor parameter — yet this type disposes it here (line 315). Its declared type `IInternalODBRoaringBitmapPageReader` is an interface, so the instance came from whoever chose and created it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call — a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed.
Disposes a dependency it does not own BTDB/ODBLayer/RoaringBitmap.cs:378— `_source` is never created by `NotPageReader` — every assignment to it takes a constructor parameter — yet this type disposes it here (line 378). Its declared type `IInternalODBRoaringBitmapPageReader` is an interface, so the instance came from whoever chose and created it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call — a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed.
Disposes a dependency it does not own BTDB/ODBLayer/RoaringBitmap.cs:457— `_left` is never created by `AndNotPageReader` — every assignment to it takes a constructor parameter — yet this type disposes it here (line 457). Its declared type `IInternalODBRoaringBitmapPageReader` is an interface, so the instance came from whoever chose and created it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call — a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed.
Disposes a dependency it does not own BTDB/ODBLayer/RoaringBitmap.cs:458— `_right` is never created by `AndNotPageReader` — every assignment to it takes a constructor parameter — yet this type disposes it here (line 458). Its declared type `IInternalODBRoaringBitmapPageReader` is an interface, so the instance came from whoever chose and created it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call — a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed.
Disposes a dependency it does not own BTDB/ODBLayer/RoaringBitmap.cs:598— `_left` is never created by `BinaryPageReader` — every assignment to it takes a constructor parameter — yet this type disposes it here (line 598). Its declared type `IInternalODBRoaringBitmapPageReader` is an interface, so the instance came from whoever chose and created it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call — a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed.
Disposes a dependency it does not own BTDB/ODBLayer/RoaringBitmap.cs:599— `_right` is never created by `BinaryPageReader` — every assignment to it takes a constructor parameter — yet this type disposes it here (line 599). Its declared type `IInternalODBRoaringBitmapPageReader` is an interface, so the instance came from whoever chose and created it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call — a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed.
D4 · Code Duplication· Edited copy of a member (20 corresponding lines) · ×8
Edited copy of a member (20 corresponding lines) BTDB.Replication.Azure/AzureEventLogStorage.cs:186— BTDB.Replication.Azure/AzureEventLogStorage.cs:186-205 | BTDB.Replication.Azure/AzureReplicationStorage.cs:292-311 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (20 corresponding lines) BTDB.Replication.Http/HttpEventLogPeerTransport.cs:167— BTDB.Replication.Http/HttpEventLogPeerTransport.cs:167-195 | BTDB.Replication.Http/HttpReplicationPeerTransport.cs:303-322 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (20 corresponding lines) BTDB/Bon/Bon.cs:1236— BTDB/Bon/Bon.cs:1236-1255 | BTDB/Bon/Bon.cs:1346-1370 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (20 corresponding lines) BTDB/ODBLayer/TableFieldInfo.cs:28— BTDB/ODBLayer/TableFieldInfo.cs:28-47 | BTDB/ODBLayer/TableFieldInfo.cs:76-99 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (20 corresponding lines) BTDB/BTreeLib/BTreeImpl12.cs:1200— BTDB/BTreeLib/BTreeImpl12.cs:1200-1220 | BTDB/BTreeLib/BTreeImpl12.cs:1281-1300 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (20 corresponding lines) BTDB/ODBLayer/RelationBuilder.cs:2048— BTDB/ODBLayer/RelationBuilder.cs:2048-2067 | BTDB.SourceGenerator/Main.cs:1501-1520 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (20 corresponding lines) BTDB/KVDBLayer/Implementation/BTreeKeyValueDBTransaction.cs:49— BTDB/KVDBLayer/Implementation/BTreeKeyValueDBTransaction.cs:49-68 | BTDB/KVDBLayer/MemoryImplementation/InMemoryKeyValueDBTransaction.cs:30-49 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (20 corresponding lines) BTDB/EventStore2Layer/EventDeserializer.cs:118— BTDB/EventStore2Layer/EventDeserializer.cs:118-137 | BTDB/EventStore2Layer/EventSerializer.cs:252-271 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (10 corresponding lines) · ×8
Edited copy of a member (10 corresponding lines) BTDB/EventStoreLayer/ObjectTypeDescriptor.cs:795— BTDB/EventStoreLayer/ObjectTypeDescriptor.cs:795-804 | BTDB/EventStoreLayer/TupleTypeDescriptor.cs:612-621 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) BTDB/ODBLayer/ODBLazyUlongListFieldHandler.cs:42— BTDB/ODBLayer/ODBLazyUlongListFieldHandler.cs:42-51 | BTDB/ODBLayer/ODBRoaringBitmapFieldHandler.cs:42-51 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) BTDB/ODBLayer/RelationInfo.cs:109— BTDB/ODBLayer/RelationInfo.cs:109-118 | BTDB/ODBLayer/RelationInfo.cs:121-130 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) BTDB/ODBLayer/ODBDictionaryFieldHandler.cs:315— BTDB/ODBLayer/ODBDictionaryFieldHandler.cs:315-324 | BTDB/ODBLayer/ODBSetFieldHandler.cs:186-195 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) BTDB/ODBLayer/ObjectDB.cs:443— BTDB/ODBLayer/ObjectDB.cs:443-452 | BTDB/ODBLayer/ObjectDB.cs:455-469 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) BTDB.AzureStorage/AzureBlobFileCollection.cs:158— BTDB.AzureStorage/AzureBlobFileCollection.cs:158-168 | BTDB.AzureStorage/AzureBlobFileCollection.cs:173-182 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) BTDB/ODBLayer/ODBLazyUlongListFieldHandler.cs:94— BTDB/ODBLayer/ODBLazyUlongListFieldHandler.cs:94-103 | BTDB/ODBLayer/ODBRoaringBitmapFieldHandler.cs:94-103 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) BTDB.SourceGenerator/Main.cs:1052— BTDB.SourceGenerator/Main.cs:1052-1065 | BTDB.SourceGenerator/Extensions.cs:137-146 — 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.
Blocking `ReplicationNodeCoordinator.DropLeadership` inside an `async` method BTDB.Replication/ReplicationNodeCoordinator.cs:208— `ReplicationNodeCoordinator.DropLeadership` is a synchronous helper that blocks (`SemaphoreSlim.Wait`): called from an `async` method it parks the thread exactly as the inline call would. Make the helper `async` and `await` it (`await Task.Delay`, `SemaphoreSlim.WaitAsync`, a `TaskCompletionSource` instead of the poll).
Blocking `ReplicationNodeCoordinator.DropLeadership` inside an `async` method BTDB.Replication/ReplicationNodeCoordinator.cs:225— `ReplicationNodeCoordinator.DropLeadership` is a synchronous helper that blocks (`SemaphoreSlim.Wait`): called from an `async` method it parks the thread exactly as the inline call would. Make the helper `async` and `await` it (`await Task.Delay`, `SemaphoreSlim.WaitAsync`, a `TaskCompletionSource` instead of the poll).
Blocking `ReplicationNodeCoordinator.DropLeadership` inside an `async` method BTDB.Replication/ReplicationNodeCoordinator.cs:253— `ReplicationNodeCoordinator.DropLeadership` is a synchronous helper that blocks (`SemaphoreSlim.Wait`): called from an `async` method it parks the thread exactly as the inline call would. Make the helper `async` and `await` it (`await Task.Delay`, `SemaphoreSlim.WaitAsync`, a `TaskCompletionSource` instead of the poll).
Blocking `ReplicationNodeCoordinator.DropLeadership` inside an `async` method BTDB.Replication/ReplicationNodeCoordinator.cs:289— `ReplicationNodeCoordinator.DropLeadership` is a synchronous helper that blocks (`SemaphoreSlim.Wait`): called from an `async` method it parks the thread exactly as the inline call would. Make the helper `async` and `await` it (`await Task.Delay`, `SemaphoreSlim.WaitAsync`, a `TaskCompletionSource` instead of the poll).
Blocking `ReplicationNodeCoordinator.DropLeadership` inside an `async` method BTDB.Replication/ReplicationNodeCoordinator.cs:299— `ReplicationNodeCoordinator.DropLeadership` is a synchronous helper that blocks (`SemaphoreSlim.Wait`): called from an `async` method it parks the thread exactly as the inline call would. Make the helper `async` and `await` it (`await Task.Delay`, `SemaphoreSlim.WaitAsync`, a `TaskCompletionSource` instead of the poll).
Blocking `ReplicationNodeCoordinator.DropLeadership` inside an `async` method BTDB.Replication/ReplicationNodeCoordinator.cs:332— `ReplicationNodeCoordinator.DropLeadership` is a synchronous helper that blocks (`SemaphoreSlim.Wait`): called from an `async` method it parks the thread exactly as the inline call would. Make the helper `async` and `await` it (`await Task.Delay`, `SemaphoreSlim.WaitAsync`, a `TaskCompletionSource` instead of the poll).
Blocking `ReplicationNodeCoordinator.DropLeadership` inside an `async` method BTDB.Replication/ReplicationNodeCoordinator.cs:385— `ReplicationNodeCoordinator.DropLeadership` is a synchronous helper that blocks (`SemaphoreSlim.Wait`): called from an `async` method it parks the thread exactly as the inline call would. Make the helper `async` and `await` it (`await Task.Delay`, `SemaphoreSlim.WaitAsync`, a `TaskCompletionSource` instead of the poll).
Blocking `ReplicationNodeCoordinator.DropLeadership` inside an `async` method BTDB.Replication/ReplicationNodeCoordinator.cs:402— `ReplicationNodeCoordinator.DropLeadership` is a synchronous helper that blocks (`SemaphoreSlim.Wait`): called from an `async` method it parks the thread exactly as the inline call would. Make the helper `async` and `await` it (`await Task.Delay`, `SemaphoreSlim.WaitAsync`, a `TaskCompletionSource` instead of the poll).
X18 · Disposal-pattern correctness· Owned disposable field is never released · ×8
Owned disposable field is never released BTDB/KVDBLayer/Implementation/BTreeKeyValueDB.cs:21— `BTreeKeyValueDB` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `_replicationCompactionLock` itself (line 21), which makes that instance its own. But `_replicationCompactionLock` is named in none of the methods the disposal search covered: `Dispose` (line 1471), `Transactions` (line 85), `PublishBatchUnsafe` (line 1641), `FreeWaitingToDisposeUnsafe` (line 2224), `EnsureTransactionLogCommandFits` (line 2339) — that is `Dispose` plus every method `Dispose` calls BY NAME, so a release reached through an interface, a delegate or a base class is not followed and is worth checking before acting. On what was read, the type's disposal releases everything except the one thing it owns. A disposable the owner never disposes is held until finalization if its type has a finalizer, and forever if it does not — which for a synchronisation primitive, a timer, a stream or a handle means the resource accumulates once per instance for the life of the process. Release it in `Dispose` (`_replicationCompactionLock?.Dispose();`), or, if it truly does not need releasing, drop `IDisposable` from the type so the claim and the behaviour agree.
Owned disposable field is never released BTDB/KVDBLayer/Implementation/BTreeKeyValueDB.cs:51— `BTreeKeyValueDB` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `_nextRoot` itself (line 51), which makes that instance its own. But `_nextRoot` is named in none of the methods the disposal search covered: `Dispose` (line 1471), `Transactions` (line 85), `PublishBatchUnsafe` (line 1641), `FreeWaitingToDisposeUnsafe` (line 2224), `EnsureTransactionLogCommandFits` (line 2339) — that is `Dispose` plus every method `Dispose` calls BY NAME, so a release reached through an interface, a delegate or a base class is not followed and is worth checking before acting. On what was read, the type's disposal releases everything except the one thing it owns. A disposable the owner never disposes is held until finalization if its type has a finalizer, and forever if it does not — which for a synchronisation primitive, a timer, a stream or a handle means the resource accumulates once per instance for the life of the process. Release it in `Dispose` (`_nextRoot?.Dispose();`), or, if it truly does not need releasing, drop `IDisposable` from the type so the claim and the behaviour agree.
Owned disposable field is never released BTDB/ODBLayer/ObjectDB.cs:358— `ObjectDB` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `_initializeRelationsLock` itself (line 358), which makes that instance its own. But `_initializeRelationsLock` is named in none of the methods the disposal search covered: `Dispose` (line 473), `UnregisterCompactionMaintenance` (line 493) — that is `Dispose` plus every method `Dispose` calls BY NAME, so a release reached through an interface, a delegate or a base class is not followed and is worth checking before acting. On what was read, the type's disposal releases everything except the one thing it owns. A disposable the owner never disposes is held until finalization if its type has a finalizer, and forever if it does not — which for a synchronisation primitive, a timer, a stream or a handle means the resource accumulates once per instance for the life of the process. Release it in `Dispose` (`_initializeRelationsLock?.Dispose();`), or, if it truly does not need releasing, drop `IDisposable` from the type so the claim and the behaviour agree.
Owned disposable field is never released BTDB/StreamLayer/MemoryPositionLessStream.cs:12— `MemoryPositionLessStream` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `_lock` itself (line 12), which makes that instance its own. But `_lock` is named in none of the methods the disposal search covered: `Dispose` (line 15) — that is `Dispose` plus every method `Dispose` calls BY NAME, so a release reached through an interface, a delegate or a base class is not followed and is worth checking before acting. On what was read, the type's disposal releases everything except the one thing it owns. A disposable the owner never disposes is held until finalization if its type has a finalizer, and forever if it does not — which for a synchronisation primitive, a timer, a stream or a handle means the resource accumulates once per instance for the life of the process. Release it in `Dispose` (`_lock?.Dispose();`), or, if it truly does not need releasing, drop `IDisposable` from the type so the claim and the behaviour agree.
Owned disposable field is never released BTDB.Replication/EventLog/EventLogService.cs:120— `EventLogTopic` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `_resolve` itself (line 120), which makes that instance its own. But `_resolve` is named in none of the methods the disposal search covered: `DisposeAsync` (line 1012), `FailOutstanding` (line 311) — that is `Dispose` plus every method `Dispose` calls BY NAME, so a release reached through an interface, a delegate or a base class is not followed and is worth checking before acting. On what was read, the type's disposal releases everything except the one thing it owns. A disposable the owner never disposes is held until finalization if its type has a finalizer, and forever if it does not — which for a synchronisation primitive, a timer, a stream or a handle means the resource accumulates once per instance for the life of the process. Release it in `Dispose` (`_resolve?.Dispose();`), or, if it truly does not need releasing, drop `IDisposable` from the type so the claim and the behaviour agree.
Owned disposable field is never released BTDB.Replication/LeadershipSession.cs:20— `LeadershipSession` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `_lane` itself (line 20), which makes that instance its own. But `_lane` is named in none of the methods the disposal search covered: `Dispose` (line 32) — that is `Dispose` plus every method `Dispose` calls BY NAME, so a release reached through an interface, a delegate or a base class is not followed and is worth checking before acting. On what was read, the type's disposal releases everything except the one thing it owns. A disposable the owner never disposes is held until finalization if its type has a finalizer, and forever if it does not — which for a synchronisation primitive, a timer, a stream or a handle means the resource accumulates once per instance for the life of the process. Release it in `Dispose` (`_lane?.Dispose();`), or, if it truly does not need releasing, drop `IDisposable` from the type so the claim and the behaviour agree.
Owned disposable field is never released BTDB.Replication.Http/HttpReplicationPeerTransport.cs:27— `HttpReplicationPeerTransport` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `_requests` itself (line 27), which makes that instance its own. But `_requests` is named in none of the methods the disposal search covered: `Dispose` (line 352) — that is `Dispose` plus every method `Dispose` calls BY NAME, so a release reached through an interface, a delegate or a base class is not followed and is worth checking before acting. On what was read, the type's disposal releases everything except the one thing it owns. A disposable the owner never disposes is held until finalization if its type has a finalizer, and forever if it does not — which for a synchronisation primitive, a timer, a stream or a handle means the resource accumulates once per instance for the life of the process. Release it in `Dispose` (`_requests?.Dispose();`), or, if it truly does not need releasing, drop `IDisposable` from the type so the claim and the behaviour agree.
Owned disposable field is never released BTDB.Replication.EventSourcing/EventPublisher.cs:75— `EventPublisher` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `_publishing` itself (line 75), which makes that instance its own. But `_publishing` is named in none of the methods the disposal search covered: `DisposeAsync` (line 583) — that is `Dispose` plus every method `Dispose` calls BY NAME, so a release reached through an interface, a delegate or a base class is not followed and is worth checking before acting. On what was read, the type's disposal releases everything except the one thing it owns. A disposable the owner never disposes is held until finalization if its type has a finalizer, and forever if it does not — which for a synchronisation primitive, a timer, a stream or a handle means the resource accumulates once per instance for the life of the process. Release it in `Dispose` (`_publishing?.Dispose();`), or, if it truly does not need releasing, drop `IDisposable` from the type so the claim and the behaviour agree.
D4 · Code Duplication· Edited copy of a member (18 corresponding lines) · ×7
Edited copy of a member (18 corresponding lines) BTDB.Replication/FileSystem/FileSystemReplicationStorage.cs:312— BTDB.Replication/FileSystem/FileSystemReplicationStorage.cs:312-329 | BTDB.Replication.Azure/AzureReplicationStorage.cs:473-492 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) BTDB/KVDBLayer/BTreeMem/BTreeLeafComp.cs:390— BTDB/KVDBLayer/BTreeMem/BTreeLeafComp.cs:390-409 | BTDB/KVDBLayer/BTreeMem/BTreeLeafComp.cs:412-429 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) BTDB/Buffer/PackUnpack.cs:994— BTDB/Buffer/PackUnpack.cs:994-1011 | BTDB/Buffer/PackUnpack.cs:1020-1037 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) BTDB/ODBLayer/ODBDictionary.cs:264— BTDB/ODBLayer/ODBDictionary.cs:264-284 | BTDB/ODBLayer/ODBDictionary.cs:290-307 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) BTDB/KVDBLayer/BTreeMem/BTreeRoot.cs:250— BTDB/KVDBLayer/BTreeMem/BTreeRoot.cs:250-267 | BTDB/KVDBLayer/BTreeMem/BTreeRoot.cs:270-287 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) DBBenchmark/IntegerSecondaryKeyBenchmark.cs:36— DBBenchmark/IntegerSecondaryKeyBenchmark.cs:36-53 | DBBenchmark/SecondaryKeyAllocationBenchmark.cs:43-68 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) BTDB/FieldHandler/DefaultFieldHandlerLogger.cs:138— BTDB/FieldHandler/DefaultFieldHandlerLogger.cs:138-155 | BTDB/FieldHandler/DefaultFieldHandlerLogger.cs:158-176 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (23 lines × 2) BTDB/ODBLayer/RelationInfo.cs:503— BTDB/ODBLayer/RelationInfo.cs:503-525 | BTDB/ODBLayer/RelationInfo.cs:837-859 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/ODBLayer/RelationInfo.cs:503` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (23 lines × 2) BTDB/BTreeLib/BTreeImpl12.cs:2282— BTDB/BTreeLib/BTreeImpl12.cs:2282-2304 | BTDB/BTreeLib/BTreeImpl12.cs:2335-2357 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/BTreeLib/BTreeImpl12.cs:2282` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (23 lines × 2) BTDB/Collections/LruCache.cs:225— BTDB/Collections/LruCache.cs:225-247 | BTDB/Collections/SpanByteLruCache.cs:233-255 — before extracting anything, compare `BTDB/Collections/LruCache.cs` and `BTDB/Collections/SpanByteLruCache.cs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 83 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/Collections/LruCache.cs:225` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind `key` to `TKey` in one and `in ReadOnlySpan<byte>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (23 lines × 2) BTDB/Reactive/FastBehaviourSubject.cs:177— BTDB/Reactive/FastBehaviourSubject.cs:177-199 | BTDB/Reactive/FastSubject.cs:99-121 — before extracting anything, compare `BTDB/Reactive/FastBehaviourSubject.cs` and `BTDB/Reactive/FastSubject.cs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 73 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/Reactive/FastBehaviourSubject.cs:177` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (23 lines × 2) BTDB/Collections/LruCache.cs:337— BTDB/Collections/LruCache.cs:337-359 | BTDB/Collections/SpanByteLruCache.cs:395-417 — before extracting anything, compare `BTDB/Collections/LruCache.cs` and `BTDB/Collections/SpanByteLruCache.cs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 83 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (23 lines × 2) BTDB/KVDBLayer/Implementation/BTreeKeyValueDB.cs:2962— BTDB/KVDBLayer/Implementation/BTreeKeyValueDB.cs:2962-2984 | BTDB/KVDBLayer/Implementation/BTreeKeyValueDB.cs:3016-3038 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note first that the copies are not typed on the same thing: the declarations holding them bind `buffer` to `ref Memory<byte>` in one and `scoped ref Span<byte>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (23 lines × 2) BTDB/KVDBLayer/Implementation/BTreeKeyValueDBCursor.cs:59— BTDB/KVDBLayer/Implementation/BTreeKeyValueDBCursor.cs:59-81 | BTDB/KVDBLayer/MemoryImplementation/InMemoryKeyValueDBCursor.cs:50-72 — before extracting anything, compare `BTDB/KVDBLayer/Implementation/BTreeKeyValueDBCursor.cs` and `BTDB/KVDBLayer/MemoryImplementation/InMemoryKeyValueDBCursor.cs` as WHOLE FILES: this scan already matched 3 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/KVDBLayer/Implementation/BTreeKeyValueDBCursor.cs:59` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (17 lines × 2) BTDB.SourceGenerator/Main.cs:2515— BTDB.SourceGenerator/Main.cs:2515-2531 | BTDB.SourceGenerator/Main.cs:2548-2564 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB.SourceGenerator/Main.cs:2515` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (17 lines × 2) BTDB/EventStoreLayer/ListTypeDescriptor.cs:837— BTDB/EventStoreLayer/ListTypeDescriptor.cs:837-853 | BTDB/EventStoreLayer/ListTypeDescriptor.cs:874-890 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/EventStoreLayer/ListTypeDescriptor.cs:837` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (17 lines × 2) BTDB/KVDBLayer/Implementation/BTreeKeyValueDBCursor.cs:629— BTDB/KVDBLayer/Implementation/BTreeKeyValueDBCursor.cs:629-645 | BTDB/KVDBLayer/Implementation/BTreeKeyValueDBCursor.cs:658-674 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/KVDBLayer/Implementation/BTreeKeyValueDBCursor.cs:629` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (17 lines × 2) BTDB/BTreeLib/BTreeImpl12.cs:81— BTDB/BTreeLib/BTreeImpl12.cs:81-97 | BTDB/BTreeLib/BTreeImpl12.cs:200-216 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/BTreeLib/BTreeImpl12.cs:81` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (17 lines × 2) BTDB/KVDBLayer/BTreeMem/BTreeLeaf.cs:169— BTDB/KVDBLayer/BTreeMem/BTreeLeaf.cs:169-185 | BTDB/KVDBLayer/BTreeMem/BTreeLeafComp.cs:303-319 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (17 lines × 2) BTDB/ODBLayer/TableInfo.cs:223— BTDB/ODBLayer/TableInfo.cs:223-239 | BTDB/ODBLayer/TableInfo.cs:822-838 — both copies are in the same file, so extract the 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 (17 lines × 2) BTDB.SourceGenerator/Main.cs:6210— BTDB.SourceGenerator/Main.cs:6210-6226 | BTDB.SourceGenerator/Main.cs:6233-6250 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB.SourceGenerator/Main.cs:6210` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `BTDB.SourceGenerator/Main.cs:6226` calls `Append` and `BTDB.SourceGenerator/Main.cs:6250` does not — after which the two agree again for 5 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (16 lines × 2) BTDB/BTreeLib/BTreeImpl12.cs:2533— BTDB/BTreeLib/BTreeImpl12.cs:2533-2548 | BTDB/BTreeLib/BTreeImpl12.cs:2556-2571 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/BTreeLib/BTreeImpl12.cs:2533` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16 lines × 2) BTDB/BTreeLib/BTreeImpl12.cs:2696— BTDB/BTreeLib/BTreeImpl12.cs:2696-2711 | BTDB/BTreeLib/BTreeImpl12.cs:2722-2737 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/BTreeLib/BTreeImpl12.cs:2696` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16 lines × 2) BTDB/Reactive/FastBehaviourSubject.cs:116— BTDB/Reactive/FastBehaviourSubject.cs:116-131 | BTDB/Reactive/FastSubject.cs:64-79 — before extracting anything, compare `BTDB/Reactive/FastBehaviourSubject.cs` and `BTDB/Reactive/FastSubject.cs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 73 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) BTDB/EventStoreLayer/ListTypeDescriptor.cs:353— BTDB/EventStoreLayer/ListTypeDescriptor.cs:353-368 | BTDB/FieldHandler/ListFieldHandler.cs:359-374 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/EventStoreLayer/ListTypeDescriptor.cs:353` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (16 lines × 2) BTDB/EventStoreLayer/TupleTypeDescriptor.cs:204— BTDB/EventStoreLayer/TupleTypeDescriptor.cs:204-219 | BTDB/EventStoreLayer/TupleTypeDescriptor.cs:239-254 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/EventStoreLayer/TupleTypeDescriptor.cs:204` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16 lines × 2) BTDB/FieldHandler/TupleFieldHandler.cs:237— BTDB/FieldHandler/TupleFieldHandler.cs:237-252 | BTDB/FieldHandler/TupleFieldHandler.cs:272-287 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/FieldHandler/TupleFieldHandler.cs:237` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16 lines × 2) BTDB/EventStoreLayer/DictionaryTypeDescriptor.cs:238— BTDB/EventStoreLayer/DictionaryTypeDescriptor.cs:238-253 | BTDB/FieldHandler/DictionaryFieldHandler.cs:280-295 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication· Edited copy of a member (22 corresponding lines) · ×6
Edited copy of a member (22 corresponding lines) BTDB/EventStoreLayer/NullableTypeDescriptor.cs:362— BTDB/EventStoreLayer/NullableTypeDescriptor.cs:362-383 | BTDB/FieldHandler/NullableFieldHandler.cs:139-161 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (22 corresponding lines) BTDB/ODBLayer/RelationBuilder.cs:1814— BTDB/ODBLayer/RelationBuilder.cs:1814-1835 | BTDB/ODBLayer/RelationBuilder.cs:1839-1863 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (22 corresponding lines) BTDB/Bon/Bon.cs:624— BTDB/Bon/Bon.cs:624-645 | BTDB/Bon/Bon.cs:784-812 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (22 corresponding lines) BTDB/Collections/RefDictionary.cs:85— BTDB/Collections/RefDictionary.cs:85-106 | BTDB/Collections/RefDictionary.cs:109-135 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (22 corresponding lines) BTDB/Collections/RefDictionary.cs:380— BTDB/Collections/RefDictionary.cs:380-401 | BTDB/Collections/SpanByteNoRemoveDictionary.cs:258-279 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (22 corresponding lines) BTDB/KVDBLayer/Implementation/BTreeKeyValueDBCursor.cs:473— BTDB/KVDBLayer/Implementation/BTreeKeyValueDBCursor.cs:473-496 | BTDB/KVDBLayer/MemoryImplementation/InMemoryKeyValueDBCursor.cs:471-492 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (13 corresponding lines) · ×6
Edited copy of a member (13 corresponding lines) BTDB.Replication/FileSystem/FileSystemReplicationStorage.cs:189— BTDB.Replication/FileSystem/FileSystemReplicationStorage.cs:189-201 | BTDB.Replication.Azure/AzureReplicationStorage.cs:367-379 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) BTDB/StreamLayer/MemWriter.cs:288— BTDB/StreamLayer/MemWriter.cs:288-300 | BTDB/StreamLayer/MemWriter.cs:304-316 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) BTDB/ODBLayer/ODBDictionaryFieldHandler.cs:293— BTDB/ODBLayer/ODBDictionaryFieldHandler.cs:293-305 | BTDB/ODBLayer/ODBSetFieldHandler.cs:164-176 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) BTDB/KVDBLayer/MemoryImplementation/InMemoryKeyValueDBCursor.cs:380— BTDB/KVDBLayer/MemoryImplementation/InMemoryKeyValueDBCursor.cs:380-392 | BTDB/KVDBLayer/MemoryImplementation/InMemoryKeyValueDBCursor.cs:395-407 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) BTDB.Replication.Http/EventLogWire.cs:135— BTDB.Replication.Http/EventLogWire.cs:135-148 | BTDB.Replication.Http/EventLogWire.cs:191-203 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) BTDB.SourceGenerator/HashCode.cs:46— BTDB.SourceGenerator/HashCode.cs:46-58 | BTDB.SourceGenerator/HashCode.cs:61-75 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (7 lines × 3) BTDB/ODBLayer/RelationDBManipulator.cs:279— BTDB/ODBLayer/RelationDBManipulator.cs:279-285 | BTDB/ODBLayer/RelationDBManipulator.cs:346-352 | BTDB/ODBLayer/RelationDBManipulator.cs:385-391 — 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) BTDB/EventStoreLayer/ObjectTypeDescriptor.cs:313— BTDB/EventStoreLayer/ObjectTypeDescriptor.cs:313-319 | BTDB/ODBLayer/RelationInfo.cs:351-357 | BTDB/ODBLayer/RelationInfo.cs:617-623 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/EventStoreLayer/ObjectTypeDescriptor.cs:313` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (7 lines × 3) BTDB/Collections/SpanByteNoRemoveDictionary.cs:79— BTDB/Collections/SpanByteNoRemoveDictionary.cs:79-85 | BTDB/Collections/SpanByteNoRemoveDictionary.cs:119-125 | BTDB/Collections/SpanByteNoRemoveDictionary.cs:153-159 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/Collections/SpanByteNoRemoveDictionary.cs:79` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `BTDB/Collections/SpanByteNoRemoveDictionary.cs:162` calls `RetryRead` and `BTDB/Collections/SpanByteNoRemoveDictionary.cs:128` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7 lines × 3) BTDB/EventStoreLayer/ListTypeDescriptor.cs:255— BTDB/EventStoreLayer/ListTypeDescriptor.cs:255-261 | BTDB/FieldHandler/ListFieldHandler.cs:257-263 | BTDB/FieldHandler/ListFieldOrderedHandler.cs:232-238 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
Duplicated block (7 lines × 3) BTDB/EventStoreLayer/NullableTypeDescriptor.cs:220— BTDB/EventStoreLayer/NullableTypeDescriptor.cs:220-226 | BTDB/EventStoreLayer/NullableTypeDescriptor.cs:240-247 | BTDB/EventStoreLayer/NullableTypeDescriptor.cs:261-270 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/EventStoreLayer/NullableTypeDescriptor.cs:220` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `BTDB/EventStoreLayer/NullableTypeDescriptor.cs:261` calls `MakeGenericType` and `BTDB/EventStoreLayer/NullableTypeDescriptor.cs:220` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7 lines × 3) BTDB/EventStoreLayer/ObjectTypeDescriptor.cs:454— BTDB/EventStoreLayer/ObjectTypeDescriptor.cs:454-460 | BTDB/ODBLayer/RelationInfo.cs:1459-1465 | BTDB/ODBLayer/TableInfo.cs:376-382 — 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.
Swallowed exception (caught, then discarded) BTDB/ODBLayer/ODBIterator.cs:562— `catch (Exception) when (…)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
Swallowed exception (caught, then discarded) BTDB.Replication/EventLog/EventLogService.cs:720— `catch (EventLogOwnerLostException)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
Swallowed exception (caught, then discarded) BTDB.Replication/LeaseSessionController.cs:88— `catch (InvalidOperationException) when (…)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
Swallowed exception (caught, then discarded) BTDB.Replication.Http/HttpReplicationPeerTransport.cs:100— `catch (InvalidDataException)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
Swallowed exception (caught, then discarded) BTDB.Replication.Http/HttpReplicationPeerTransport.cs:108— `catch (IOException)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
Swallowed exception (caught, then discarded) BTDB.LSM/Storage/FileSystemLsmStorage.cs:165— `catch (FileNotFoundException)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
Stateful singleton: ServiceProviderIntegration BTDB/IOC/ServiceProviderIntegration.cs:10— `ServiceProviderIntegration` is a singleton (one shared instance) but mutates instance state outside any lock (_rootContainer, _rootServiceProvider, _exportFactories, _exports; e.g. `_rootContainer` at line 48).
Stateful singleton: ContainerImpl BTDB/IOC/ContainerImpl.cs:21— `ContainerImpl` is a singleton (one shared instance) but mutates instance state outside any lock (_scopedInstancesLock; e.g. `_scopedInstancesLock` at line 908).
Stateful singleton: ReplicationPresence BTDB.Replication/ReplicationPresence.cs:33— `ReplicationPresence` is a singleton (one shared instance) but mutates instance state outside any lock (_members; e.g. `_members` at line 262).
Stateful singleton: LeaseSessionController BTDB.Replication/LeaseSessionController.cs:13— `LeaseSessionController` is a singleton (one shared instance) but mutates instance state outside any lock (_requestTimeout, _confirmationDuration; e.g. `_requestTimeout` at line 72).
Stateful singleton: ReplicationNodeCoordinator BTDB.Replication/ReplicationNodeCoordinator.cs:79— `ReplicationNodeCoordinator` is a singleton (one shared instance) but mutates instance state outside any lock (_databases, _canonicalBase, Role, _candidate, _publishers, _remoteMaintenance; e.g. `_databases` at line 175).
D4 · Code Duplication· Edited copy of a member (41 corresponding lines) · ×5
Edited copy of a member (41 corresponding lines) BTDB.LSM/Engine/MergingIterator.cs:100— BTDB.LSM/Engine/MergingIterator.cs:100-141 | BTDB.LSM/Engine/MergingIterator.cs:144-184 — These two members are one piece of code written twice and then edited apart: 41 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (41 corresponding lines) BTDB/ODBLayer/RelationDBManipulator.cs:1720— BTDB/ODBLayer/RelationDBManipulator.cs:1720-1764 | BTDB/ODBLayer/RelationDBManipulator.cs:1770-1810 — These two members are one piece of code written twice and then edited apart: 41 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (41 corresponding lines) BTDB/BTreeLib/BTreeImpl12.cs:127— BTDB/BTreeLib/BTreeImpl12.cs:127-170 | BTDB/BTreeLib/BTreeImpl12.cs:246-286 — These two members are one piece of code written twice and then edited apart: 41 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (41 corresponding lines) BTDB/ODBLayer/RelationDBManipulator.cs:1300— BTDB/ODBLayer/RelationDBManipulator.cs:1300-1340 | BTDB/ODBLayer/RelationDBManipulator.cs:1568-1608 — These two members are one piece of code written twice and then edited apart: 41 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (41 corresponding lines) BTDB/ODBLayer/ODBLazyUlongList.cs:191— BTDB/ODBLayer/ODBLazyUlongList.cs:191-231 | BTDB/ODBLayer/ODBRoaringBitmap.cs:242-295 — These two members are one piece of code written twice and then edited apart: 41 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (21 corresponding lines) · ×5
Edited copy of a member (21 corresponding lines) BTDB/Serialization/RawData.cs:330— BTDB/Serialization/RawData.cs:330-350 | BTDB/Serialization/RawData.cs:357-379 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (21 corresponding lines) BTDB/BTreeLib/NodeUtils12.cs:228— BTDB/BTreeLib/NodeUtils12.cs:228-248 | BTDB/BTreeLib/NodeUtils12.cs:251-276 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (21 corresponding lines) BTDB.LSM.Azure/AzureLsmStorage.cs:126— BTDB.LSM.Azure/AzureLsmStorage.cs:126-146 | BTDB.LSM.Azure/AzureLsmStorage.cs:150-173 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (21 corresponding lines) BTDB/IL/IilGenForbiddenInstructionsCheating.cs:139— BTDB/IL/IilGenForbiddenInstructionsCheating.cs:139-159 | BTDB/IL/IilGenForbiddenInstructionsCheating.cs:162-182 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (21 corresponding lines) BTDB/Collections/RefDictionary.cs:404— BTDB/Collections/RefDictionary.cs:404-424 | BTDB/Collections/SpanByteNoRemoveDictionary.cs:282-302 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (19 corresponding lines) · ×5
Edited copy of a member (19 corresponding lines) BTDB.SourceGenerator/HashCode.cs:78— BTDB.SourceGenerator/HashCode.cs:78-96 | BTDB.SourceGenerator/HashCode.cs:99-120 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (19 corresponding lines) BTDB/ODBLayer/RelationBuilder.cs:630— BTDB/ODBLayer/RelationBuilder.cs:630-648 | BTDB/ODBLayer/RelationBuilder.cs:651-669 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (19 corresponding lines) BTDB/KVDBLayer/Implementation/BTreeKeyValueDBCursor.cs:26— BTDB/KVDBLayer/Implementation/BTreeKeyValueDBCursor.cs:26-54 | BTDB/KVDBLayer/MemoryImplementation/InMemoryKeyValueDBCursor.cs:24-42 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (19 corresponding lines) BTDB.SourceGenerator/Main.cs:6183— BTDB.SourceGenerator/Main.cs:6183-6202 | BTDB.SourceGenerator/Main.cs:6277-6295 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (19 corresponding lines) BTDB/Bon/Bon.cs:936— BTDB/Bon/Bon.cs:936-954 | BTDB/Bon/Bon.cs:957-976 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (16 corresponding lines) · ×5
Edited copy of a member (16 corresponding lines) BTDB/EventStoreLayer/ObjectTypeDescriptor.cs:777— BTDB/EventStoreLayer/ObjectTypeDescriptor.cs:777-792 | BTDB/EventStoreLayer/TupleTypeDescriptor.cs:594-609 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) BTDB/BTreeLib/NodeUtils12.cs:128— BTDB/BTreeLib/NodeUtils12.cs:128-143 | BTDB/BTreeLib/NodeUtils12.cs:146-163 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) BTDB.LSM/Engine/NativeMemtable.cs:495— BTDB.LSM/Engine/NativeMemtable.cs:495-511 | BTDB.LSM/Engine/NativeMemtable.cs:521-536 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) BTDB.Replication/EventLog/InMemoryEventLogStorage.cs:108— BTDB.Replication/EventLog/InMemoryEventLogStorage.cs:108-124 | BTDB.LSM/Storage/InMemoryLsmStorage.cs:82-97 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) BTDB.Replication/EventLog/FileSystemEventLogStorage.cs:87— BTDB.Replication/EventLog/FileSystemEventLogStorage.cs:87-104 | BTDB.Replication/EventLog/FileSystemEventLogStorage.cs:126-141 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (21 lines × 2) BTDB/ODBLayer/RelationBuilder.cs:674— BTDB/ODBLayer/RelationBuilder.cs:674-694 | BTDB/ODBLayer/RelationBuilder.cs:725-745 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/ODBLayer/RelationBuilder.cs:674` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (21 lines × 2) BTDB/KVDBLayer/Implementation/Compactor.cs:385— BTDB/KVDBLayer/Implementation/Compactor.cs:385-405 | BTDB/KVDBLayer/Implementation/ReplicationCompactor.cs:311-331 — before extracting anything, compare `BTDB/KVDBLayer/Implementation/Compactor.cs` and `BTDB/KVDBLayer/Implementation/ReplicationCompactor.cs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 132 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/KVDBLayer/Implementation/Compactor.cs:385` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (21 lines × 2) BTDB/KVDBLayer/Implementation/InMemoryFileCollection.cs:246— BTDB/KVDBLayer/Implementation/InMemoryFileCollection.cs:246-266 | BTDB/KVDBLayer/Implementation/InMemoryReplicationFileStorage.cs:246-266 — before extracting anything, compare `BTDB/KVDBLayer/Implementation/InMemoryFileCollection.cs` and `BTDB/KVDBLayer/Implementation/InMemoryReplicationFileStorage.cs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 162 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (21 lines × 2) BTDB/ODBLayer/RelationDBManipulator.cs:346— BTDB/ODBLayer/RelationDBManipulator.cs:346-366 | BTDB/ODBLayer/RelationDBManipulator.cs:385-405 — both copies are in the same file, so extract the 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 (21 lines × 2) BTDB/EventStore2Layer/EventSerializer.cs:150— BTDB/EventStore2Layer/EventSerializer.cs:150-170 | BTDB/EventStoreLayer/TypeSerializers.cs:671-691 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/EventStore2Layer/EventSerializer.cs:150` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `BTDB/EventStoreLayer/TypeSerializers.cs:693` calls `newDescriptor` and `BTDB/EventStore2Layer/EventSerializer.cs:171` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (19 lines × 2) BTDB/EventStoreLayer/DictionaryTypeDescriptor.cs:511— BTDB/EventStoreLayer/DictionaryTypeDescriptor.cs:511-529 | BTDB/EventStoreLayer/ListTypeDescriptor.cs:696-714 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/EventStoreLayer/DictionaryTypeDescriptor.cs:511` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `BTDB/EventStoreLayer/DictionaryTypeDescriptor.cs:509` calls `DeclareLocal` and `BTDB/EventStoreLayer/ListTypeDescriptor.cs:694` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (19 lines × 2) BTDB/ODBLayer/RelationConstraintReverseEnumerator.cs:42— BTDB/ODBLayer/RelationConstraintReverseEnumerator.cs:42-60 | BTDB/ODBLayer/RelationEnumerator.cs:105-123 — before extracting anything, compare `BTDB/ODBLayer/RelationConstraintReverseEnumerator.cs` and `BTDB/ODBLayer/RelationEnumerator.cs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 154 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/ODBLayer/RelationConstraintReverseEnumerator.cs:42` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (19 lines × 2) BTDB/KVDBLayer/Implementation/BTreeKeyValueDBCursor.cs:757— BTDB/KVDBLayer/Implementation/BTreeKeyValueDBCursor.cs:757-775 | BTDB/KVDBLayer/MemoryImplementation/InMemoryKeyValueDBCursor.cs:687-705 — before extracting anything, compare `BTDB/KVDBLayer/Implementation/BTreeKeyValueDBCursor.cs` and `BTDB/KVDBLayer/MemoryImplementation/InMemoryKeyValueDBCursor.cs` as WHOLE FILES: this scan already matched 3 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (19 lines × 2) BTDB/EventStore2Layer/EventDeserializer.cs:231— BTDB/EventStore2Layer/EventDeserializer.cs:231-249 | BTDB/EventStore2Layer/EventSerializer.cs:337-355 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/EventStore2Layer/EventDeserializer.cs:231` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (19 lines × 2) BTDB/IOC/ContainerImpl.cs:293— BTDB/IOC/ContainerImpl.cs:293-311 | BTDB/IOC/ContainerImpl.cs:313-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. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/IOC/ContainerImpl.cs:293` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) BTDB/ODBLayer/RelationDBManipulator.cs:1736— BTDB/ODBLayer/RelationDBManipulator.cs:1736-1750 | BTDB/ODBLayer/RelationDBManipulator.cs:1782-1796 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/ODBLayer/RelationDBManipulator.cs:1736` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (15 lines × 2) BTDB/EventStoreLayer/DictionaryTypeDescriptor.cs:706— BTDB/EventStoreLayer/DictionaryTypeDescriptor.cs:706-720 | BTDB/EventStoreLayer/ListTypeDescriptor.cs:885-899 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/EventStoreLayer/DictionaryTypeDescriptor.cs:706` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `BTDB/EventStoreLayer/DictionaryTypeDescriptor.cs:722` calls `DeclareLocal` and `BTDB/EventStoreLayer/ListTypeDescriptor.cs:900` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (15 lines × 2) DBBenchmark/EventLog/EventLogStorageScreening.cs:226— DBBenchmark/EventLog/EventLogStorageScreening.cs:226-240 | DBBenchmark/EventLog/EventLogStorageScreening.cs:273-287 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `DBBenchmark/EventLog/EventLogStorageScreening.cs:226` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) BTDB.SourceGenerator/Main.cs:5731— BTDB.SourceGenerator/Main.cs:5731-5745 | BTDB.SourceGenerator/Main.cs:5872-5886 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB.SourceGenerator/Main.cs:5731` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) BTDB.SourceGenerator/EquatableArray.cs:61— BTDB.SourceGenerator/EquatableArray.cs:61-75 | BTDB/Collections/EquatableArray.cs:54-68 — before extracting anything, compare `BTDB.SourceGenerator/EquatableArray.cs` and `BTDB/Collections/EquatableArray.cs` as WHOLE FILES: 98% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (6 lines × 3) BTDB/BTreeLib/BTreeImpl12.cs:847— BTDB/BTreeLib/BTreeImpl12.cs:847-852 | BTDB/BTreeLib/BTreeImpl12.cs:1657-1662 | BTDB/BTreeLib/BTreeImpl12.cs:1711-1716 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/BTreeLib/BTreeImpl12.cs:847` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (6 lines × 3) BTDB/FieldHandler/DictionaryFieldHandler.cs:178— BTDB/FieldHandler/DictionaryFieldHandler.cs:178-183 | BTDB/FieldHandler/ListFieldHandler.cs:175-180 | BTDB/FieldHandler/ListFieldOrderedHandler.cs:152-157 — before extracting anything, compare `BTDB/FieldHandler/DictionaryFieldHandler.cs` and `BTDB/FieldHandler/ListFieldHandler.cs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 92 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `BTDB/FieldHandler/DictionaryFieldHandler.cs:184` calls `GetGenericArguments`, `DeclareLocal` and `BTDB/FieldHandler/ListFieldHandler.cs:181` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (6 lines × 3) BTDB/ODBLayer/ODBIterator.cs:432— BTDB/ODBLayer/ODBIterator.cs:432-437 | BTDB/ODBLayer/ODBIterator.cs:461-466 | BTDB/ODBLayer/ODBIterator.cs:509-514 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (6 lines × 3) BTDB/Interpreter/Interpreter.cs:1927— BTDB/Interpreter/Interpreter.cs:1927-1932 | BTDB/Interpreter/Interpreter.cs:1935-1940 | BTDB/Interpreter/Interpreter.cs:1943-1948 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/Interpreter/Interpreter.cs:1927` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 3) BTDB/EventStoreLayer/ListTypeDescriptor.cs:337— BTDB/EventStoreLayer/ListTypeDescriptor.cs:337-342 | BTDB/FieldHandler/ListFieldHandler.cs:343-348 | BTDB/FieldHandler/ListFieldOrderedHandler.cs:296-301 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/EventStoreLayer/ListTypeDescriptor.cs:337` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (5 lines × 3) BTDB/Reactive/FastBehaviourSubject.cs:192— BTDB/Reactive/FastBehaviourSubject.cs:192-196 | BTDB/Reactive/FastBehaviourSubject.cs:210-214 | BTDB/Reactive/FastSubject.cs:114-118 — before extracting anything, compare `BTDB/Reactive/FastBehaviourSubject.cs` and `BTDB/Reactive/FastSubject.cs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 73 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/Reactive/FastBehaviourSubject.cs:192` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 3) BTDB/EventStoreLayer/DictionaryTypeDescriptor.cs:676— BTDB/EventStoreLayer/DictionaryTypeDescriptor.cs:676-680 | BTDB/EventStoreLayer/ListTypeDescriptor.cs:825-829 | BTDB/EventStoreLayer/ListTypeDescriptor.cs:861-865 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/EventStoreLayer/DictionaryTypeDescriptor.cs:676` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `BTDB/EventStoreLayer/DictionaryTypeDescriptor.cs:682` calls `DeclareLocal` and `BTDB/EventStoreLayer/ListTypeDescriptor.cs:830` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (5 lines × 3) DBBenchmark/EventLog/EventLogStorageScreening.cs:92— DBBenchmark/EventLog/EventLogStorageScreening.cs:92-96 | DBBenchmark/EventLog/EventLogStorageScreening.cs:120-124 | DBBenchmark/EventLog/EventLogStorageScreening.cs:148-152 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (5 lines × 3) BTDB.Replication.Azure/AzureReplicationStorage.cs:459— BTDB.Replication.Azure/AzureReplicationStorage.cs:459-463 | BTDB.Replication/FileSystem/FileSystemReplicationStorage.cs:299-303 | DBBenchmark/Replication/BenchmarkReplicationStorage.cs:184-188 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB.Replication.Azure/AzureReplicationStorage.cs:459` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (5 lines × 3) DBBenchmark/LSM/LsmAzureBenchmark.cs:61— DBBenchmark/LSM/LsmAzureBenchmark.cs:61-65 | DBBenchmark/LSM/LsmDurableBenchmark.cs:53-57 | DBBenchmark/LSM/LsmSpillBenchmark.cs:71-75 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
IC1 · Incompleteness & stubs· Both branches open with the same statements · ×5
Both branches open with the same statements — the condition does not decide them BTDB.SourceGenerator/Main.cs:4929— The first 4 statements of the `if` and of the `else` are identical, so they run on both paths regardless of the condition. Lift them above the `if` — leaving them duplicated inside makes the branches read as though they handled this differently.
Both branches open with the same statements — the condition does not decide them BTDB/BTreeLib/BTreeImpl12.cs:2327— The first 3 statements of the `if` and of the `else` are identical, so they run on both paths regardless of the condition. Lift them above the `if` — leaving them duplicated inside makes the branches read as though they handled this differently.
Both branches open with the same statements — the condition does not decide them REDACTED:135— The first 2 statements of the `if` and of the `else` are identical, so they run on both paths regardless of the condition. Lift them above the `if` — leaving them duplicated inside makes the branches read as though they handled this differently.
Both branches open with the same statements — the condition does not decide them BTDB/SnappyCompression/SnappyCompress.cs:124— The first 3 statements of the `if` and of the `else` are identical, so they run on both paths regardless of the condition. Lift them above the `if` — leaving them duplicated inside makes the branches read as though they handled this differently.
Both branches open with the same statements — the condition does not decide them BTDB/StreamLayer/MemWriter.cs:948— The first 3 statements of the `if` and of the `else` are identical, so they run on both paths regardless of the condition. Lift them above the `if` — leaving them duplicated inside makes the branches read as though they handled this differently.
Unfinished stub — throws NotImplementedException BTDB/ODBLayer/Constraint.cs:247— `IsSimpleExact` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException BTDB/ODBLayer/Constraint.cs:252— `Prepare` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException BTDB/ODBLayer/Constraint.cs:257— `WritePrefix` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException BTDB/ODBLayer/Constraint.cs:262— `Match` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws a "not implemented" exception BTDB/Reactive/AnonymousObserver.cs:26— `OnError` throws an exception whose message says it isn't finished — a not-implemented stub wearing an ordinary exception. Implement it or remove it.
Sync-over-async (deadlock risk) through `.Result` BTDB/ODBLayer/FindUnusedKeysVisitor.cs:49— Reading `.Result` of a task that has not completed blocks this thread until it does — the same block as `.Wait()`: under a synchronization context (Blazor, a UI thread, classic ASP.NET) it deadlocks, and on the thread pool it parks a thread for as long as the work runs. `await` the task instead (make the caller `async`); where a synchronous entry point must stay, keep the block in ONE documented bridge with a timeout.
Sync-over-async (deadlock risk) through `.Result` BTDB/ODBLayer/FindUnusedKeysVisitor.cs:66— Reading `.Result` of a task that has not completed blocks this thread until it does — the same block as `.Wait()`: under a synchronization context (Blazor, a UI thread, classic ASP.NET) it deadlocks, and on the thread pool it parks a thread for as long as the work runs. `await` the task instead (make the caller `async`); where a synchronous entry point must stay, keep the block in ONE documented bridge with a timeout.
Sync-over-async (deadlock risk) through `.Result` BTDB.Replication/EventLog/EventLogService.cs:243— Reading `.Result` of a task that has not completed blocks this thread until it does — the same block as `.Wait()`: under a synchronization context (Blazor, a UI thread, classic ASP.NET) it deadlocks, and on the thread pool it parks a thread for as long as the work runs. `await` the task instead (make the caller `async`); where a synchronous entry point must stay, keep the block in ONE documented bridge with a timeout.
Sync-over-async (deadlock risk) through `.Result` BTDB.Replication/ReplicationNodeCoordinator.cs:359— Reading `.Result` of a task that has not completed blocks this thread until it does — the same block as `.Wait()`: under a synchronization context (Blazor, a UI thread, classic ASP.NET) it deadlocks, and on the thread pool it parks a thread for as long as the work runs. `await` the task instead (make the caller `async`); where a synchronous entry point must stay, keep the block in ONE documented bridge with a timeout.
Sync-over-async (deadlock risk) through `.Result` BTDB.Replication/ReplicationNodeCoordinator.cs:380— Reading `.Result` of a task that has not completed blocks this thread until it does — the same block as `.Wait()`: under a synchronization context (Blazor, a UI thread, classic ASP.NET) it deadlocks, and on the thread pool it parks a thread for as long as the work runs. `await` the task instead (make the caller `async`); where a synchronous entry point must stay, keep the block in ONE documented bridge with a timeout.
X18 · Disposal-pattern correctness· Owned disposable field overwritten without releasing the previous instance · ×5
Owned disposable field overwritten without releasing the previous instance BTDB/KVDBLayer/Implementation/BTreeKeyValueDB.cs:339— `_nextRoot` is a `IRootNode` this type creates itself, and here (line 339) a new instance is written over it — but the overwrite runs once per loop iteration, so every iteration after the first replaces the previous one, and nothing earlier in `LoadInfoAboutFiles` disposes, closes, saves or hands on the instance being replaced. The assignment makes it unreachable while it still holds what it holds (a timer that keeps firing, a callback registered on a longer-lived token, a socket, a handle), and no later `Dispose` can reach it: the type's own disposal releases only the CURRENT instance. The cost accumulates once per overwrite. Release the previous instance first (`_nextRoot?.Dispose();` before the assignment), or swap it out with `Interlocked.Exchange` and dispose what comes back.
Owned disposable field overwritten without releasing the previous instance BTDB/KVDBLayer/Implementation/BTreeKeyValueDB.cs:503— `_nextRoot` is a `IRootNode` this type creates itself, and here (line 503) a new instance is written over it — but the overwrite runs once per loop iteration, so every iteration after the first replaces the previous one, and nothing earlier in `LoadInfoAboutFilesAsync` disposes, closes, saves or hands on the instance being replaced. The assignment makes it unreachable while it still holds what it holds (a timer that keeps firing, a callback registered on a longer-lived token, a socket, a handle), and no later `Dispose` can reach it: the type's own disposal releases only the CURRENT instance. The cost accumulates once per overwrite. Release the previous instance first (`_nextRoot?.Dispose();` before the assignment), or swap it out with `Interlocked.Exchange` and dispose what comes back.
Owned disposable field overwritten without releasing the previous instance BTDB/KVDBLayer/Implementation/CompactorScheduler.cs:71— `_cancellationSource` is a `CancellationTokenSource` this type creates itself, and here (line 71) a new instance is written over it — but `RemoveCompactAction` itself reads through `_cancellationSource` before replacing it, so it expects an instance to be there, and nothing earlier in `RemoveCompactAction` disposes, closes, saves or hands on the instance being replaced. The assignment makes it unreachable while it still holds what it holds (a timer that keeps firing, a callback registered on a longer-lived token, a socket, a handle), and no later `Dispose` can reach it: the type's own disposal releases only the CURRENT instance. The cost accumulates once per overwrite. Release the previous instance first (`_cancellationSource?.Dispose();` before the assignment), or swap it out with `Interlocked.Exchange` and dispose what comes back.
Owned disposable field overwritten without releasing the previous instance DBBenchmark/BTDBTimeTests.cs:215— `_fileCollection` is a `IFileCollection` this type creates itself, and here (line 215) a new instance is written over it — but `BtdbTimeTests` creates `_fileCollection` when it is constructed, so every later call finds an instance there, and nothing earlier in `CreateTestFileCollection` disposes, closes, saves or hands on the instance being replaced. The assignment makes it unreachable while it still holds what it holds (a timer that keeps firing, a callback registered on a longer-lived token, a socket, a handle), and no later `Dispose` can reach it: the type's own disposal releases only the CURRENT instance. The cost accumulates once per overwrite. Release the previous instance first (`_fileCollection?.Dispose();` before the assignment), or swap it out with `Interlocked.Exchange` and dispose what comes back.
Owned disposable field overwritten without releasing the previous instance BTDB.Replication/EventLog/EventLogService.cs:512— `_mergeCancellation` is a `CancellationTokenSource` this type creates itself, and here (line 512) a new instance is written over it — but `Attach` itself reads through `_mergeCancellation` before replacing it, so it expects an instance to be there, and nothing earlier in `Attach` disposes, closes, saves or hands on the instance being replaced. The assignment makes it unreachable while it still holds what it holds (a timer that keeps firing, a callback registered on a longer-lived token, a socket, a handle), and no later `Dispose` can reach it: the type's own disposal releases only the CURRENT instance. The cost accumulates once per overwrite. Release the previous instance first (`_mergeCancellation?.Dispose();` before the assignment), or swap it out with `Interlocked.Exchange` and dispose what comes back.
Stateful shared instance: RefDictionary BTDB/Collections/RefDictionary.cs:27— `RefDictionary` is not registered, but the singleton `ContainerImpl` creates it and keeps it in `_scopedInstances`, so one instance outlives every request and is shared by every caller that reaches it — and it mutates instance state outside any lock (_count, _freeList, _buckets, _entries; e.g. `_count` at line 188).
Stateful shared instance: CReg BTDB/IOC/CReg.cs:6— `CReg` is not registered, but the singleton `ContainerImpl` creates it and keeps it in `Registrations`, so one instance outlives every request and is shared by every caller that reaches it — and it mutates instance state outside any lock (Factory, Lifetime, SingletonValue, ScopedId, DefaultRegistration, IsSingletonSafe; e.g. `Factory` at line 21).
Stateful shared instance: DefaultTypeConverterFactory BTDB/Serialization/DefaultTypeConverterFactory.cs:13— `DefaultTypeConverterFactory` keeps one instance of itself in the static `Instance`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (_converters; e.g. `_converters` at line 1335).
Stateful shared instance: SpanByteNoRemoveDictionary BTDB/Collections/SpanByteNoRemoveDictionary.cs:20— `SpanByteNoRemoveDictionary` is not registered, but `ReflectionMetadata` creates it and keeps it in the static `NameToMetadata`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (_freeList, _bytes, _bytesUsed, _buckets, _count, _entries; e.g. `_freeList` at line 226).
AX2 · Stateful singletons· Process-global static state · ×4
Process-global static state: CompactorScheduler BTDB/KVDBLayer/Implementation/CompactorScheduler.cs:8— `CompactorScheduler` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_instance; e.g. `_instance` at line 40). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
Process-global static state: ODBDictionaryConfiguration BTDB/ODBLayer/ODBDictionaryConfiguration.cs:8— `ODBDictionaryConfiguration` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_instances; e.g. `_instances` at line 91). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
Process-global static state: RelationBuilder BTDB/ODBLayer/RelationBuilder.cs:29— `RelationBuilder` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_relationBuilderCache; e.g. `_relationBuilderCache` at line 62). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
Process-global static state: ReflectionMetadata BTDB/Serialization/ReflectionMetadata.cs:14— `ReflectionMetadata` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_lock; e.g. `_lock` at line 52). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
D4 · Code Duplication· Edited copy of a member (27 corresponding lines) · ×4
Edited copy of a member (27 corresponding lines) BTDB/Interpreter/Interpreter.cs:2465— BTDB/Interpreter/Interpreter.cs:2465-2491 | BTDB/Interpreter/Interpreter.cs:2519-2546 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (27 corresponding lines) BTDB/KVDBLayer/Implementation/BTreeKeyValueDBCursor.cs:361— BTDB/KVDBLayer/Implementation/BTreeKeyValueDBCursor.cs:361-387 | BTDB/KVDBLayer/Implementation/BTreeKeyValueDBCursor.cs:390-416 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (27 corresponding lines) BTDB/ODBLayer/ODBDictionaryFieldHandler.cs:368— BTDB/ODBLayer/ODBDictionaryFieldHandler.cs:368-394 | BTDB/ODBLayer/ODBSetFieldHandler.cs:235-261 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (27 corresponding lines) BTDB/IL/ILGenExtensions.cs:176— BTDB/IL/ILGenExtensions.cs:176-202 | BTDB/IL/ILGenExtensions.cs:211-237 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (34 corresponding lines) · ×4
Edited copy of a member (34 corresponding lines) BTDB/ODBLayer/ODBIterator.cs:170— BTDB/ODBLayer/ODBIterator.cs:170-203 | BTDB/ODBLayer/ODBIterator.cs:206-241 — These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (34 corresponding lines) BTDB/Bon/Bon.cs:679— BTDB/Bon/Bon.cs:679-720 | BTDB/Bon/Bon.cs:741-774 — These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (34 corresponding lines) ODbDump/TrlDump/TrlFileReader.cs:159— ODbDump/TrlDump/TrlFileReader.cs:159-194 | ODbDump/TrlDump/TrlFileReader.cs:210-243 — These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (34 corresponding lines) BTDB/IOC/MultiRegistration.cs:78— BTDB/IOC/MultiRegistration.cs:78-111 | BTDB/IOC/MultiRegistration.cs:114-147 — These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (17 corresponding lines) · ×4
Edited copy of a member (17 corresponding lines) BTDB.Replication.Azure/AzureEventLogStorage.cs:111— BTDB.Replication.Azure/AzureEventLogStorage.cs:111-127 | BTDB.Replication.Azure/AzureReplicationStorage.cs:103-119 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) BTDB/IL/Caching/CachingILDynamicMethod.cs:31— BTDB/IL/Caching/CachingILDynamicMethod.cs:31-47 | BTDB/IL/Caching/CachingILDynamicMethodWithThis.cs:37-54 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) BTDB/Collections/LruCache.cs:384— BTDB/Collections/LruCache.cs:384-400 | BTDB/Collections/RefDictionary.cs:449-465 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) BTDB/Buffer/RoaringBitmaps.cs:167— BTDB/Buffer/RoaringBitmaps.cs:167-183 | BTDB/Buffer/RoaringBitmaps.cs:201-217 — 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.
Duplicated block (12 lines × 3) BTDB/BTreeLib/Cursor12.cs:229— BTDB/BTreeLib/Cursor12.cs:229-240 | BTDB/BTreeLib/Cursor12.cs:268-279 | BTDB/BTreeLib/Cursor12.cs:307-318 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/BTreeLib/Cursor12.cs:229` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note first that the copies are not typed on the same thing: the declarations holding them bind `buffer` to `ref Memory<byte>` in one and `scoped ref Span<byte>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (12 lines × 3) BTDB/BTreeLib/BTreeImpl12.cs:2020— BTDB/BTreeLib/BTreeImpl12.cs:2020-2032 | BTDB/BTreeLib/BTreeImpl12.cs:2061-2072 | BTDB/BTreeLib/BTreeImpl12.cs:2117-2128 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/BTreeLib/BTreeImpl12.cs:2020` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (12 lines × 3) BTDB/ODBLayer/RelationInfo.cs:324— BTDB/ODBLayer/RelationInfo.cs:324-335 | BTDB/ODBLayer/RelationInfo.cs:590-601 | BTDB/ODBLayer/TableInfo.cs:635-646 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (12 lines × 3) BTDB/StreamLayer/MemWriter.cs:350— BTDB/StreamLayer/MemWriter.cs:350-361 | BTDB/StreamLayer/MemWriter.cs:410-421 | BTDB/StreamLayer/MemWriter.cs:425-436 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Note first that the copies are not typed on the same thing: the declarations holding them bind `value` to `ushort` in one and `uint` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (10 lines × 3) BTDB/EventStoreLayer/ListTypeDescriptor.cs:310— BTDB/EventStoreLayer/ListTypeDescriptor.cs:310-319 | BTDB/EventStoreLayer/ListTypeDescriptor.cs:326-335 | BTDB/EventStoreLayer/ListTypeDescriptor.cs:371-380 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/EventStoreLayer/ListTypeDescriptor.cs:310` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (10 lines × 3) BTDB/EventStoreLayer/ListTypeDescriptor.cs:441— BTDB/EventStoreLayer/ListTypeDescriptor.cs:441-450 | BTDB/EventStoreLayer/ListTypeDescriptor.cs:456-465 | BTDB/EventStoreLayer/ListTypeDescriptor.cs:498-507 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/EventStoreLayer/ListTypeDescriptor.cs:441` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (10 lines × 3) BTDB/BTreeLib/Cursor12.cs:191— BTDB/BTreeLib/Cursor12.cs:191-200 | BTDB/BTreeLib/Cursor12.cs:266-275 | BTDB/BTreeLib/Cursor12.cs:305-314 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/BTreeLib/Cursor12.cs:191` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (10 lines × 3) BTDB/ODBLayer/RelationBuilder.cs:848— BTDB/ODBLayer/RelationBuilder.cs:848-857 | BTDB/ODBLayer/RelationBuilder.cs:961-970 | BTDB/ODBLayer/RelationBuilder.cs:1143-1152 — 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 (8 lines × 4) BTDB/Serialization/BonSerializer.cs:410— BTDB/Serialization/BonSerializer.cs:410-417 | BTDB/Serialization/BonSerializer.cs:440-447 | BTDB/Serialization/BonSerializer.cs:472-479 | BTDB/Serialization/BonSerializer.cs:513-520 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/Serialization/BonSerializer.cs:410` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `BTDB/Serialization/BonSerializer.cs:471` calls `GetHashSetEntriesLayout` and `BTDB/Serialization/BonSerializer.cs:439` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (8 lines × 4) BTDB/ODBLayer/ODBDictionaryFieldHandler.cs:257— BTDB/ODBLayer/ODBDictionaryFieldHandler.cs:257-264 | BTDB/ODBLayer/ODBDictionaryFieldHandler.cs:280-287 | BTDB/ODBLayer/ODBSetFieldHandler.cs:128-135 | BTDB/ODBLayer/ODBSetFieldHandler.cs:151-158 — before extracting anything, compare `BTDB/ODBLayer/ODBDictionaryFieldHandler.cs` and `BTDB/ODBLayer/ODBSetFieldHandler.cs` 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. 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `BTDB/ODBLayer/ODBDictionaryFieldHandler.cs:265` calls `Do`, `Call`, `GetMethod` and `BTDB/ODBLayer/ODBDictionaryFieldHandler.cs:288` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (8 lines × 4) BTDB/BTreeLib/Cursor12.cs:180— BTDB/BTreeLib/Cursor12.cs:180-187 | BTDB/BTreeLib/Cursor12.cs:213-220 | BTDB/BTreeLib/Cursor12.cs:252-259 | BTDB/BTreeLib/Cursor12.cs:291-298 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/BTreeLib/Cursor12.cs:180` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 4) BTDB/BTreeLib/Cursor12.cs:193— BTDB/BTreeLib/Cursor12.cs:193-200 | BTDB/BTreeLib/Cursor12.cs:229-236 | BTDB/BTreeLib/Cursor12.cs:268-275 | BTDB/BTreeLib/Cursor12.cs:307-314 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/BTreeLib/Cursor12.cs:193` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Unfinished stub — throws NotImplementedException BTDB/ODBLayer/Constraint.cs:247— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException BTDB/ODBLayer/Constraint.cs:252— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException BTDB/ODBLayer/Constraint.cs:257— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException BTDB/ODBLayer/Constraint.cs:262— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Hollow method — returns a constant without doing the work BTDB/EventStoreLayer/NoCompressionStrategy.cs:8— `ShouldTryToCompress` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in.
Hollow method — returns a constant without doing the work BTDB/EventStoreLayer/NoCompressionStrategy.cs:13— `Compress` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in.
Hollow method — returns a constant without doing the work BTDB/EventStoreLayer/SkippingEventObserver.cs:5— `ObservedMetadata` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in.
Hollow method — returns a constant without doing the work BTDB/IL/Caching/CachingILDynamicType.cs:460— `GetHashCode` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in.
D4 · Code Duplication· Edited copy of a member (25 corresponding lines) · ×3
Edited copy of a member (25 corresponding lines) BTDB/BTreeLib/NodeUtils12.cs:41— BTDB/BTreeLib/NodeUtils12.cs:41-67 | BTDB/BTreeLib/NodeUtils12.cs:70-94 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (25 corresponding lines) BTDB/Bon/Bon.cs:262— BTDB/Bon/Bon.cs:262-286 | BTDB/Bon/Bon.cs:1148-1172 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (25 corresponding lines) BTDB/KVDBLayer/Implementation/BTreeKeyValueDBTransaction.cs:71— BTDB/KVDBLayer/Implementation/BTreeKeyValueDBTransaction.cs:71-100 | BTDB/KVDBLayer/MemoryImplementation/InMemoryKeyValueDBTransaction.cs:52-76 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (28 corresponding lines) · ×3
Edited copy of a member (28 corresponding lines) BTDB/Bon/Bon.cs:1198— BTDB/Bon/Bon.cs:1198-1233 | BTDB/Bon/Bon.cs:1258-1285 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (28 corresponding lines) BTDB/StreamLayer/LoggingPositionLessStream.cs:27— BTDB/StreamLayer/LoggingPositionLessStream.cs:27-54 | BTDB/StreamLayer/LoggingPositionLessStream.cs:57-91 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (28 corresponding lines) BTDB/EventStoreLayer/TypeSerializers.cs:457— BTDB/EventStoreLayer/TypeSerializers.cs:457-484 | BTDB/EventStoreLayer/TypeSerializers.cs:509-540 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (4 corresponding lines) · ×3
Edited copy of a member (4 corresponding lines) BTDB/FieldHandler/ListFieldHandler.cs:68— BTDB/FieldHandler/ListFieldHandler.cs:68-71 | BTDB/FieldHandler/ListFieldOrderedHandler.cs:69-72 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) BTDB/KVDBLayer/Implementation/FileIdAllocator.cs:13— BTDB/KVDBLayer/Implementation/FileIdAllocator.cs:13-16 | BTDB.Replication/ReplicationFileSet.Collection.cs:87-90 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) BTDB/ODBLayer/ODBDictionary.cs:164— BTDB/ODBLayer/ODBDictionary.cs:164-167 | BTDB/ODBLayer/ODBSet.cs:186-189 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (26 lines × 2) BTDB/Collections/LruCache.cs:252— BTDB/Collections/LruCache.cs:252-277 | BTDB/Collections/SpanByteLruCache.cs:273-298 — before extracting anything, compare `BTDB/Collections/LruCache.cs` and `BTDB/Collections/SpanByteLruCache.cs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 83 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/Collections/LruCache.cs:252` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (26 lines × 2) BTDB/StreamLayer/MemReader.cs:777— BTDB/StreamLayer/MemReader.cs:777-802 | BTDB/StreamLayer/MemReader.cs:863-888 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/StreamLayer/MemReader.cs:777` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (26 lines × 2) BTDB/FieldHandler/ByteArrayFieldHandler.cs:67— BTDB/FieldHandler/ByteArrayFieldHandler.cs:67-92 | BTDB/FieldHandler/ByteArrayLastFieldHandler.cs:74-99 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (11 lines × 3) BTDB/BTreeLib/BTreeImpl12.cs:81— BTDB/BTreeLib/BTreeImpl12.cs:81-91 | BTDB/BTreeLib/BTreeImpl12.cs:183-193 | BTDB/BTreeLib/BTreeImpl12.cs:200-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 (11 lines × 3) BTDB/BTreeLib/BTreeImpl12.cs:2305— BTDB/BTreeLib/BTreeImpl12.cs:2305-2315 | BTDB/BTreeLib/BTreeImpl12.cs:2358-2368 | BTDB/BTreeLib/BTreeImpl12.cs:2423-2433 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/BTreeLib/BTreeImpl12.cs:2305` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (11 lines × 3) BTDB/Interpreter/Interpreter.cs:2401— BTDB/Interpreter/Interpreter.cs:2401-2411 | BTDB/Interpreter/Interpreter.cs:2416-2426 | BTDB/Interpreter/Interpreter.cs:2437-2447 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/Interpreter/Interpreter.cs:2401` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `l` to `DateTime` in one and `DateTimeOffset` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (5 lines × 4) BTDB/Collections/Utf16Utf8Dictionary.cs:144— BTDB/Collections/Utf16Utf8Dictionary.cs:144-148 | BTDB/Collections/Utf16Utf8Dictionary.cs:185-189 | BTDB/Collections/Utf16Utf8Dictionary.cs:211-215 | BTDB/Collections/Utf16Utf8Dictionary.cs:245-249 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/Collections/Utf16Utf8Dictionary.cs:144` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 4) BTDB/Collections/Utf16Utf8Dictionary.cs:157— BTDB/Collections/Utf16Utf8Dictionary.cs:157-161 | BTDB/Collections/Utf16Utf8Dictionary.cs:198-202 | BTDB/Collections/Utf16Utf8Dictionary.cs:228-232 | BTDB/Collections/Utf16Utf8Dictionary.cs:262-266 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/Collections/Utf16Utf8Dictionary.cs:157` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 4) BTDB/EventStoreLayer/ListTypeDescriptor.cs:365— BTDB/EventStoreLayer/ListTypeDescriptor.cs:365-369 | BTDB/EventStoreLayer/ListTypeDescriptor.cs:493-497 | BTDB/FieldHandler/ListFieldHandler.cs:371-375 | BTDB/FieldHandler/ListFieldOrderedHandler.cs:322-326 — there are 4 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/EventStoreLayer/ListTypeDescriptor.cs:365` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `BTDB/EventStoreLayer/ListTypeDescriptor.cs:370` calls `WriteVUInt32` and `BTDB/EventStoreLayer/ListTypeDescriptor.cs:498` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Unfinished branch — throws a "not implemented" exception BTDB.Replication/ReplicationFileSet.Collection.cs:204— The branch `if (GetFileType(fileId) != KVFileType.TransactionLog)` throws `InvalidOperationException` while the member's other paths do the work — the branch was never written, so every input that reaches it fails at run time. Implement the branch, or reject the input where it enters with an exception that says it is not supported.
Unfinished branch — throws a "not implemented" exception BTDB/ChunkCache/DiskChunkCache.cs:72— The branch `if (keySize != 20)` throws `NotSupportedException` while the member's other paths do the work — the branch was never written, so every input that reaches it fails at run time. Implement the branch, or reject the input where it enters with an exception that says it is not supported.
Unfinished branch — throws a "not implemented" exception BTDB/ODBLayer/RelationQuery.cs:3067— The branch `if (!RelationQueryTypes.TryGetStorage(constant.Type, out var storage, out var valueType, out _))` throws `NotSupportedException` while the member's other paths do the work — the branch was never written, so every input that reaches it fails at run time. Implement the branch, or reject the input where it enters with an exception that says it is not supported.
X27 · Collection changed while being enumerated· Collection is structurally changed while it is being enumerated · ×3
Collection is structurally changed while it is being enumerated BTDB/ODBLayer/RelationQuery.cs:4926— `template._arguments` is enumerated directly, and line 4926 calls `template._arguments.Add(…)` inside the loop body — a structural change to a `List`. The next `MoveNext` throws `InvalidOperationException: Collection was modified; enumeration operation may not execute`, so every pass that reaches this call ends the loop by exception instead of by running out of items, and the remaining items are never seen.
Collection is structurally changed while it is being enumerated BTDB/ODBLayer/RelationsInfo.cs:51— `source._name2Id` is enumerated directly, and line 51 calls `source._name2Id.Add(…)` inside the loop body — a structural change to a `Dictionary`. The next `MoveNext` throws `InvalidOperationException: Collection was modified; enumeration operation may not execute`, so every pass that reaches this call ends the loop by exception instead of by running out of items, and the remaining items are never seen.
Collection is structurally changed while it is being enumerated BTDB/ODBLayer/RelationsInfo.cs:52— `source.Id2Relation` is enumerated directly, and line 52 calls `source.Id2Relation.Add(…)` inside the loop body — a structural change to a `Dictionary`. The next `MoveNext` throws `InvalidOperationException: Collection was modified; enumeration operation may not execute`, so every pass that reaches this call ends the loop by exception instead of by running out of items, and the remaining items are never seen.
X28 · Index access outside its own emptiness guard· Index access outside its own emptiness guard · ×3
Index access outside its own emptiness guard ODbDump/Program.cs:90— This access `args[2]` has no test of the length of `args` on its own path, while this method tests it for that position at line 21 (`args.Length < 1`): where that test fails, this read throws. Either the test is load-bearing and this read needs it too, or the length of `args` is fixed here and the test is dead.
Index access outside its own emptiness guard ODbDump/Program.cs:91— This access `args[2]` has no test of the length of `args` on its own path, while this method tests it for that position at line 21 (`args.Length < 1`): where that test fails, this read throws. Either the test is load-bearing and this read needs it too, or the length of `args` is fixed here and the test is dead.
Index access outside its own emptiness guard DBBenchmark/BackendActions/PlannerScaling.cs:27— This access `args[1]` has no test of the length of `args` on its own path, while this method tests it for that position at line 25 (`args.Length > 0`): where that test fails, this read throws. Either the test is load-bearing and this read needs it too, or the length of `args` is fixed here and the test is dead.
AdvancedEnumerator.AdvancedEnumerator.ctor (cyclomatic 21) BTDB/ODBLayer/ODBDictionary.cs:722— AdvancedEnumerator.AdvancedEnumerator.ctor has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
AdvancedEnumerator.AdvancedEnumerator.ctor (cyclomatic 21) BTDB/ODBLayer/ODBSet.cs:398— AdvancedEnumerator.AdvancedEnumerator.ctor has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
AdvancedEnumerator.AdvancedEnumerator.ctor (cognitive 34) BTDB/ODBLayer/ODBDictionary.cs:722— AdvancedEnumerator.AdvancedEnumerator.ctor has cognitive complexity 34 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AdvancedEnumerator.AdvancedEnumerator.ctor (cognitive 34) BTDB/ODBLayer/ODBSet.cs:398— AdvancedEnumerator.AdvancedEnumerator.ctor has cognitive complexity 34 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Change-coupling hub: ByteArrayTypeDescriptor.cs → DictionaryTypeDescriptor.cs, EnumTypeDescriptor.cs, ListTypeDescriptor.cs, ObjectTypeDescriptor.cs, SimpleTypeDescriptor.cs, TypeDescriptorExtensions.cs, TypeSerializers.cs, TypeSerializersMapping.cs BTDB/EventStoreLayer/ByteArrayTypeDescriptor.cs— `BTDB/EventStoreLayer/ByteArrayTypeDescriptor.cs` changes together with 8 other files — `BTDB/EventStoreLayer/DictionaryTypeDescriptor.cs`, `BTDB/EventStoreLayer/EnumTypeDescriptor.cs`, `BTDB/EventStoreLayer/ListTypeDescriptor.cs`, `BTDB/EventStoreLayer/ObjectTypeDescriptor.cs`, `BTDB/EventStoreLayer/SimpleTypeDescriptor.cs`, `BTDB/EventStoreLayer/TypeDescriptorExtensions.cs`, `BTDB/EventStoreLayer/TypeSerializers.cs`, `BTDB/EventStoreLayer/TypeSerializersMapping.cs` — none of which declares a dependency on it: one file is the hub of 8 separate couplings, not 8 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 8.
Change-coupling hub: ContainerImpl.cs → MultiRegistration.cs, SingleFactoryRegistration.cs, SingleRegistration.cs BTDB/IOC/ContainerImpl.cs— `BTDB/IOC/ContainerImpl.cs` changes together with 3 other files — `BTDB/IOC/MultiRegistration.cs`, `BTDB/IOC/SingleFactoryRegistration.cs`, `BTDB/IOC/SingleRegistration.cs` — none of which declares a dependency on it: one file is the hub of 3 separate couplings, not 3 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 3.
D4 · Code Duplication· Edited copy of a member (39 corresponding lines) · ×2
Edited copy of a member (39 corresponding lines) BTDB/ODBLayer/ODBIterator.cs:459— BTDB/ODBLayer/ODBIterator.cs:459-504 | BTDB/ODBLayer/ODBIterator.cs:507-545 — These two members are one piece of code written twice and then edited apart: 39 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (39 corresponding lines) BTDB/Serialization/DefaultTypeConverterFactory.cs:1202— BTDB/Serialization/DefaultTypeConverterFactory.cs:1202-1255 | BTDB/Serialization/DefaultTypeConverterFactory.cs:1258-1296 — These two members are one piece of code written twice and then edited apart: 39 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (52 corresponding lines) · ×2
Edited copy of a member (52 corresponding lines) BTDB/ODBLayer/ObjectDBTransaction.cs:611— BTDB/ODBLayer/ObjectDBTransaction.cs:611-665 | BTDB/ODBLayer/ObjectDBTransaction.cs:668-719 — These two members are one piece of code written twice and then edited apart: 52 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (52 corresponding lines) BTDB/KVDBLayer/Implementation/BTreeKeyValueDB.cs:2941— BTDB/KVDBLayer/Implementation/BTreeKeyValueDB.cs:2941-2992 | BTDB/KVDBLayer/Implementation/BTreeKeyValueDB.cs:2995-3046 — These two members are one piece of code written twice and then edited apart: 52 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (32 corresponding lines) · ×2
Edited copy of a member (32 corresponding lines) BTDB/ODBLayer/RelationQuery.cs:3098— BTDB/ODBLayer/RelationQuery.cs:3098-3133 | BTDB/ODBLayer/RelationQuery.cs:3151-3182 — These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (32 corresponding lines) BTDB/ODBLayer/RelationInfo.cs:2134— BTDB/ODBLayer/RelationInfo.cs:2134-2165 | BTDB/ODBLayer/RelationInfo.cs:2681-2715 — These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (42 corresponding lines) · ×2
Edited copy of a member (42 corresponding lines) BTDB/ODBLayer/RelationDBManipulator.cs:737— BTDB/ODBLayer/RelationDBManipulator.cs:737-785 | BTDB/ODBLayer/RelationDBManipulator.cs:789-830 — These two members are one piece of code written twice and then edited apart: 42 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (42 corresponding lines) BTDB/KVDBLayer/Helpers/KeyValueDBExportImporter.cs:119— BTDB/KVDBLayer/Helpers/KeyValueDBExportImporter.cs:119-162 | BTDB/KVDBLayer/Helpers/KeyValueDBExportImporter.cs:170-211 — These two members are one piece of code written twice and then edited apart: 42 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (38 corresponding lines) · ×2
Edited copy of a member (38 corresponding lines) BTDB/BTreeLib/BTreeImpl12.cs:2050— BTDB/BTreeLib/BTreeImpl12.cs:2050-2087 | BTDB/BTreeLib/BTreeImpl12.cs:2095-2149 — These two members are one piece of code written twice and then edited apart: 38 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (38 corresponding lines) BTDB/KVDBLayer/Implementation/BTreeKeyValueDBCursor.cs:92— BTDB/KVDBLayer/Implementation/BTreeKeyValueDBCursor.cs:92-129 | BTDB/KVDBLayer/MemoryImplementation/InMemoryKeyValueDBCursor.cs:75-112 — These two members are one piece of code written twice and then edited apart: 38 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (49 corresponding lines) · ×2
Edited copy of a member (49 corresponding lines) BTDB/ODBLayer/RelationDBManipulator.cs:1129— BTDB/ODBLayer/RelationDBManipulator.cs:1129-1177 | BTDB/ODBLayer/RelationDBManipulator.cs:1182-1230 — These two members are one piece of code written twice and then edited apart: 49 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (49 corresponding lines) BTDB/FieldHandler/DictionaryFieldHandler.cs:247— BTDB/FieldHandler/DictionaryFieldHandler.cs:247-310 | BTDB/FieldHandler/ListFieldHandler.cs:230-278 — These two members are one piece of code written twice and then edited apart: 49 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (33 corresponding lines) · ×2
Edited copy of a member (33 corresponding lines) BTDB/KVDBLayer/Implementation/BTreeKeyValueDBCursor.cs:499— BTDB/KVDBLayer/Implementation/BTreeKeyValueDBCursor.cs:499-541 | BTDB/KVDBLayer/MemoryImplementation/InMemoryKeyValueDBCursor.cs:495-527 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (33 corresponding lines) BTDB/ODBLayer/RelationBuilder.cs:2045— BTDB/ODBLayer/RelationBuilder.cs:2045-2077 | BTDB.SourceGenerator/Main.cs:1496-1530 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (24 corresponding lines) · ×2
Edited copy of a member (24 corresponding lines) BTDB/StreamLayer/MemWriter.cs:745— BTDB/StreamLayer/MemWriter.cs:745-776 | BTDB/StreamLayer/MemWriter.cs:789-812 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (24 corresponding lines) BTDB/IOC/ContainerImpl.cs:206— BTDB/IOC/ContainerImpl.cs:206-230 | BTDB/IOC/ContainerImpl.cs:233-256 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 12+ corresponding lines) · ×2
Edited copies of one member (3 members, 12+ corresponding lines) BTDB/EventStore2Layer/EventSerializer.cs:841— BTDB/EventStore2Layer/EventSerializer.cs:841-852 | BTDB/ODBLayer/DBWriterCtx.cs:67-79 | BTDB/ODBLayer/DBWriterCtx.cs:83-95 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 12+ corresponding lines) BTDB/FieldHandler/DictionaryFieldHandler.cs:24— BTDB/FieldHandler/DictionaryFieldHandler.cs:24-36 | BTDB/ODBLayer/ODBDictionaryFieldHandler.cs:29-43 | BTDB/ODBLayer/ODBSetFieldHandler.cs:24-35 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 10+ corresponding lines) · ×2
Edited copies of one member (3 members, 10+ corresponding lines) BTDB.Replication.Azure/AzureEventLogStorage.cs:85— BTDB.Replication.Azure/AzureEventLogStorage.cs:85-95 | BTDB.Replication.Azure/AzureEventLogStorage.cs:98-107 | BTDB.Replication.Azure/AzureReplicationStorage.cs:88-99 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 10+ corresponding lines) BTDB/FieldHandler/DictionaryFieldHandler.cs:313— BTDB/FieldHandler/DictionaryFieldHandler.cs:313-323 | BTDB/FieldHandler/DictionaryFieldHandler.cs:444-454 | BTDB/FieldHandler/ListFieldHandler.cs:492-501 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 11+ corresponding lines) · ×2
Edited copies of one member (4 members, 11+ corresponding lines) BTDB/KVDBLayer/Implementation/InMemoryFileCollection.cs:332— BTDB/KVDBLayer/Implementation/InMemoryFileCollection.cs:332-342 | BTDB/KVDBLayer/Implementation/InMemoryReplicationFileStorage.cs:336-346 | BTDB/KVDBLayer/Implementation/OnDiskFileCollection.cs:301-314 | BTDB/KVDBLayer/Implementation/OnDiskMemoryMappedFileCollection.cs:272-286 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
Edited copies of one member (4 members, 11+ corresponding lines) BTDB/EventStoreLayer/EncryptedStringDescriptor.cs:74— BTDB/EventStoreLayer/EncryptedStringDescriptor.cs:74-84 | BTDB/EventStoreLayer/EncryptedStringDescriptor.cs:92-102 | BTDB/FieldHandler/EncryptedStringHandler.cs:55-65 | BTDB/FieldHandler/EncryptedStringHandler.cs:73-83 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 13+ corresponding lines) · ×2
Edited copies of one member (3 members, 13+ corresponding lines) BTDB/KVDBLayer/Implementation/InMemoryFileCollection.cs:351— BTDB/KVDBLayer/Implementation/InMemoryFileCollection.cs:351-363 | BTDB/KVDBLayer/Implementation/OnDiskFileCollection.cs:339-352 | BTDB/KVDBLayer/Implementation/OnDiskMemoryMappedFileCollection.cs:310-323 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 13+ corresponding lines) BTDB/KVDBLayer/Implementation/BTreeKeyValueDB.cs:1795— BTDB/KVDBLayer/Implementation/BTreeKeyValueDB.cs:1795-1807 | BTDB/KVDBLayer/Interface/IKeyValueDB.cs:27-39 | BTDB/ODBLayer/IObjectDB.cs:28-40 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (5 members, 12+ corresponding lines) · ×2
Edited copies of one member (5 members, 12+ corresponding lines) BTDB/StreamLayer/MemReader.cs:216— BTDB/StreamLayer/MemReader.cs:216-227 | BTDB/StreamLayer/MemReader.cs:251-262 | BTDB/StreamLayer/MemReader.cs:266-277 | BTDB/StreamLayer/MemReader.cs:301-312 | BTDB/StreamLayer/MemReader.cs:316-327 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
Edited copies of one member (5 members, 12+ corresponding lines) BTDB/StreamLayer/MemWriter.cs:320— BTDB/StreamLayer/MemWriter.cs:320-331 | BTDB/StreamLayer/MemWriter.cs:335-346 | BTDB/StreamLayer/MemWriter.cs:365-376 | BTDB/StreamLayer/MemWriter.cs:380-391 | BTDB/StreamLayer/MemWriter.cs:395-406 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 6+ corresponding lines) · ×2
Edited copies of one member (3 members, 6+ corresponding lines) BTDB/FieldHandler/EncryptedStringHandler.cs:145— BTDB/FieldHandler/EncryptedStringHandler.cs:145-150 | BTDB/FieldHandler/OrderedEncryptedStringHandler.cs:142-147 | BTDB/FieldHandler/SimpleFieldHandlerBase.cs:161-166 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 6+ corresponding lines) BTDB/EventStoreLayer/EncryptedStringDescriptor.cs:138— BTDB/EventStoreLayer/EncryptedStringDescriptor.cs:138-144 | BTDB/FieldHandler/EncryptedStringHandler.cs:47-52 | BTDB/FieldHandler/OrderedEncryptedStringHandler.cs:47-52 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Duplicated block (37 lines × 2) BTDB/BTreeLib/BTreeImpl12.cs:1631— BTDB/BTreeLib/BTreeImpl12.cs:1631-1667 | BTDB/BTreeLib/BTreeImpl12.cs:1685-1721 — both copies are in the same file, so extract the 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 (37 lines × 2) BTDB/StreamLayer/MemReader.cs:736— BTDB/StreamLayer/MemReader.cs:736-772 | BTDB/StreamLayer/MemReader.cs:822-858 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/StreamLayer/MemReader.cs:736` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (35 lines × 2) BTDB/ODBLayer/RelationDBManipulator.cs:1306— BTDB/ODBLayer/RelationDBManipulator.cs:1306-1340 | BTDB/ODBLayer/RelationDBManipulator.cs:1574-1608 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/ODBLayer/RelationDBManipulator.cs:1306` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (35 lines × 2) BTDB/Collections/LruCache.cs:149— BTDB/Collections/LruCache.cs:149-183 | BTDB/Collections/RefDictionary.cs:206-240 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/Collections/LruCache.cs:149` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (32 lines × 2) BTDB/ODBLayer/RelationDBManipulator.cs:566— BTDB/ODBLayer/RelationDBManipulator.cs:566-597 | BTDB/ODBLayer/RelationDBManipulator.cs:672-703 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note first that the copies are not typed on the same thing: the declarations holding them bind `keyBytes` to `scoped in ReadOnlySpan<byte>` in one and `in ReadOnlySpan<byte>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (32 lines × 2) BTDB/KVDBLayer/Implementation/InMemoryFileCollection.cs:37— BTDB/KVDBLayer/Implementation/InMemoryFileCollection.cs:37-68 | BTDB/KVDBLayer/Implementation/InMemoryReplicationFileStorage.cs:35-66 — before extracting anything, compare `BTDB/KVDBLayer/Implementation/InMemoryFileCollection.cs` and `BTDB/KVDBLayer/Implementation/InMemoryReplicationFileStorage.cs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 162 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (14 lines × 3) BTDB/Serialization/DefaultTypeConverterFactory.cs:973— BTDB/Serialization/DefaultTypeConverterFactory.cs:973-986 | BTDB/Serialization/DefaultTypeConverterFactory.cs:1027-1040 | BTDB/Serialization/DefaultTypeConverterFactory.cs:1086-1099 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/Serialization/DefaultTypeConverterFactory.cs:973` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 3) ODbDump/Program.cs:48— ODbDump/Program.cs:48-61 | ODbDump/Program.cs:97-110 | ODbDump/Program.cs:186-199 — 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 (15–16 lines × 2) BTDB/EventStoreLayer/NullableTypeDescriptor.cs:363— BTDB/EventStoreLayer/NullableTypeDescriptor.cs:363-378 | BTDB/FieldHandler/NullableFieldHandler.cs:140-154 — 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–16 lines × 2) BTDB/ODBLayer/RelationBuilder.cs:984— BTDB/ODBLayer/RelationBuilder.cs:984-999 | BTDB/ODBLayer/RelationBuilder.cs:1208-1222 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/ODBLayer/RelationBuilder.cs:984` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (14–15 lines × 2) BTDB/EventStore2Layer/EventDeserializer.cs:57— BTDB/EventStore2Layer/EventDeserializer.cs:57-71 | BTDB/EventStore2Layer/EventSerializer.cs:67-80 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/EventStore2Layer/EventDeserializer.cs:57` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14–15 lines × 2) BTDB/ODBLayer/RelationBuilder.cs:1282— BTDB/ODBLayer/RelationBuilder.cs:1282-1296 | BTDB/ODBLayer/RelationBuilder.cs:1317-1330 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/ODBLayer/RelationBuilder.cs:1282` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (13–15 lines × 2) BTDB/IOC/ContainerImpl.cs:471— BTDB/IOC/ContainerImpl.cs:471-483 | BTDB/IOC/ContainerImpl.cs:493-507 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/IOC/ContainerImpl.cs:471` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `BTDB/IOC/ContainerImpl.cs:493` calls `VerifyNonValueType` and `BTDB/IOC/ContainerImpl.cs:471` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (13–15 lines × 2) DBBenchmark/EventLog/EventLogStorageScreening.cs:33— DBBenchmark/EventLog/EventLogStorageScreening.cs:33-45 | DBBenchmark/LSM/LsmStorageScreening.cs:56-70 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (12–14 lines × 2) BTDB/EventStoreLayer/DictionaryTypeDescriptor.cs:301— BTDB/EventStoreLayer/DictionaryTypeDescriptor.cs:301-312 | BTDB/EventStoreLayer/ListTypeDescriptor.cs:345-358 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/EventStoreLayer/DictionaryTypeDescriptor.cs:301` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12–14 lines × 2) BTDB/EventStoreLayer/DictionaryTypeDescriptor.cs:374— BTDB/EventStoreLayer/DictionaryTypeDescriptor.cs:374-385 | BTDB/EventStoreLayer/ListTypeDescriptor.cs:473-486 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/EventStoreLayer/DictionaryTypeDescriptor.cs:374` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (8 lines × 3) BTDB/EventStoreLayer/ListTypeDescriptor.cs:362— BTDB/EventStoreLayer/ListTypeDescriptor.cs:362-369 | BTDB/EventStoreLayer/ListTypeDescriptor.cs:490-497 | BTDB/FieldHandler/ListFieldHandler.cs:368-375 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/EventStoreLayer/ListTypeDescriptor.cs:362` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `BTDB/EventStoreLayer/ListTypeDescriptor.cs:370` calls `WriteVUInt32` and `BTDB/EventStoreLayer/ListTypeDescriptor.cs:498` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (8 lines × 3) BTDB/Buffer/PackUnpack.cs:424— BTDB/Buffer/PackUnpack.cs:424-431 | BTDB/Buffer/PackUnpack.cs:440-447 | BTDB/Buffer/PackUnpack.cs:458-465 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/Buffer/PackUnpack.cs:424` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (9 lines × 4) BTDB/Buffer/RoaringBitmaps.cs:501— BTDB/Buffer/RoaringBitmaps.cs:501-509 | BTDB/Buffer/RoaringBitmaps.cs:524-532 | BTDB/Buffer/RoaringBitmaps.cs:547-555 | BTDB/Buffer/RoaringBitmaps.cs:570-578 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/Buffer/RoaringBitmaps.cs:501` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 4) BTDB/Collections/RefDictionary.cs:245— BTDB/Collections/RefDictionary.cs:245-253 | BTDB/Collections/RefDictionary.cs:270-278 | BTDB/Collections/RefDictionary.cs:301-309 | BTDB/Collections/RefDictionary.cs:326-334 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/Collections/RefDictionary.cs:245` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10–11 lines × 2) BTDB/ODBLayer/RelationBuilder.cs:1185— BTDB/ODBLayer/RelationBuilder.cs:1185-1195 | BTDB/ODBLayer/RelationBuilder.cs:1352-1361 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/ODBLayer/RelationBuilder.cs:1352` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10–11 lines × 2) BTDB.Replication.Azure/AzureReplicationStorage.cs:225— BTDB.Replication.Azure/AzureReplicationStorage.cs:225-234 | BTDB.Replication/FileSystem/FileSystemReplicationStorage.cs:130-140 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (7 lines × 4) BTDB/ODBLayer/RelationDBManipulator.cs:151— BTDB/ODBLayer/RelationDBManipulator.cs:151-157 | BTDB/ODBLayer/RelationDBManipulator.cs:279-285 | BTDB/ODBLayer/RelationDBManipulator.cs:346-352 | BTDB/ODBLayer/RelationDBManipulator.cs:385-391 — 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 (7 lines × 4) BTDB/EventStoreLayer/ObjectTypeDescriptor.cs:334— BTDB/EventStoreLayer/ObjectTypeDescriptor.cs:334-340 | BTDB/ODBLayer/RelationInfo.cs:372-378 | BTDB/ODBLayer/RelationInfo.cs:638-644 | BTDB/ODBLayer/TableInfo.cs:684-690 — there are 4 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart.
Blocking `File.ReadAllLines` inside an `async` method Releaser/Releaser/Program.cs:136— `File.ReadAllLines` blocks the thread on I/O while `File.ReadAllLinesAsync` exists to wait without one — inside a method that is already `async`, await the twin.
Blocking `File.ReadAllLines` inside an `async` method Releaser/Releaser/Program.cs:158— `File.ReadAllLines` blocks the thread on I/O while `File.ReadAllLinesAsync` exists to wait without one — inside a method that is already `async`, await the twin.
X18 · Disposal-pattern correctness· Disposable created and abandoned in the method that made it · ×2
Disposable created and abandoned in the method that made it DBBenchmark/LightingDbTimeTests.cs:166— `cursor` is a `LightningCursor`, which implements `IDisposable`, and it is created here (line 166). Every use of it in `ReadAll` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var cursor = …;`), which releases it at the end of the scope on every path including a throw.
Disposable created and abandoned in the method that made it EventLogBench/Program.cs:73— `gate` is a `SemaphoreSlim`, which implements `IDisposable`, and it is created here (line 73). Every use of it in `RunNodeAsync` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var gate = …;`), which releases it at the end of the scope on every path including a throw.
Collection crosses a callback boundary unsynchronised BTDB.Replication/ReplicationNodeCoordinator.cs:794— `ReplicationNodeCoordinator._publicationWatchdogs` is a `List<…>` that a `CancellationToken.Register(…)` callback writes (`Clear` on line 794) and `ObservePublication` reads (line 732). The runtime runs that callback on a thread the rest of the type does not own — a pool or I/O thread for a watcher, timer or process event, the completing thread for a continuation, the cancelling thread for a token registration, the pool for a `Progress<T>` made without a UI context — while `ObservePublication` runs on whichever thread calls it. `List<…>` allows many readers or one writer, never both: a read that meets the write sees a torn resize, an enumeration throws `InvalidOperationException`, and two writes lose or duplicate entries. Take one `lock` over the write and every read of `_publicationWatchdogs`, use a `System.Collections.Concurrent` collection, or marshal the callback onto the reader's synchronisation context.
Collection crosses a callback boundary unsynchronised BTDB.Replication/ReplicationNodeCoordinator.cs:796— `ReplicationNodeCoordinator._maintenanceWatchdogs` is a `List<…>` that a `CancellationToken.Register(…)` callback writes (`Clear` on line 796) and `StepAsync` reads (line 316). The runtime runs that callback on a thread the rest of the type does not own — a pool or I/O thread for a watcher, timer or process event, the completing thread for a continuation, the cancelling thread for a token registration, the pool for a `Progress<T>` made without a UI context — while `StepAsync` runs on whichever thread calls it. `List<…>` allows many readers or one writer, never both: a read that meets the write sees a torn resize, an enumeration throws `InvalidOperationException`, and two writes lose or duplicate entries. Take one `lock` over the write and every read of `_maintenanceWatchdogs`, use a `System.Collections.Concurrent` collection, or marshal the callback onto the reader's synchronisation context.
X5 · Nullable reference types· Null guard scopes only part of the work it protects · ×2
Null guard scopes only part of the work it protects BTDB/ODBLayer/RelationQuery.cs:2508— This method contradicts itself about `valueFields`: line 2479 tests it for null before doing anything with it — the author's own statement that null is an input this code expects — but that `if` scopes only the block beneath it, and line 2508 then dereferences `valueFields` as `valueFields.HasValue` AFTER the block has closed, where the guard no longer applies. A null `valueFields` skips the guarded body and reaches that line anyway, throwing NullReferenceException on exactly the input the guard was written for. If the dereference belongs to the guarded work, move it inside the block; if `valueFields` truly cannot be null by then, the guard above is misleading and should go.
Null guard scopes only part of the work it protects BTDB.Replication/LeaseSessionController.cs:153— This method contradicts itself about `grant`: line 148 tests it for null before doing anything with it — the author's own statement that null is an input this code expects — but that `if` scopes only the block beneath it, and line 153 then dereferences `grant` as `grant.Handle` AFTER the block has closed, where the guard no longer applies. A null `grant` skips the guarded body and reaches that line anyway, throwing NullReferenceException on exactly the input the guard was written for. If the dereference belongs to the guarded work, move it inside the block; if `grant` truly cannot be null by then, the guard above is misleading and should go.
Interpreter.Loop (cyclomatic 214) BTDB/Interpreter/Interpreter.cs:1537— Interpreter.Loop has cyclomatic complexity 214 (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.
DefaultTypeConverterFactory.GetConverter (cyclomatic 202) BTDB/Serialization/DefaultTypeConverterFactory.cs:19— DefaultTypeConverterFactory.GetConverter has cyclomatic complexity 202 (threshold 15). Of this number, 194 points are the body's own statements and 8 belong to 6 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SourceGenerator.GenerateRelationInterfaceFactory (cyclomatic 124) BTDB.SourceGenerator/Main.cs:4570— SourceGenerator.GenerateRelationInterfaceFactory has cyclomatic complexity 124 (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.
SourceGenerator.GenerationInfoForClass (cyclomatic 109) BTDB.SourceGenerator/Main.cs:1755— SourceGenerator.GenerationInfoForClass has cyclomatic complexity 109 (threshold 15). Of this number, 57 points are the body's own statements and 52 belong to 16 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SourceGenerator.DetectErrorsInMethods (cyclomatic 106) BTDB.SourceGenerator/Main.cs:291— SourceGenerator.DetectErrorsInMethods has cyclomatic complexity 106 (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.
BonSerializerFactory.CreateDeserializerForType (cyclomatic 98) BTDB/Serialization/BonSerializer.cs:951— BonSerializerFactory.CreateDeserializerForType has cyclomatic complexity 98 (threshold 15). Of this number, 39 points are the body's own statements and 59 belong to 25 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SourceGenerator.GenerateClassFactory (cyclomatic 89) BTDB.SourceGenerator/Main.cs:3536— SourceGenerator.GenerateClassFactory has cyclomatic complexity 89 (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.
BTreeKeyValueDB.LoadTransactionLogCore (cyclomatic 79) BTDB/KVDBLayer/Implementation/BTreeKeyValueDB.cs:1133— BTreeKeyValueDB.LoadTransactionLogCore has cyclomatic complexity 79 (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.
InterpreterBuilder.DumpAsm (cyclomatic 75) BTDB/Interpreter/Interpreter.cs:837— InterpreterBuilder.DumpAsm has cyclomatic complexity 75 (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: Interpreter.RunCodeOp (cyclomatic 113) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
EventLogStorageScreening.RunAsync (cyclomatic 68) DBBenchmark/EventLog/EventLogStorageScreening.cs:23— EventLogStorageScreening.RunAsync has cyclomatic complexity 68 (threshold 15). Of this number, 34 points are the body's own statements and 34 belong to 9 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Program.Main (cyclomatic 64) ODbDump/Program.cs:19— Program.Main has cyclomatic complexity 64 (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. Note what this body is, though: it works in explicit hardware vector and instruction-set types. A kernel divided across a call boundary passes its vectors between the parts and depends on the runtime putting them back together, so the division can cost more than the complexity it removes. The measurement stands — a hot path is not a licence to be unreadable — but the move that pays here is to lift the COLD parts out first (argument validation, fallback and error paths, one-off setup) and leave the kernel whole. Where the kernel itself has to be divided, ask for the extracted parts to be inlined as well, and measure the result rather than assuming the division is free.
ODBIterator.IterateHandler (cyclomatic 63) BTDB/ODBLayer/ODBIterator.cs:571— ODBIterator.IterateHandler has cyclomatic complexity 63 (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.
Constraint.Exact (cyclomatic 61) BTDB/ODBLayer/Constraint.cs:275— Constraint.Exact has cyclomatic complexity 61 (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.
ReplicationNodeCoordinator.StepAsync (cyclomatic 58) BTDB.Replication/ReplicationNodeCoordinator.cs:244— ReplicationNodeCoordinator.StepAsync has cyclomatic complexity 58 (threshold 15). Of this number, 57 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
BonSerializerFactory.CreateSerializerForType (cyclomatic 56) BTDB/Serialization/BonSerializer.cs:187— BonSerializerFactory.CreateSerializerForType has cyclomatic complexity 56 (threshold 15). Of this number, 35 points are the body's own statements and 21 belong to 9 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SourceGenerator.Initialize (cyclomatic 54) BTDB.SourceGenerator/Main.cs:25— SourceGenerator.Initialize has cyclomatic complexity 54 (threshold 15). Most of this is not in the body itself: 1 of the 54 points is its own statement and the rest belongs to 8 function literals inside it that branch (lines 30, 97, 141, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
LsmStorageScreening.RunAsync (cyclomatic 49) DBBenchmark/LSM/LsmStorageScreening.cs:30— LsmStorageScreening.RunAsync has cyclomatic complexity 49 (threshold 15). Of this number, 25 points are the body's own statements and 24 belong to 13 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
RelationQueryCompiler.Simplify (cyclomatic 48) BTDB/ODBLayer/RelationQuery.cs:3702— RelationQueryCompiler.Simplify has cyclomatic complexity 48 (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.
ItemLoaderInfo.CreateLoader (cyclomatic 47) BTDB/ODBLayer/RelationInfo.cs:542— ItemLoaderInfo.CreateLoader has cyclomatic complexity 47 (threshold 15). Of this number, 45 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SourceGenerator.AppendWriteOrderableValue (cyclomatic 46) BTDB.SourceGenerator/Main.cs:5868— SourceGenerator.AppendWriteOrderableValue has cyclomatic complexity 46 (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.
RelationConstraintEnumerator.FindNextKey (cyclomatic 44) BTDB/ODBLayer/RelationEnumerator.cs:102— RelationConstraintEnumerator.FindNextKey has cyclomatic complexity 44 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
EventPublisher.RunAsync (cyclomatic 44) BTDB.Replication.EventSourcing/EventPublisher.cs:268— EventPublisher.RunAsync has cyclomatic complexity 44 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
BTreeImpl12.EraseFromBranch (cyclomatic 43) BTDB/BTreeLib/BTreeImpl12.cs:670— BTreeImpl12.EraseFromBranch has cyclomatic complexity 43 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
RelationConstraintReverseEnumerator.FindPreviousKey (cyclomatic 43) BTDB/ODBLayer/RelationConstraintReverseEnumerator.cs:39— RelationConstraintReverseEnumerator.FindPreviousKey has cyclomatic complexity 43 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
RelationInfo.CreateBytesToSKSaver (cyclomatic 43) BTDB/ODBLayer/RelationInfo.cs:1573— RelationInfo.CreateBytesToSKSaver has cyclomatic complexity 43 (threshold 15). Of this number, 41 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ActionPlanner.Exchange (cyclomatic 43) BTDB.BackendActions/ActionPlanner.cs:432— ActionPlanner.Exchange has cyclomatic complexity 43 (threshold 15). Of this number, 41 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SourceGenerator.AppendWriteValue (cyclomatic 42) BTDB.SourceGenerator/Main.cs:5727— SourceGenerator.AppendWriteValue has cyclomatic complexity 42 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
Program.Interactive (cyclomatic 41) ODbDump/Program.cs:710— Program.Interactive has cyclomatic complexity 41 (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.
BTreeKeyValueDB.LoadKeyIndex (cyclomatic 40) BTDB/KVDBLayer/Implementation/BTreeKeyValueDB.cs:818— BTreeKeyValueDB.LoadKeyIndex has cyclomatic complexity 40 (threshold 15). Most of this is not in the body itself: 9 of the 40 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 939, 867). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
TableInfo.CreateLoader (cyclomatic 37) BTDB/ODBLayer/TableInfo.cs:600— TableInfo.CreateLoader has cyclomatic complexity 37 (threshold 15). Of this number, 35 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ContainerImpl.CreateFactory (cyclomatic 36) BTDB/IOC/ContainerImpl.cs:338— ContainerImpl.CreateFactory has cyclomatic complexity 36 (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.
RelationQuery.ExecuteProjected (cyclomatic 36) BTDB/ODBLayer/RelationQuery.cs:636— RelationQuery.ExecuteProjected has cyclomatic complexity 36 (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.
ContainerImpl.CreateFactoryFromRegistration (cyclomatic 35) BTDB/IOC/ContainerImpl.cs:590— ContainerImpl.CreateFactoryFromRegistration has cyclomatic complexity 35 (threshold 15). Of this number, 20 points are the body's own statements and 15 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
RelationQueryCompiler.BuildProgram (cyclomatic 35) BTDB/ODBLayer/RelationQuery.cs:2458— RelationQueryCompiler.BuildProgram has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SourceGenerator.GenerationInfoForRelationInterface (cyclomatic 35) BTDB.SourceGenerator/Main.cs:837— SourceGenerator.GenerationInfoForRelationInterface has cyclomatic complexity 35 (threshold 15). Of this number, 34 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ReplicationNodeCoordinator.PollLeaderAsync (cyclomatic 35) BTDB.Replication/ReplicationNodeCoordinator.cs:469— ReplicationNodeCoordinator.PollLeaderAsync has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
HttpReplicationPeerTransport.HandleAsync (cyclomatic 35) BTDB.Replication.Http/HttpReplicationPeerTransport.cs:80— HttpReplicationPeerTransport.HandleAsync has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
BTreeKeyValueDB.LoadInfoAboutFilesAsync (cyclomatic 34) BTDB/KVDBLayer/Implementation/BTreeKeyValueDB.cs:461— BTreeKeyValueDB.LoadInfoAboutFilesAsync has cyclomatic complexity 34 (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.
RelationQueryShapeBuilder.WalkNode (cyclomatic 34) BTDB/ODBLayer/RelationQueryCache.cs:291— RelationQueryShapeBuilder.WalkNode has cyclomatic complexity 34 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
Program.Main (cyclomatic 34) AotQuerySmoke/Program.cs:51— Program.Main has cyclomatic complexity 34 (threshold 15). Most of this is not in the body itself: 8 of the 34 points are its own statements and the rest belongs to 24 function literals inside it that branch (lines 116, 118, 94, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
ReadOnlyEventStore.ReadToEnd (cyclomatic 33) BTDB/EventStoreLayer/ReadOnlyEventStore.cs:57— ReadOnlyEventStore.ReadToEnd has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
RelationQuery.ExecuteWindowed (cyclomatic 33) BTDB/ODBLayer/RelationQuery.cs:538— RelationQuery.ExecuteWindowed has cyclomatic complexity 33 (threshold 15). Of this number, 32 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
RelationQueryCallSite.Child (cyclomatic 33) BTDB/ODBLayer/RelationQueryInterception.cs:427— RelationQueryCallSite.Child has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
PlannerScenario.Create (cyclomatic 33) DBBenchmark/BackendActions/PlannerScenario.cs:53— PlannerScenario.Create has cyclomatic complexity 33 (threshold 15). Most of this is not in the body itself: 13 of the 33 points are its own statements and the rest belongs to 11 function literals inside it that branch (lines 156, 174, 94, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
Program.Main (cyclomatic 33) DBBenchmark/Program.cs:8— Program.Main has cyclomatic complexity 33 (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.
EventSerializer.Create (cyclomatic 32) BTDB/EventStore2Layer/EventSerializer.cs:418— EventSerializer.Create has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
BTreeKeyValueDB.LoadInfoAboutFiles (cyclomatic 32) BTDB/KVDBLayer/Implementation/BTreeKeyValueDB.cs:291— BTreeKeyValueDB.LoadInfoAboutFiles has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DefaultTypeConverterFactory.GetIDictionary2DictionaryConverter (cyclomatic 32) BTDB/Serialization/DefaultTypeConverterFactory.cs:962— DefaultTypeConverterFactory.GetIDictionary2DictionaryConverter has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 8 of the 32 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 973, 1027, 1086, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
SourceGenerator.DependencyMembers (cyclomatic 32) BTDB.SourceGenerator/Main.cs:2325— SourceGenerator.DependencyMembers has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Program.MainAsync (cyclomatic 32) Releaser/Releaser/Program.cs:22— Program.MainAsync has cyclomatic complexity 32 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
EventLogFormat.Parse (cyclomatic 32) BTDB.Replication/EventLog/EventLogFormat.cs:249— EventLogFormat.Parse has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DefaultTypeConvertorGenerator.GenerateConversion (cyclomatic 31) REDACTED:68— DefaultTypeConvertorGenerator.GenerateConversion has cyclomatic complexity 31 (threshold 15). Of this number, 27 points are the body's own statements and 4 belong to 4 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CanonicalTrlPublisher.PublishCoreAsync (cyclomatic 30) BTDB.Replication/CanonicalTrlPublisher.cs:159— CanonicalTrlPublisher.PublishCoreAsync has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
EventLogMerger.RunPassAsync (cyclomatic 30) BTDB.Replication/EventLog/EventLogMerger.cs:32— EventLogMerger.RunPassAsync has cyclomatic complexity 30 (threshold 15). Of this number, 28 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, 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.
ReplicationNodeCoordinator.RunAsync (cyclomatic 30) BTDB.Replication/ReplicationNodeCoordinator.cs:140— ReplicationNodeCoordinator.RunAsync has cyclomatic complexity 30 (threshold 15). Of this number, 28 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
BTreeImpl12.Upsert (cyclomatic 29) BTDB/BTreeLib/BTreeImpl12.cs:1575— BTreeImpl12.Upsert has cyclomatic complexity 29 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
SplitInserter.Run (cyclomatic 29) BTDB/BTreeLib/BTreeImpl12.cs:2249— SplitInserter.Run has cyclomatic complexity 29 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
RelationQueryAstBuilder.BuildSource (cyclomatic 29) BTDB/ODBLayer/RelationQuery.cs:946— RelationQueryAstBuilder.BuildSource has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Bon.DumpToJson (cyclomatic 28) BTDB/Bon/Bon.cs:1372— Bon.DumpToJson 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.
CheckpointPublisher.PublishAsync (cyclomatic 28) BTDB.Replication/CheckpointPublisher.cs:31— CheckpointPublisher.PublishAsync has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
LsmMerger.Entries (cyclomatic 28) BTDB.LSM/Engine/LsmMerger.cs:46— LsmMerger.Entries has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
EnumTypeDescriptor.GenerateSave (cyclomatic 27) BTDB/EventStoreLayer/EnumTypeDescriptor.cs:342— EnumTypeDescriptor.GenerateSave has cyclomatic complexity 27 (threshold 15). Of this number, 24 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
RelationBuilder.Build (cyclomatic 27) BTDB/ODBLayer/RelationBuilder.cs:368— RelationBuilder.Build has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ItemLoaderInfo.CreatePkLoader (cyclomatic 27) BTDB/ODBLayer/RelationInfo.cs:274— ItemLoaderInfo.CreatePkLoader has cyclomatic complexity 27 (threshold 15). Of this number, 24 points are the body's own statements and 3 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
EventLogOptions.Validate (cyclomatic 27) BTDB.Replication/EventLog/EventLogOptions.cs:120— EventLogOptions.Validate has cyclomatic complexity 27 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ReplicationPeerPoll.Validate (cyclomatic 27) BTDB.Replication/ReplicationPeerTransport.cs:42— ReplicationPeerPoll.Validate has cyclomatic complexity 27 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
TrlPrefixComparer.CompareAsync (cyclomatic 27) BTDB.Replication/TrlPrefixComparer.cs:40— TrlPrefixComparer.CompareAsync has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
EventDeserializer.ProcessMetadataLog (cyclomatic 26) BTDB/EventStore2Layer/EventDeserializer.cs:160— EventDeserializer.ProcessMetadataLog has cyclomatic complexity 26 (threshold 15). Of this number, 21 points are the body's own statements and 5 belong to 2 function literals inside it that branch. To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
EmitHelpers.ToSimpleName (cyclomatic 26) BTDB/IL/EmitHelpers.cs:131— EmitHelpers.ToSimpleName has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Interpreter.StringOp (cyclomatic 26) BTDB/Interpreter/Interpreter.cs:2709— Interpreter.StringOp has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: Interpreter.RunCodeOp (cyclomatic 113) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
RelationQueryCompiler.CompilePlan (cyclomatic 26) BTDB/ODBLayer/RelationQuery.cs:2043— RelationQueryCompiler.CompilePlan has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
BTreeBranch.EraseRange (cyclomatic 25) BTDB/KVDBLayer/BTreeMem/BTreeBranch.cs:330— BTreeBranch.EraseRange has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Constraint.Constraint.ctor (cyclomatic 25) BTDB/ODBLayer/Constraint.cs:75— Constraint.Constraint.ctor has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
RelationAdvancedOrderedEnumerator.RelationAdvancedOrderedEnumerator.ctor (cyclomatic 25) BTDB/ODBLayer/RelationEnumerator.cs:978— RelationAdvancedOrderedEnumerator.RelationAdvancedOrderedEnumerator.ctor has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
BonSerializerFactory.DeserializeTypeType (cyclomatic 25) BTDB/Serialization/BonSerializer.cs:1723— BonSerializerFactory.DeserializeTypeType has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SourceGenerator.DetectErrors (cyclomatic 25) BTDB.SourceGenerator/Main.cs:1596— SourceGenerator.DetectErrors has cyclomatic complexity 25 (threshold 15). Of this number, 24 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, 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.
RelationBuilder.BuildUpdateByIdMethod (cyclomatic 24) BTDB/ODBLayer/RelationBuilder.cs:1385— RelationBuilder.BuildUpdateByIdMethod 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.
RelationQueryCompiler.EmitCompare (cyclomatic 24) BTDB/ODBLayer/RelationQuery.cs:3214— RelationQueryCompiler.EmitCompare has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: ExpressionConverter.Convert (cyclomatic 26) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
RawData.GetSizeAndAlign (cyclomatic 24) BTDB/Serialization/RawData.cs:201— RawData.GetSizeAndAlign has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
MemReader.CopyStringToOrdered (cyclomatic 24) BTDB/StreamLayer/MemReader.cs:615— MemReader.CopyStringToOrdered 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. Note what this body is, though: it works in explicit hardware vector and instruction-set types, and it works in raw pointers or stack-allocated memory, whose lifetime is this stack frame. A kernel divided across a call boundary passes its vectors between the parts and depends on the runtime putting them back together, so the division can cost more than the complexity it removes. Anything extracted from it has to take that memory as a parameter rather than reach for it. The measurement stands — a hot path is not a licence to be unreadable — but the move that pays here is to lift the COLD parts out first (argument validation, fallback and error paths, one-off setup) and leave the kernel whole. Where the kernel itself has to be divided, ask for the extracted parts to be inlined as well, and measure the result rather than assuming the division is free.
CanonicalTrlPublisher.BuildPlan (cyclomatic 24) BTDB.Replication/CanonicalTrlPublisher.cs:277— CanonicalTrlPublisher.BuildPlan 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. Note what this body is, though: it works in explicit hardware vector and instruction-set types. A kernel divided across a call boundary passes its vectors between the parts and depends on the runtime putting them back together, so the division can cost more than the complexity it removes. The measurement stands — a hot path is not a licence to be unreadable — but the move that pays here is to lift the COLD parts out first (argument validation, fallback and error paths, one-off setup) and leave the kernel whole. Where the kernel itself has to be divided, ask for the extracted parts to be inlined as well, and measure the result rather than assuming the division is free.
LeadershipActivation.ValidateAsync (cyclomatic 24) BTDB.Replication/LeadershipActivation.cs:95— LeadershipActivation.ValidateAsync has cyclomatic complexity 24 (threshold 15). Of this number, 23 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
RelationAdvancedEnumerator.CreateCursors (cyclomatic 23) BTDB/ODBLayer/RelationEnumerator.cs:640— RelationAdvancedEnumerator.CreateCursors has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
BonSerializerFactory.DeserializeObject (cyclomatic 23) BTDB/Serialization/BonSerializer.cs:796— BonSerializerFactory.DeserializeObject has cyclomatic complexity 23 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
SnappyDecompress.DecompressRaw (cyclomatic 23) BTDB/SnappyCompression/SnappyDecompress.cs:75— SnappyDecompress.DecompressRaw has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
AzureReplicationStorage.WriteAsync (cyclomatic 23) BTDB.Replication.Azure/AzureReplicationStorage.cs:121— AzureReplicationStorage.WriteAsync has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. Note what this body is, though: it works in explicit hardware vector and instruction-set types. A kernel divided across a call boundary passes its vectors between the parts and depends on the runtime putting them back together, so the division can cost more than the complexity it removes. The measurement stands — a hot path is not a licence to be unreadable — but the move that pays here is to lift the COLD parts out first (argument validation, fallback and error paths, one-off setup) and leave the kernel whole. Where the kernel itself has to be divided, ask for the extracted parts to be inlined as well, and measure the result rather than assuming the division is free.
Driver.Aggregate (cyclomatic 23) REDACTED:164— Driver.Aggregate has cyclomatic complexity 23 (threshold 15). Of this number, 22 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
LsmView.Select (cyclomatic 23) BTDB.LSM/Engine/LsmView.cs:128— LsmView.Select has cyclomatic complexity 23 (threshold 15). Of this number, 20 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ListTypeDescriptor.GenerateNewDescriptor (cyclomatic 22) BTDB/EventStoreLayer/ListTypeDescriptor.cs:413— ListTypeDescriptor.GenerateNewDescriptor has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 3 of the 22 points are its own statements and the rest belongs to one function literal inside it that branches (line 427). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
RelationBuilder.CreateVersionInfoByReflection (cyclomatic 22) BTDB/ODBLayer/RelationBuilder.cs:257— RelationBuilder.CreateVersionInfoByReflection has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
RelationQuery.Execute (cyclomatic 22) BTDB/ODBLayer/RelationQuery.cs:483— RelationQuery.Execute 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. This is NOT this file's highest cyclomatic complexity: ExpressionConverter.Convert (cyclomatic 26) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
RelationQueryCompiler.AnalyzeRangeField (cyclomatic 22) BTDB/ODBLayer/RelationQuery.cs:2244— RelationQueryCompiler.AnalyzeRangeField has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: ExpressionConverter.Convert (cyclomatic 26) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
RelationQueryScanner.MoveNextInRanges (cyclomatic 22) BTDB/ODBLayer/RelationQuery.cs:4084— RelationQueryScanner.MoveNextInRanges has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: ExpressionConverter.Convert (cyclomatic 26) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
MemWriter.WriteString (cyclomatic 22) BTDB/StreamLayer/MemWriter.cs:491— MemWriter.WriteString has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. Note what this body is, though: it works in explicit hardware vector and instruction-set types, and it works in raw pointers or stack-allocated memory, whose lifetime is this stack frame. A kernel divided across a call boundary passes its vectors between the parts and depends on the runtime putting them back together, so the division can cost more than the complexity it removes. Anything extracted from it has to take that memory as a parameter rather than reach for it. The measurement stands — a hot path is not a licence to be unreadable — but the move that pays here is to lift the COLD parts out first (argument validation, fallback and error paths, one-off setup) and leave the kernel whole. Where the kernel itself has to be divided, ask for the extracted parts to be inlined as well, and measure the result rather than assuming the division is free.
SourceGenerator.CheckParamsNamesAndTypes (cyclomatic 22) BTDB.SourceGenerator/Main.cs:1337— SourceGenerator.CheckParamsNamesAndTypes has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: GenerationInfo.Equals (cyclomatic 24) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
ReplicationFileSet.DownloadAsync (cyclomatic 22) BTDB.Replication/ReplicationFileSet.cs:133— ReplicationFileSet.DownloadAsync has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. Note what this body is, though: it works in explicit hardware vector and instruction-set types. A kernel divided across a call boundary passes its vectors between the parts and depends on the runtime putting them back together, so the division can cost more than the complexity it removes. The measurement stands — a hot path is not a licence to be unreadable — but the move that pays here is to lift the COLD parts out first (argument validation, fallback and error paths, one-off setup) and leave the kernel whole. Where the kernel itself has to be divided, ask for the extracted parts to be inlined as well, and measure the result rather than assuming the division is free.
ActionPlanner.Expire (cyclomatic 22) BTDB.BackendActions/ActionPlanner.cs:542— ActionPlanner.Expire has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
EnumFieldHandler.Save (cyclomatic 21) BTDB/FieldHandler/EnumFieldHandler.cs:328— EnumFieldHandler.Save has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ListFieldHandler.Save (cyclomatic 21) BTDB/FieldHandler/ListFieldHandler.cs:293— ListFieldHandler.Save has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 2 of the 21 points are its own statements and the rest belongs to one function literal inside it that branches (line 304). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
RelationQueryTypes.DefaultValue (cyclomatic 21) BTDB/ODBLayer/RelationQuery.cs:1548— RelationQueryTypes.DefaultValue has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: ExpressionConverter.Convert (cyclomatic 26) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
RelationQueryProjection.RelationQueryProjection.ctor (cyclomatic 21) BTDB/ODBLayer/RelationQuery.cs:4948— RelationQueryProjection.RelationQueryProjection.ctor has cyclomatic complexity 21 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table. This is NOT this file's highest cyclomatic complexity: ExpressionConverter.Convert (cyclomatic 26) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
MemWriter.WriteStringOrderedPrefix (cyclomatic 21) BTDB/StreamLayer/MemWriter.cs:609— MemWriter.WriteStringOrderedPrefix has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. Note what this body is, though: it works in explicit hardware vector and instruction-set types, and it works in raw pointers or stack-allocated memory, whose lifetime is this stack frame. A kernel divided across a call boundary passes its vectors between the parts and depends on the runtime putting them back together, so the division can cost more than the complexity it removes. Anything extracted from it has to take that memory as a parameter rather than reach for it. The measurement stands — a hot path is not a licence to be unreadable — but the move that pays here is to lift the COLD parts out first (argument validation, fallback and error paths, one-off setup) and leave the kernel whole. Where the kernel itself has to be divided, ask for the extracted parts to be inlined as well, and measure the result rather than assuming the division is free.
ReplicationMeasurements.PipelineRunAsync (cyclomatic 21) DBBenchmark/Replication/ReplicationMeasurements.cs:247— ReplicationMeasurements.PipelineRunAsync has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 9 of the 21 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 263, 285). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest. This is NOT this file's highest cyclomatic complexity: ReplicationMeasurements.Parse (cyclomatic 22) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
EventSerializer.ProcessMetadataLog (cyclomatic 20) BTDB/EventStore2Layer/EventSerializer.cs:273— EventSerializer.ProcessMetadataLog has cyclomatic complexity 20 (threshold 15). Of this number, 18 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
ListTypeDescriptor.GenerateSave (cyclomatic 20) BTDB/EventStoreLayer/ListTypeDescriptor.cs:285— ListTypeDescriptor.GenerateSave has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 1 of the 20 points is its own statement and the rest belongs to one function literal inside it that branches (line 294). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
BTreeKeyValueDB.WriteKeyIndexFile (cyclomatic 20) BTDB/KVDBLayer/Implementation/BTreeKeyValueDB.cs:2576— BTreeKeyValueDB.WriteKeyIndexFile has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 5 of the 20 points are its own statements and the rest belongs to one function literal inside it that branches (line 2597). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
RelationQueryTypes.TryGetStorage (cyclomatic 20) BTDB/ODBLayer/RelationQuery.cs:1479— RelationQueryTypes.TryGetStorage has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: ExpressionConverter.Convert (cyclomatic 26) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
RelationQueryResult.Read (cyclomatic 20) BTDB/ODBLayer/RelationQuery.cs:1788— RelationQueryResult.Read has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: ExpressionConverter.Convert (cyclomatic 26) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
BonSerializerFactory.SimpleType2String (cyclomatic 20) BTDB/Serialization/BonSerializer.cs:1682— BonSerializerFactory.SimpleType2String has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
SnappyCompress.Compress (cyclomatic 20) BTDB/SnappyCompression/SnappyCompress.cs:145— SnappyCompress.Compress has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
EventLogEndToEnd.RunAsync (cyclomatic 20) DBBenchmark/EventLog/EventLogEndToEnd.cs:32— EventLogEndToEnd.RunAsync has cyclomatic complexity 20 (threshold 15). Of this number, 15 points are the body's own statements and 5 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SourceGenerator.GatherCollection (cyclomatic 20) BTDB.SourceGenerator/Main.cs:2633— SourceGenerator.GatherCollection has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: GenerationInfo.Equals (cyclomatic 24) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
PackUnpack.DetectLengthOfSimpleCharacters (cyclomatic 19) BTDB/Buffer/PackUnpack.cs:1066— PackUnpack.DetectLengthOfSimpleCharacters has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. Note what this body is, though: it works in explicit hardware vector and instruction-set types. A kernel divided across a call boundary passes its vectors between the parts and depends on the runtime putting them back together, so the division can cost more than the complexity it removes. The measurement stands — a hot path is not a licence to be unreadable — but the move that pays here is to lift the COLD parts out first (argument validation, fallback and error paths, one-off setup) and leave the kernel whole. Where the kernel itself has to be divided, ask for the extracted parts to be inlined as well, and measure the result rather than assuming the division is free.
PackUnpack.ReadAndExpandSimpleCharacters (cyclomatic 19) BTDB/Buffer/PackUnpack.cs:1149— PackUnpack.ReadAndExpandSimpleCharacters has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. Note what this body is, though: it works in explicit hardware vector and instruction-set types. A kernel divided across a call boundary passes its vectors between the parts and depends on the runtime putting them back together, so the division can cost more than the complexity it removes. The measurement stands — a hot path is not a licence to be unreadable — but the move that pays here is to lift the COLD parts out first (argument validation, fallback and error paths, one-off setup) and leave the kernel whole. Where the kernel itself has to be divided, ask for the extracted parts to be inlined as well, and measure the result rather than assuming the division is free.
ListFieldOrderedHandler.Save (cyclomatic 19) BTDB/FieldHandler/ListFieldOrderedHandler.cs:254— ListFieldOrderedHandler.Save has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 2 of the 19 points are its own statements and the rest belongs to one function literal inside it that branches (line 265). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
RelationQueryTypes.CreateSet (cyclomatic 19) BTDB/ODBLayer/RelationQuery.cs:1602— RelationQueryTypes.CreateSet has cyclomatic complexity 19 (threshold 15). Of this number, 18 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: ExpressionConverter.Convert (cyclomatic 26) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
RelationQueryCompiler.SaveConstant (cyclomatic 19) BTDB/ODBLayer/RelationQuery.cs:3595— RelationQueryCompiler.SaveConstant has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (RelationQueryProjection.SetField) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared. This is NOT this file's highest cyclomatic complexity: ExpressionConverter.Convert (cyclomatic 26) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
RelationQueryProjection.Construct (cyclomatic 19) BTDB/ODBLayer/RelationQuery.cs:5149— RelationQueryProjection.Construct has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: ExpressionConverter.Convert (cyclomatic 26) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
RelationQueryProjection.SetField (cyclomatic 19) BTDB/ODBLayer/RelationQuery.cs:5279— RelationQueryProjection.SetField has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (RelationQueryCompiler.SaveConstant) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared. This is NOT this file's highest cyclomatic complexity: ExpressionConverter.Convert (cyclomatic 26) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
TrlFileReader.Iterate (cyclomatic 19) ODbDump/TrlDump/TrlFileReader.cs:24— TrlFileReader.Iterate has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
EventLogTopic.ReadAsync (cyclomatic 19) BTDB.Replication/EventLog/EventLogService.cs:853— EventLogTopic.ReadAsync has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
EventLogStorageReader.TryLocateAsync (cyclomatic 19) BTDB.Replication/EventLog/EventLogStorageReader.cs:234— EventLogStorageReader.TryLocateAsync has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ActionPlanner.Update (cyclomatic 19) BTDB.BackendActions/ActionPlanner.cs:363— ActionPlanner.Update has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Execution.RunAsync (cyclomatic 19) BTDB.BackendActions/ActionWorker.cs:206— Execution.RunAsync has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
BuildFromTypeCtx.Create (cyclomatic 18) BTDB/EventStoreLayer/TypeSerializers.cs:149— BuildFromTypeCtx.Create has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TypeSerializersMapping.LoadTypeDescriptors (cyclomatic 18) BTDB/EventStoreLayer/TypeSerializersMapping.cs:55— TypeSerializersMapping.LoadTypeDescriptors has cyclomatic complexity 18 (threshold 15). Of this number, 17 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
KeyValueDBExportImporter.ImportAsync (cyclomatic 18) BTDB/KVDBLayer/Helpers/KeyValueDBExportImporter.cs:118— KeyValueDBExportImporter.ImportAsync has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (KeyValueDBExportImporter.Import) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
KeyValueDBExportImporter.Import (cyclomatic 18) BTDB/KVDBLayer/Helpers/KeyValueDBExportImporter.cs:169— KeyValueDBExportImporter.Import has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (KeyValueDBExportImporter.ImportAsync) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
PtrLenList.TryExclude (cyclomatic 18) BTDB/KVDBLayer/Helpers/PtrLenList.cs:50— PtrLenList.TryExclude has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Compactor.RunCore (cyclomatic 18) BTDB/KVDBLayer/Implementation/Compactor.cs:118— Compactor.RunCore has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
RelationInfo.CreatePrimaryKeyFromSKDataMerger (cyclomatic 18) BTDB/ODBLayer/RelationInfo.cs:2502— RelationInfo.CreatePrimaryKeyFromSKDataMerger has cyclomatic complexity 18 (threshold 15). Of this number, 16 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
RelationQueryTypes.WriteStorage (cyclomatic 18) BTDB/ODBLayer/RelationQuery.cs:1579— RelationQueryTypes.WriteStorage has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: ExpressionConverter.Convert (cyclomatic 26) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
RelationQueryCompiler.AddFrameConstant (cyclomatic 18) BTDB/ODBLayer/RelationQuery.cs:3525— RelationQueryCompiler.AddFrameConstant has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: 2 other methods here (RelationQueryProjection.GetNullableValueOffset, RelationQueryAggregator.CreateMinMax) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared. This is NOT this file's highest cyclomatic complexity: ExpressionConverter.Convert (cyclomatic 26) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
RelationQueryProjection.GetNullableValueOffset (cyclomatic 18) BTDB/ODBLayer/RelationQuery.cs:5096— RelationQueryProjection.GetNullableValueOffset has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: 2 other methods here (RelationQueryCompiler.AddFrameConstant, RelationQueryAggregator.CreateMinMax) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared. This is NOT this file's highest cyclomatic complexity: ExpressionConverter.Convert (cyclomatic 26) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
RelationQueryAggregator.CreateMinMax (cyclomatic 18) BTDB/ODBLayer/RelationQuery.cs:5372— RelationQueryAggregator.CreateMinMax has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: 2 other methods here (RelationQueryCompiler.AddFrameConstant, RelationQueryProjection.GetNullableValueOffset) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared. This is NOT this file's highest cyclomatic complexity: ExpressionConverter.Convert (cyclomatic 26) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
TableInfo.CreateSaver (cyclomatic 18) BTDB/ODBLayer/TableInfo.cs:306— TableInfo.CreateSaver has cyclomatic complexity 18 (threshold 15). Of this number, 16 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ReplicationMeasurements.RestoreAsync (cyclomatic 18) DBBenchmark/Replication/ReplicationMeasurements.cs:550— ReplicationMeasurements.RestoreAsync has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: ReplicationMeasurements.Parse (cyclomatic 22) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
EventLogTopic.PublishLoopAsync (cyclomatic 18) BTDB.Replication/EventLog/EventLogService.cs:202— EventLogTopic.PublishLoopAsync has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
LeaderTrlReader.ReadInlineAsync (cyclomatic 18) BTDB.Replication/LeaderTrlReader.cs:52— LeaderTrlReader.ReadInlineAsync has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
RemoteGarbageCollector.CollectAsync (cyclomatic 18) BTDB.Replication/RemoteMaintenance.cs:26— RemoteGarbageCollector.CollectAsync has cyclomatic complexity 18 (threshold 15). Of this number, 15 points are the body's own statements and 3 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
MergingIterator.ResolveForward (cyclomatic 18) BTDB.LSM/Engine/MergingIterator.cs:99— MergingIterator.ResolveForward has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (MergingIterator.ResolveBackward) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
MergingIterator.ResolveBackward (cyclomatic 18) BTDB.LSM/Engine/MergingIterator.cs:143— MergingIterator.ResolveBackward has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (MergingIterator.ResolveForward) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
SingleRegistration.BuildFactory (cyclomatic 17) BTDB/IOC/SingleRegistration.cs:163— SingleRegistration.BuildFactory has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to 3 function literals inside it that branch (lines 170, 228, 213). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
PtrLenList.TryInclude (cyclomatic 17) BTDB/KVDBLayer/Helpers/PtrLenList.cs:159— PtrLenList.TryInclude has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
FileCollectionWithFileInfos.LoadInfoAboutFiles (cyclomatic 17) BTDB/KVDBLayer/Implementation/FileCollectionWithFileInfos.cs:64— FileCollectionWithFileInfos.LoadInfoAboutFiles has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
ObjectDBTransaction.Enumerate (cyclomatic 17) BTDB/ODBLayer/ObjectDBTransaction.cs:210— ObjectDBTransaction.Enumerate has cyclomatic complexity 17 (threshold 15). Of this number, 12 points are the body's own statements and 5 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ExpressionConverter.ConvertStringInstanceCall (cyclomatic 17) BTDB/ODBLayer/RelationQuery.cs:1263— ExpressionConverter.ConvertStringInstanceCall has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: ExpressionConverter.Convert (cyclomatic 26) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
RelationQueryRangeBuilder.Build (cyclomatic 17) BTDB/ODBLayer/RelationQuery.cs:5613— RelationQueryRangeBuilder.Build has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: ExpressionConverter.Convert (cyclomatic 26) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
MemReader.ReadString (cyclomatic 17) BTDB/StreamLayer/MemReader.cs:529— MemReader.ReadString has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. Note what this body is, though: it works in explicit hardware vector and instruction-set types, and it works in raw pointers or stack-allocated memory, whose lifetime is this stack frame. A kernel divided across a call boundary passes its vectors between the parts and depends on the runtime putting them back together, so the division can cost more than the complexity it removes. Anything extracted from it has to take that memory as a parameter rather than reach for it. The measurement stands — a hot path is not a licence to be unreadable — but the move that pays here is to lift the COLD parts out first (argument validation, fallback and error paths, one-off setup) and leave the kernel whole. Where the kernel itself has to be divided, ask for the extracted parts to be inlined as well, and measure the result rather than assuming the division is free.
SourceGenerator.BuildIndexInfo (cyclomatic 17) BTDB.SourceGenerator/Main.cs:4358— SourceGenerator.BuildIndexInfo has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: GenerationInfo.Equals (cyclomatic 24) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
EventLogMerger.MergeGroupAsync (cyclomatic 17) BTDB.Replication/EventLog/EventLogMerger.cs:198— EventLogMerger.MergeGroupAsync has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, 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.
FollowerComparisonSession.CompareAsync (cyclomatic 17) BTDB.Replication/FollowerComparisonSession.cs:41— FollowerComparisonSession.CompareAsync has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
LeadershipActivation.ActivateAsync (cyclomatic 17) BTDB.Replication/LeadershipActivation.cs:28— LeadershipActivation.ActivateAsync has cyclomatic complexity 17 (threshold 15). Of this number, 16 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ReplicationMaintenance.RunDueAsync (cyclomatic 17) BTDB.Replication/RemoteMaintenance.cs:86— ReplicationMaintenance.RunDueAsync has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ActionWorker.Apply (cyclomatic 17) BTDB.BackendActions/ActionWorker.cs:102— ActionWorker.Apply has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
RoaringBitmaps.Operate (cyclomatic 16) BTDB/Buffer/RoaringBitmaps.cs:246— RoaringBitmaps.Operate has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
FullNameTypeMapper.ToType (cyclomatic 16) BTDB/EventStoreLayer/FullNameTypeMapper.cs:59— FullNameTypeMapper.ToType has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ObjectTypeDescriptor.GenerateLoad (cyclomatic 16) BTDB/EventStoreLayer/ObjectTypeDescriptor.cs:232— ObjectTypeDescriptor.GenerateLoad has cyclomatic complexity 16 (threshold 15). Of this number, 14 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
BTreeBranch.EraseOne (cyclomatic 16) BTDB/KVDBLayer/BTreeMem/BTreeBranch.cs:420— BTreeBranch.EraseOne has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ODBSet.RemoveRange (cyclomatic 16) BTDB/ODBLayer/ODBSet.cs:327— ODBSet.RemoveRange has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
RelationDBManipulator.CountWithProposition (cyclomatic 16) BTDB/ODBLayer/RelationDBManipulator.cs:913— RelationDBManipulator.CountWithProposition has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
RelationInfo.CreateSaver (cyclomatic 16) BTDB/ODBLayer/RelationInfo.cs:2272— RelationInfo.CreateSaver has cyclomatic complexity 16 (threshold 15). Of this number, 13 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, 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.
RelationQuery.ExecuteElement (cyclomatic 16) BTDB/ODBLayer/RelationQuery.cs:756— RelationQuery.ExecuteElement has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: ExpressionConverter.Convert (cyclomatic 26) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
ExpressionConverter.ConvertCall (cyclomatic 16) BTDB/ODBLayer/RelationQuery.cs:1219— ExpressionConverter.ConvertCall has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: ExpressionConverter.Convert (cyclomatic 26) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
MemReader.ReadStringOrdered (cyclomatic 16) BTDB/StreamLayer/MemReader.cs:722— MemReader.ReadStringOrdered has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
MemReader.SkipString (cyclomatic 16) BTDB/StreamLayer/MemReader.cs:919— MemReader.SkipString has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. Note what this body is, though: it works in explicit hardware vector and instruction-set types, and it works in raw pointers or stack-allocated memory, whose lifetime is this stack frame. A kernel divided across a call boundary passes its vectors between the parts and depends on the runtime putting them back together, so the division can cost more than the complexity it removes. Anything extracted from it has to take that memory as a parameter rather than reach for it. The measurement stands — a hot path is not a licence to be unreadable — but the move that pays here is to lift the COLD parts out first (argument validation, fallback and error paths, one-off setup) and leave the kernel whole. Where the kernel itself has to be divided, ask for the extracted parts to be inlined as well, and measure the result rather than assuming the division is free.
ReplicationMeasurements.CompareRunAsync (cyclomatic 16) DBBenchmark/Replication/ReplicationMeasurements.cs:372— ReplicationMeasurements.CompareRunAsync has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: ReplicationMeasurements.Parse (cyclomatic 22) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
Driver.RunAsync (cyclomatic 16) REDACTED:23— Driver.RunAsync has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
Storage.Run (cyclomatic 16) AotActionsSmoke/Storage.cs:124— Storage.Run has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to 6 function literals inside it that branch (lines 224, 130, 166, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
Repeated repair: BTDB/KVDBLayer/Implementation/BTreeKeyValueDBCursor.cs BTDB/KVDBLayer/Implementation/BTreeKeyValueDBCursor.cs:684— BTDB/KVDBLayer/Implementation/BTreeKeyValueDBCursor.cs changed 7 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 11 (its worst body is BTreeKeyValueDBCursor.NotifyRemove at line 684), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “Increase key value DB test coverage and fix cursor bugs”; “Fix more bugs found by BTDB core review”; “Fix bugs found by BTDB core review”; “Fix lost SetValue and cursor index tracking in key value DBs”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 15:30:43 +01:00' --until='2026-11-12 15:30:43 +01:00' --full-history --no-merges -- BTDB/KVDBLayer/Implementation/BTreeKeyValueDBCursor.cs`: 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.
TodoComment BTDB/KVDBLayer/Helpers/PtrLenList.cs:248— // TODO: optimize this — 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.
SourceGenerator.GenerateRelationInterfaceFactory (cognitive 374) BTDB.SourceGenerator/Main.cs:4570— SourceGenerator.GenerateRelationInterfaceFactory has cognitive complexity 374 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
DefaultTypeConverterFactory.GetConverter (cognitive 358) BTDB/Serialization/DefaultTypeConverterFactory.cs:19— DefaultTypeConverterFactory.GetConverter has cognitive complexity 358 (threshold 15). Of this number, 335 points are the body's own statements and 23 belong to 6 function literals inside it that branch. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
SourceGenerator.GenerateClassFactory (cognitive 287) BTDB.SourceGenerator/Main.cs:3536— SourceGenerator.GenerateClassFactory has cognitive complexity 287 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
SourceGenerator.DetectErrorsInMethods (cognitive 242) BTDB.SourceGenerator/Main.cs:291— SourceGenerator.DetectErrorsInMethods has cognitive complexity 242 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BonSerializerFactory.CreateDeserializerForType (cognitive 202) BTDB/Serialization/BonSerializer.cs:951— BonSerializerFactory.CreateDeserializerForType has cognitive complexity 202 (threshold 15). Of this number, 47 points are the body's own statements and 155 belong to 25 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RelationInfo.CreateBytesToSKSaver (cognitive 184) BTDB/ODBLayer/RelationInfo.cs:1573— RelationInfo.CreateBytesToSKSaver has cognitive complexity 184 (threshold 15). Of this number, 179 points are the body's own statements and 5 belong to 2 function literals inside it that branch. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
EventLogStorageScreening.RunAsync (cognitive 147) DBBenchmark/EventLog/EventLogStorageScreening.cs:23— EventLogStorageScreening.RunAsync has cognitive complexity 147 (threshold 15). Of this number, 41 points are the body's own statements and 106 belong to 9 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.
ItemLoaderInfo.CreateLoader (cognitive 140) BTDB/ODBLayer/RelationInfo.cs:542— ItemLoaderInfo.CreateLoader has cognitive complexity 140 (threshold 15). Of this number, 135 points are the body's own statements and 5 belong to 2 function literals inside it that branch. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
ODBIterator.IterateHandler (cognitive 131) BTDB/ODBLayer/ODBIterator.cs:571— ODBIterator.IterateHandler has cognitive complexity 131 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
BTreeKeyValueDB.LoadTransactionLogCore (cognitive 126) BTDB/KVDBLayer/Implementation/BTreeKeyValueDB.cs:1133— BTreeKeyValueDB.LoadTransactionLogCore has cognitive complexity 126 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SourceGenerator.GenerationInfoForClass (cognitive 119) BTDB.SourceGenerator/Main.cs:1755— SourceGenerator.GenerationInfoForClass has cognitive complexity 119 (threshold 15). Of this number, 74 points are the body's own statements and 45 belong to 16 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BTreeImpl12.Upsert (cognitive 116) BTDB/BTreeLib/BTreeImpl12.cs:1575— BTreeImpl12.Upsert has cognitive complexity 116 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
ReplicationNodeCoordinator.StepAsync (cognitive 110) BTDB.Replication/ReplicationNodeCoordinator.cs:244— ReplicationNodeCoordinator.StepAsync has cognitive complexity 110 (threshold 15). Of this number, 107 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
TableInfo.CreateLoader (cognitive 107) BTDB/ODBLayer/TableInfo.cs:600— TableInfo.CreateLoader has cognitive complexity 107 (threshold 15). Of this number, 102 points are the body's own statements and 5 belong to 2 function literals inside it that branch. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
Constraint.Exact (cognitive 103) BTDB/ODBLayer/Constraint.cs:275— Constraint.Exact has cognitive complexity 103 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EventSerializer.Create (cognitive 91) BTDB/EventStore2Layer/EventSerializer.cs:418— EventSerializer.Create has cognitive complexity 91 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
BonSerializerFactory.CreateSerializerForType (cognitive 91) BTDB/Serialization/BonSerializer.cs:187— BonSerializerFactory.CreateSerializerForType has cognitive complexity 91 (threshold 15). Of this number, 39 points are the body's own statements and 52 belong to 9 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.
SplitInserter.Run (cognitive 87) BTDB/BTreeLib/BTreeImpl12.cs:2249— SplitInserter.Run has cognitive complexity 87 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
SourceGenerator.Initialize (cognitive 83) BTDB.SourceGenerator/Main.cs:25— SourceGenerator.Initialize has cognitive complexity 83 (threshold 15). None of this is in the body itself: all 83 points belong to 8 function literals inside it that branch (lines 30, 141, 85, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
ContainerImpl.CreateFactory (cognitive 82) BTDB/IOC/ContainerImpl.cs:338— ContainerImpl.CreateFactory has cognitive complexity 82 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
Interpreter.Loop (cognitive 79) BTDB/Interpreter/Interpreter.cs:1537— Interpreter.Loop has cognitive complexity 79 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Program.Interactive (cognitive 79) ODbDump/Program.cs:710— Program.Interactive has cognitive complexity 79 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EventPublisher.RunAsync (cognitive 79) BTDB.Replication.EventSourcing/EventPublisher.cs:268— EventPublisher.RunAsync has cognitive complexity 79 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LsmStorageScreening.RunAsync (cognitive 77) DBBenchmark/LSM/LsmStorageScreening.cs:30— LsmStorageScreening.RunAsync has cognitive complexity 77 (threshold 15). Of this number, 26 points are the body's own statements and 51 belong to 13 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.
Program.Main (cognitive 75) ODbDump/Program.cs:19— Program.Main has cognitive complexity 75 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. Note what this body is, though: it works in explicit hardware vector and instruction-set types. A kernel divided across a call boundary passes its vectors between the parts and depends on the runtime putting them back together, so the division can cost more than the complexity it removes. The measurement stands — a hot path is not a licence to be unreadable — but the move that pays here is to lift the COLD parts out first (argument validation, fallback and error paths, one-off setup) and leave the kernel whole. Where the kernel itself has to be divided, ask for the extracted parts to be inlined as well, and measure the result rather than assuming the division is free.
ReadOnlyEventStore.ReadToEnd (cognitive 72) BTDB/EventStoreLayer/ReadOnlyEventStore.cs:57— ReadOnlyEventStore.ReadToEnd has cognitive complexity 72 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RelationConstraintEnumerator.FindNextKey (cognitive 71) BTDB/ODBLayer/RelationEnumerator.cs:102— RelationConstraintEnumerator.FindNextKey has cognitive complexity 71 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RelationConstraintReverseEnumerator.FindPreviousKey (cognitive 70) BTDB/ODBLayer/RelationConstraintReverseEnumerator.cs:39— RelationConstraintReverseEnumerator.FindPreviousKey has cognitive complexity 70 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ItemLoaderInfo.CreatePkLoader (cognitive 70) BTDB/ODBLayer/RelationInfo.cs:274— ItemLoaderInfo.CreatePkLoader has cognitive complexity 70 (threshold 15). Of this number, 64 points are the body's own statements and 6 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SourceGenerator.DependencyMembers (cognitive 68) BTDB.SourceGenerator/Main.cs:2325— SourceGenerator.DependencyMembers has cognitive complexity 68 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ContainerImpl.CreateFactoryFromRegistration (cognitive 67) BTDB/IOC/ContainerImpl.cs:590— ContainerImpl.CreateFactoryFromRegistration has cognitive complexity 67 (threshold 15). Of this number, 30 points are the body's own statements and 37 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.
RelationBuilder.BuildUpdateByIdMethod (cognitive 67) BTDB/ODBLayer/RelationBuilder.cs:1385— RelationBuilder.BuildUpdateByIdMethod has cognitive complexity 67 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RelationQueryCompiler.Simplify (cognitive 66) BTDB/ODBLayer/RelationQuery.cs:3702— RelationQueryCompiler.Simplify has cognitive complexity 66 (threshold 15). 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.
SourceGenerator.GenerationInfoForRelationInterface (cognitive 66) BTDB.SourceGenerator/Main.cs:837— SourceGenerator.GenerationInfoForRelationInterface has cognitive complexity 66 (threshold 15). Of this number, 65 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
BonSerializerFactory.DeserializeTypeType (cognitive 65) BTDB/Serialization/BonSerializer.cs:1723— BonSerializerFactory.DeserializeTypeType has cognitive complexity 65 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BTreeImpl12.EraseFromBranch (cognitive 64) BTDB/BTreeLib/BTreeImpl12.cs:670— BTreeImpl12.EraseFromBranch has cognitive complexity 64 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DefaultTypeConverterFactory.GetIDictionary2DictionaryConverter (cognitive 62) BTDB/Serialization/DefaultTypeConverterFactory.cs:962— DefaultTypeConverterFactory.GetIDictionary2DictionaryConverter has cognitive complexity 62 (threshold 15). Most of this is not in the body itself: 7 of the 62 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 973, 1027, 1086, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
BTreeKeyValueDB.LoadInfoAboutFiles (cognitive 61) BTDB/KVDBLayer/Implementation/BTreeKeyValueDB.cs:291— BTreeKeyValueDB.LoadInfoAboutFiles has cognitive complexity 61 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CanonicalTrlPublisher.PublishCoreAsync (cognitive 60) BTDB.Replication/CanonicalTrlPublisher.cs:159— CanonicalTrlPublisher.PublishCoreAsync has cognitive complexity 60 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ListFieldHandler.Save (cognitive 59) BTDB/FieldHandler/ListFieldHandler.cs:293— ListFieldHandler.Save has cognitive complexity 59 (threshold 15). Most of this is not in the body itself: 1 of the 59 points is its own statement and the rest belongs to one function literal inside it that branches (line 304). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
RelationQueryCompiler.BuildProgram (cognitive 56) BTDB/ODBLayer/RelationQuery.cs:2458— RelationQueryCompiler.BuildProgram has cognitive complexity 56 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SourceGenerator.DetectErrors (cognitive 56) BTDB.SourceGenerator/Main.cs:1596— SourceGenerator.DetectErrors has cognitive complexity 56 (threshold 15). Of this number, 55 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SourceGenerator.GatherCollection (cognitive 56) BTDB.SourceGenerator/Main.cs:2633— SourceGenerator.GatherCollection has cognitive complexity 56 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
BTreeKeyValueDB.LoadInfoAboutFilesAsync (cognitive 55) BTDB/KVDBLayer/Implementation/BTreeKeyValueDB.cs:461— BTreeKeyValueDB.LoadInfoAboutFilesAsync has cognitive complexity 55 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EventLogFormat.Parse (cognitive 52) BTDB.Replication/EventLog/EventLogFormat.cs:249— EventLogFormat.Parse has cognitive complexity 52 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EventLogMerger.RunPassAsync (cognitive 51) BTDB.Replication/EventLog/EventLogMerger.cs:32— EventLogMerger.RunPassAsync has cognitive complexity 51 (threshold 15). Of this number, 50 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Driver.Aggregate (cognitive 50) REDACTED:164— Driver.Aggregate has cognitive complexity 50 (threshold 15). Of this number, 49 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RelationQueryScanner.MoveNextInRanges (cognitive 49) BTDB/ODBLayer/RelationQuery.cs:4084— RelationQueryScanner.MoveNextInRanges has cognitive complexity 49 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LsmMerger.Entries (cognitive 48) BTDB.LSM/Engine/LsmMerger.cs:46— LsmMerger.Entries has cognitive complexity 48 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ListTypeDescriptor.GenerateNewDescriptor (cognitive 47) BTDB/EventStoreLayer/ListTypeDescriptor.cs:413— ListTypeDescriptor.GenerateNewDescriptor has cognitive complexity 47 (threshold 15). Most of this is not in the body itself: 2 of the 47 points are its own statements and the rest belongs to one function literal inside it that branches (line 427). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
RelationQuery.ExecuteProjected (cognitive 47) BTDB/ODBLayer/RelationQuery.cs:636— RelationQuery.ExecuteProjected has cognitive complexity 47 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ActionPlanner.Exchange (cognitive 47) BTDB.BackendActions/ActionPlanner.cs:432— ActionPlanner.Exchange has cognitive complexity 47 (threshold 15). Of this number, 45 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RelationBuilder.CreateVersionInfoByReflection (cognitive 46) BTDB/ODBLayer/RelationBuilder.cs:257— RelationBuilder.CreateVersionInfoByReflection has cognitive complexity 46 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ListTypeDescriptor.GenerateSave (cognitive 45) BTDB/EventStoreLayer/ListTypeDescriptor.cs:285— ListTypeDescriptor.GenerateSave has cognitive complexity 45 (threshold 15). None of this is in the body itself: all 45 points belong to one function literal inside it that branches (line 294). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
RelationBuilder.Build (cognitive 45) BTDB/ODBLayer/RelationBuilder.cs:368— RelationBuilder.Build has cognitive complexity 45 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
RelationInfo.CreatePrimaryKeyFromSKDataMerger (cognitive 45) BTDB/ODBLayer/RelationInfo.cs:2502— RelationInfo.CreatePrimaryKeyFromSKDataMerger has cognitive complexity 45 (threshold 15). Of this number, 40 points are the body's own statements and 5 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.
ReplicationNodeCoordinator.RunAsync (cognitive 45) BTDB.Replication/ReplicationNodeCoordinator.cs:140— ReplicationNodeCoordinator.RunAsync has cognitive complexity 45 (threshold 15). Of this number, 43 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
ReplicationNodeCoordinator.PollLeaderAsync (cognitive 45) BTDB.Replication/ReplicationNodeCoordinator.cs:469— ReplicationNodeCoordinator.PollLeaderAsync has cognitive complexity 45 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BTreeImpl12.FastIterateNoCursor (cognitive 44) BTDB/BTreeLib/BTreeImpl12.cs:2755— BTreeImpl12.FastIterateNoCursor has cognitive complexity 44 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
SnappyDecompress.DecompressRaw (cognitive 44) BTDB/SnappyCompression/SnappyDecompress.cs:75— SnappyDecompress.DecompressRaw has cognitive complexity 44 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TrlPrefixComparer.CompareAsync (cognitive 44) BTDB.Replication/TrlPrefixComparer.cs:40— TrlPrefixComparer.CompareAsync has cognitive complexity 44 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BTreeKeyValueDB.LoadKeyIndex (cognitive 43) BTDB/KVDBLayer/Implementation/BTreeKeyValueDB.cs:818— BTreeKeyValueDB.LoadKeyIndex has cognitive complexity 43 (threshold 15). Most of this is not in the body itself: 11 of the 43 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 939, 867). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
RelationAdvancedOrderedEnumerator.RelationAdvancedOrderedEnumerator.ctor (cognitive 43) BTDB/ODBLayer/RelationEnumerator.cs:978— RelationAdvancedOrderedEnumerator.RelationAdvancedOrderedEnumerator.ctor has cognitive complexity 43 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
MemReader.CopyStringToOrdered (cognitive 43) BTDB/StreamLayer/MemReader.cs:615— MemReader.CopyStringToOrdered has cognitive complexity 43 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. Note what this body is, though: it works in explicit hardware vector and instruction-set types, and it works in raw pointers or stack-allocated memory, whose lifetime is this stack frame. A kernel divided across a call boundary passes its vectors between the parts and depends on the runtime putting them back together, so the division can cost more than the complexity it removes. Anything extracted from it has to take that memory as a parameter rather than reach for it. The measurement stands — a hot path is not a licence to be unreadable — but the move that pays here is to lift the COLD parts out first (argument validation, fallback and error paths, one-off setup) and leave the kernel whole. Where the kernel itself has to be divided, ask for the extracted parts to be inlined as well, and measure the result rather than assuming the division is free.
EventLogTopic.ReadAsync (cognitive 42) BTDB.Replication/EventLog/EventLogService.cs:853— EventLogTopic.ReadAsync has cognitive complexity 42 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EnumTypeDescriptor.GenerateSave (cognitive 41) BTDB/EventStoreLayer/EnumTypeDescriptor.cs:342— EnumTypeDescriptor.GenerateSave has cognitive complexity 41 (threshold 15). Of this number, 33 points are the body's own statements and 8 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ListFieldOrderedHandler.Save (cognitive 40) BTDB/FieldHandler/ListFieldOrderedHandler.cs:254— ListFieldOrderedHandler.Save has cognitive complexity 40 (threshold 15). Most of this is not in the body itself: 1 of the 40 points is its own statement and the rest belongs to one function literal inside it that branches (line 265). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
TableInfo.CreateSaver (cognitive 40) BTDB/ODBLayer/TableInfo.cs:306— TableInfo.CreateSaver has cognitive complexity 40 (threshold 15). Of this number, 34 points are the body's own statements and 6 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.
MemWriter.WriteString (cognitive 40) BTDB/StreamLayer/MemWriter.cs:491— MemWriter.WriteString has cognitive complexity 40 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. Note what this body is, though: it works in explicit hardware vector and instruction-set types, and it works in raw pointers or stack-allocated memory, whose lifetime is this stack frame. A kernel divided across a call boundary passes its vectors between the parts and depends on the runtime putting them back together, so the division can cost more than the complexity it removes. Anything extracted from it has to take that memory as a parameter rather than reach for it. The measurement stands — a hot path is not a licence to be unreadable — but the move that pays here is to lift the COLD parts out first (argument validation, fallback and error paths, one-off setup) and leave the kernel whole. Where the kernel itself has to be divided, ask for the extracted parts to be inlined as well, and measure the result rather than assuming the division is free.
MemWriter.WriteStringOrderedPrefix (cognitive 39) BTDB/StreamLayer/MemWriter.cs:609— MemWriter.WriteStringOrderedPrefix has cognitive complexity 39 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. Note what this body is, though: it works in explicit hardware vector and instruction-set types, and it works in raw pointers or stack-allocated memory, whose lifetime is this stack frame. A kernel divided across a call boundary passes its vectors between the parts and depends on the runtime putting them back together, so the division can cost more than the complexity it removes. Anything extracted from it has to take that memory as a parameter rather than reach for it. The measurement stands — a hot path is not a licence to be unreadable — but the move that pays here is to lift the COLD parts out first (argument validation, fallback and error paths, one-off setup) and leave the kernel whole. Where the kernel itself has to be divided, ask for the extracted parts to be inlined as well, and measure the result rather than assuming the division is free.
MergingIterator.ResolveForward (cognitive 39) BTDB.LSM/Engine/MergingIterator.cs:99— MergingIterator.ResolveForward has cognitive complexity 39 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (MergingIterator.ResolveBackward) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
MergingIterator.ResolveBackward (cognitive 39) BTDB.LSM/Engine/MergingIterator.cs:143— MergingIterator.ResolveBackward has cognitive complexity 39 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (MergingIterator.ResolveForward) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
BTreeImpl12.ValueReplacer (cognitive 38) BTDB/BTreeLib/BTreeImpl12.cs:299— BTreeImpl12.ValueReplacer has cognitive complexity 38 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
BTreeImpl12.FindLastWithPrefix (cognitive 38) BTDB/BTreeLib/BTreeImpl12.cs:1491— BTreeImpl12.FindLastWithPrefix has cognitive complexity 38 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
PackUnpack.ReadAndExpandSimpleCharacters (cognitive 38) BTDB/Buffer/PackUnpack.cs:1149— PackUnpack.ReadAndExpandSimpleCharacters has cognitive complexity 38 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. Note what this body is, though: it works in explicit hardware vector and instruction-set types. A kernel divided across a call boundary passes its vectors between the parts and depends on the runtime putting them back together, so the division can cost more than the complexity it removes. The measurement stands — a hot path is not a licence to be unreadable — but the move that pays here is to lift the COLD parts out first (argument validation, fallback and error paths, one-off setup) and leave the kernel whole. Where the kernel itself has to be divided, ask for the extracted parts to be inlined as well, and measure the result rather than assuming the division is free.
LsmView.Select (cognitive 38) BTDB.LSM/Engine/LsmView.cs:128— LsmView.Select has cognitive complexity 38 (threshold 15). Of this number, 35 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SpanByteLruCache.AddKey (cognitive 37) BTDB/Collections/SpanByteLruCache.cs:270— SpanByteLruCache.AddKey has cognitive complexity 37 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
TypeSerializers.LoaderFactory (cognitive 37) BTDB/EventStoreLayer/TypeSerializers.cs:314— TypeSerializers.LoaderFactory has cognitive complexity 37 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
PtrLenList.TryExclude (cognitive 37) BTDB/KVDBLayer/Helpers/PtrLenList.cs:50— PtrLenList.TryExclude has cognitive complexity 37 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RelationAdvancedEnumerator.CreateCursors (cognitive 37) BTDB/ODBLayer/RelationEnumerator.cs:640— RelationAdvancedEnumerator.CreateCursors has cognitive complexity 37 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ReplicationMeasurements.PipelineRunAsync (cognitive 37) DBBenchmark/Replication/ReplicationMeasurements.cs:247— ReplicationMeasurements.PipelineRunAsync has cognitive complexity 37 (threshold 15). Most of this is not in the body itself: 7 of the 37 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 263, 285). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
SourceGenerator.BuildIndexInfo (cognitive 36) BTDB.SourceGenerator/Main.cs:4358— SourceGenerator.BuildIndexInfo has cognitive complexity 36 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CheckpointPublisher.PublishAsync (cognitive 36) BTDB.Replication/CheckpointPublisher.cs:31— CheckpointPublisher.PublishAsync has cognitive complexity 36 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BTreeImpl12.FastIterate (cognitive 35) BTDB/BTreeLib/BTreeImpl12.cs:2672— BTreeImpl12.FastIterate has cognitive complexity 35 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FullNameTypeMapper.ToType (cognitive 35) BTDB/EventStoreLayer/FullNameTypeMapper.cs:59— FullNameTypeMapper.ToType has cognitive complexity 35 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MemReader.ReadStringOrdered (cognitive 35) BTDB/StreamLayer/MemReader.cs:722— MemReader.ReadStringOrdered has cognitive complexity 35 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Program.Main (cognitive 35) AotQuerySmoke/Program.cs:51— Program.Main has cognitive complexity 35 (threshold 15). Most of this is not in the body itself: 9 of the 35 points are its own statements and the rest belongs to 24 function literals inside it that branch (lines 116, 118, 94, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
BTreeBranch.EraseRange (cognitive 34) BTDB/KVDBLayer/BTreeMem/BTreeBranch.cs:330— BTreeBranch.EraseRange has cognitive complexity 34 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EventLogStorageReader.FirstOffsetAsync (cognitive 34) BTDB.Replication/EventLog/EventLogStorageReader.cs:181— EventLogStorageReader.FirstOffsetAsync has cognitive complexity 34 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HttpReplicationPeerTransport.HandleAsync (cognitive 34) BTDB.Replication.Http/HttpReplicationPeerTransport.cs:80— HttpReplicationPeerTransport.HandleAsync has cognitive complexity 34 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BTreeImpl12.UpdateKeySuffix (cognitive 33) BTDB/BTreeLib/BTreeImpl12.cs:1843— BTreeImpl12.UpdateKeySuffix has cognitive complexity 33 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PackUnpack.DetectLengthOfSimpleCharacters (cognitive 33) BTDB/Buffer/PackUnpack.cs:1066— PackUnpack.DetectLengthOfSimpleCharacters has cognitive complexity 33 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. Note what this body is, though: it works in explicit hardware vector and instruction-set types. A kernel divided across a call boundary passes its vectors between the parts and depends on the runtime putting them back together, so the division can cost more than the complexity it removes. The measurement stands — a hot path is not a licence to be unreadable — but the move that pays here is to lift the COLD parts out first (argument validation, fallback and error paths, one-off setup) and leave the kernel whole. Where the kernel itself has to be divided, ask for the extracted parts to be inlined as well, and measure the result rather than assuming the division is free.
DefaultTypeConvertorGenerator.GenerateConversion (cognitive 33) REDACTED:68— DefaultTypeConvertorGenerator.GenerateConversion has cognitive complexity 33 (threshold 15). Of this number, 27 points are the body's own statements and 6 belong to 4 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
Interpreter.StringOp (cognitive 33) BTDB/Interpreter/Interpreter.cs:2709— Interpreter.StringOp has cognitive complexity 33 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RelationQueryProjection.RelationQueryProjection.ctor (cognitive 33) BTDB/ODBLayer/RelationQuery.cs:4948— RelationQueryProjection.RelationQueryProjection.ctor has cognitive complexity 33 (threshold 15). 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.
RelationQueryShapeBuilder.WalkNode (cognitive 33) BTDB/ODBLayer/RelationQueryCache.cs:291— RelationQueryShapeBuilder.WalkNode has cognitive complexity 33 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MemReader.ReadStringOrderedAsSpan (cognitive 33) BTDB/StreamLayer/MemReader.cs:810— MemReader.ReadStringOrderedAsSpan has cognitive complexity 33 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LeadershipActivation.ValidateAsync (cognitive 33) BTDB.Replication/LeadershipActivation.cs:95— LeadershipActivation.ValidateAsync has cognitive complexity 33 (threshold 15). Of this number, 31 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AzureReplicationStorage.WriteAsync (cognitive 33) BTDB.Replication.Azure/AzureReplicationStorage.cs:121— AzureReplicationStorage.WriteAsync has cognitive complexity 33 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. Note what this body is, though: it works in explicit hardware vector and instruction-set types. A kernel divided across a call boundary passes its vectors between the parts and depends on the runtime putting them back together, so the division can cost more than the complexity it removes. The measurement stands — a hot path is not a licence to be unreadable — but the move that pays here is to lift the COLD parts out first (argument validation, fallback and error paths, one-off setup) and leave the kernel whole. Where the kernel itself has to be divided, ask for the extracted parts to be inlined as well, and measure the result rather than assuming the division is free.
ActionPlanner.Expire (cognitive 33) BTDB.BackendActions/ActionPlanner.cs:542— ActionPlanner.Expire has cognitive complexity 33 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BTreeImpl12.CalcCommonPrefixExcept (cognitive 32) BTDB/BTreeLib/BTreeImpl12.cs:2094— BTreeImpl12.CalcCommonPrefixExcept has cognitive complexity 32 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Constraint.Constraint.ctor (cognitive 32) BTDB/ODBLayer/Constraint.cs:75— Constraint.Constraint.ctor has cognitive complexity 32 (threshold 15). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
RelationDBManipulator.ShallowRemoveById (cognitive 32) BTDB/ODBLayer/RelationDBManipulator.cs:661— RelationDBManipulator.ShallowRemoveById has cognitive complexity 32 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
RelationQueryCompiler.CompilePlan (cognitive 32) BTDB/ODBLayer/RelationQuery.cs:2043— RelationQueryCompiler.CompilePlan has cognitive complexity 32 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Program.Main (cognitive 32) DBBenchmark/Program.cs:8— Program.Main has cognitive complexity 32 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
CanonicalTrlPublisher.BuildPlan (cognitive 32) BTDB.Replication/CanonicalTrlPublisher.cs:277— CanonicalTrlPublisher.BuildPlan has cognitive complexity 32 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. Note what this body is, though: it works in explicit hardware vector and instruction-set types. A kernel divided across a call boundary passes its vectors between the parts and depends on the runtime putting them back together, so the division can cost more than the complexity it removes. The measurement stands — a hot path is not a licence to be unreadable — but the move that pays here is to lift the COLD parts out first (argument validation, fallback and error paths, one-off setup) and leave the kernel whole. Where the kernel itself has to be divided, ask for the extracted parts to be inlined as well, and measure the result rather than assuming the division is free.
.GenerateLoadEx (cognitive 31) BTDB/EventStoreLayer/TypeDescriptorExtensions.cs:98— .GenerateLoadEx has cognitive complexity 31 (threshold 15). Most of this is not in the body itself: 11 of the 31 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 141, 119). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
RelationInfo.CreateSaver (cognitive 31) BTDB/ODBLayer/RelationInfo.cs:2272— RelationInfo.CreateSaver has cognitive complexity 31 (threshold 15). Of this number, 28 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EventDeserializer.ProcessMetadataLog (cognitive 30) BTDB/EventStore2Layer/EventDeserializer.cs:160— EventDeserializer.ProcessMetadataLog has cognitive complexity 30 (threshold 15). Of this number, 22 points are the body's own statements and 8 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.
BuildFromTypeCtx.Create (cognitive 30) BTDB/EventStoreLayer/TypeSerializers.cs:149— BuildFromTypeCtx.Create has cognitive complexity 30 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BTreeImpl12.Find (cognitive 29) BTDB/BTreeLib/BTreeImpl12.cs:1329— BTreeImpl12.Find has cognitive complexity 29 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EnumFieldHandler.Save (cognitive 29) BTDB/FieldHandler/EnumFieldHandler.cs:328— EnumFieldHandler.Save has cognitive complexity 29 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
KeyValueDBExportImporter.ImportAsync (cognitive 29) BTDB/KVDBLayer/Helpers/KeyValueDBExportImporter.cs:118— KeyValueDBExportImporter.ImportAsync has cognitive complexity 29 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (KeyValueDBExportImporter.Import) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
KeyValueDBExportImporter.Import (cognitive 29) BTDB/KVDBLayer/Helpers/KeyValueDBExportImporter.cs:169— KeyValueDBExportImporter.Import has cognitive complexity 29 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (KeyValueDBExportImporter.ImportAsync) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
RelationQueryCompiler.EmitCompare (cognitive 29) BTDB/ODBLayer/RelationQuery.cs:3214— RelationQueryCompiler.EmitCompare has cognitive complexity 29 (threshold 15). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
RelationQueryCallSite.Child (cognitive 29) BTDB/ODBLayer/RelationQueryInterception.cs:427— RelationQueryCallSite.Child has cognitive complexity 29 (threshold 15). 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.
EventLogStorageReader.FindTailAsync (cognitive 29) BTDB.Replication/EventLog/EventLogStorageReader.cs:58— EventLogStorageReader.FindTailAsync has cognitive complexity 29 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LeaderTrlReader.ReadInlineAsync (cognitive 29) BTDB.Replication/LeaderTrlReader.cs:52— LeaderTrlReader.ReadInlineAsync has cognitive complexity 29 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BTreeBranch.CreateOrUpdate (cognitive 28) BTDB/KVDBLayer/BTreeMem/BTreeBranch.cs:76— BTreeBranch.CreateOrUpdate has cognitive complexity 28 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PtrLenList.TryInclude (cognitive 28) BTDB/KVDBLayer/Helpers/PtrLenList.cs:159— PtrLenList.TryInclude has cognitive complexity 28 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RelationQuery.ExecuteWindowed (cognitive 28) BTDB/ODBLayer/RelationQuery.cs:538— RelationQuery.ExecuteWindowed has cognitive complexity 28 (threshold 15). Of this number, 26 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RelationQueryRangeBuilder.Build (cognitive 28) BTDB/ODBLayer/RelationQuery.cs:5613— RelationQueryRangeBuilder.Build has cognitive complexity 28 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FastBehaviourSubject.Unsubscribe (cognitive 28) BTDB/Reactive/FastBehaviourSubject.cs:175— FastBehaviourSubject.Unsubscribe has cognitive complexity 28 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SnappyCompress.Compress (cognitive 28) BTDB/SnappyCompression/SnappyCompress.cs:145— SnappyCompress.Compress has cognitive complexity 28 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Program.MainAsync (cognitive 28) Releaser/Releaser/Program.cs:22— Program.MainAsync has cognitive complexity 28 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
EventLogTopic.PublishLoopAsync (cognitive 28) BTDB.Replication/EventLog/EventLogService.cs:202— EventLogTopic.PublishLoopAsync has cognitive complexity 28 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ReplicationPeerPoll.Validate (cognitive 28) BTDB.Replication/ReplicationPeerTransport.cs:42— ReplicationPeerPoll.Validate has cognitive complexity 28 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ActionWorker.Apply (cognitive 28) BTDB.BackendActions/ActionWorker.cs:102— ActionWorker.Apply has cognitive complexity 28 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TupleTypeDescriptor.GenerateLoad (cognitive 27) BTDB/EventStoreLayer/TupleTypeDescriptor.cs:165— TupleTypeDescriptor.GenerateLoad has cognitive complexity 27 (threshold 15). Of this number, 20 points are the body's own statements and 7 belong to 3 function literals inside it that branch. 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.
EmitHelpers.ToSimpleName (cognitive 27) BTDB/IL/EmitHelpers.cs:131— EmitHelpers.ToSimpleName has cognitive complexity 27 (threshold 15). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
BTreeBranch.EraseOne (cognitive 27) BTDB/KVDBLayer/BTreeMem/BTreeBranch.cs:420— BTreeBranch.EraseOne has cognitive complexity 27 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RelationInfo.CreateBeforeRemoveByReflection (cognitive 27) BTDB/ODBLayer/RelationInfo.cs:2192— RelationInfo.CreateBeforeRemoveByReflection has cognitive complexity 27 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RelationQuery.ExecuteElement (cognitive 27) BTDB/ODBLayer/RelationQuery.cs:756— RelationQuery.ExecuteElement has cognitive complexity 27 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
RelationQueryAstBuilder.BuildSource (cognitive 27) BTDB/ODBLayer/RelationQuery.cs:946— RelationQueryAstBuilder.BuildSource has cognitive complexity 27 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EventLogStorageReader.TryLocateAsync (cognitive 27) BTDB.Replication/EventLog/EventLogStorageReader.cs:234— EventLogStorageReader.TryLocateAsync has cognitive complexity 27 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ActionPlanner.Update (cognitive 27) BTDB.BackendActions/ActionPlanner.cs:363— ActionPlanner.Update has cognitive complexity 27 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ObjectTypeDescriptor.GenerateLoad (cognitive 26) BTDB/EventStoreLayer/ObjectTypeDescriptor.cs:232— ObjectTypeDescriptor.GenerateLoad has cognitive complexity 26 (threshold 15). Of this number, 23 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.
SingleRegistration.CollectDependencies (cognitive 26) BTDB/IOC/SingleRegistration.cs:128— SingleRegistration.CollectDependencies has cognitive complexity 26 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RelationQueryCompiler.FindEqualityValues (cognitive 26) BTDB/ODBLayer/RelationQuery.cs:2335— RelationQueryCompiler.FindEqualityValues has cognitive complexity 26 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ReplicationMeasurements.CompareRunAsync (cognitive 26) DBBenchmark/Replication/ReplicationMeasurements.cs:372— ReplicationMeasurements.CompareRunAsync has cognitive complexity 26 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ReplicationMeasurements.RestoreAsync (cognitive 26) DBBenchmark/Replication/ReplicationMeasurements.cs:550— ReplicationMeasurements.RestoreAsync has cognitive complexity 26 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LeadershipActivation.ActivateAsync (cognitive 26) BTDB.Replication/LeadershipActivation.cs:28— LeadershipActivation.ActivateAsync has cognitive complexity 26 (threshold 15). Of this number, 23 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BTreeImpl12.FindExact (cognitive 25) BTDB/BTreeLib/BTreeImpl12.cs:1098— BTreeImpl12.FindExact has cognitive complexity 25 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DiskChunkCache.PreserveJustMostOftenUsed (cognitive 25) BTDB/ChunkCache/DiskChunkCache.cs:323— DiskChunkCache.PreserveJustMostOftenUsed has cognitive complexity 25 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LruCache.Remove (cognitive 25) BTDB/Collections/LruCache.cs:119— LruCache.Remove has cognitive complexity 25 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LruCache.AddKey (cognitive 25) BTDB/Collections/LruCache.cs:249— LruCache.AddKey has cognitive complexity 25 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
ObjectDBTransaction.StoreIfNotInlined (cognitive 25) BTDB/ODBLayer/ObjectDBTransaction.cs:749— ObjectDBTransaction.StoreIfNotInlined has cognitive complexity 25 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ODBSet.RemoveRange (cognitive 25) BTDB/ODBLayer/ODBSet.cs:327— ODBSet.RemoveRange has cognitive complexity 25 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MemReader.ReadString (cognitive 25) BTDB/StreamLayer/MemReader.cs:529— MemReader.ReadString has cognitive complexity 25 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. Note what this body is, though: it works in explicit hardware vector and instruction-set types, and it works in raw pointers or stack-allocated memory, whose lifetime is this stack frame. A kernel divided across a call boundary passes its vectors between the parts and depends on the runtime putting them back together, so the division can cost more than the complexity it removes. Anything extracted from it has to take that memory as a parameter rather than reach for it. The measurement stands — a hot path is not a licence to be unreadable — but the move that pays here is to lift the COLD parts out first (argument validation, fallback and error paths, one-off setup) and leave the kernel whole. Where the kernel itself has to be divided, ask for the extracted parts to be inlined as well, and measure the result rather than assuming the division is free.
LsmDurableBenchmark.RunCaseAsync (cognitive 25) DBBenchmark/LSM/LsmDurableBenchmark.cs:166— LsmDurableBenchmark.RunCaseAsync has cognitive complexity 25 (threshold 15). Most of this is not in the body itself: 5 of the 25 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 210, 235, 200). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
SourceGenerator.CheckParamsNamesAndTypes (cognitive 25) BTDB.SourceGenerator/Main.cs:1337— SourceGenerator.CheckParamsNamesAndTypes has cognitive complexity 25 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EventLogOptions.Validate (cognitive 25) BTDB.Replication/EventLog/EventLogOptions.cs:120— EventLogOptions.Validate has cognitive complexity 25 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
LeadershipSession.ActivateAsync (cognitive 25) BTDB.Replication/LeadershipSession.cs:51— LeadershipSession.ActivateAsync has cognitive complexity 25 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ReplicationFileSet.DownloadAsync (cognitive 25) BTDB.Replication/ReplicationFileSet.cs:133— ReplicationFileSet.DownloadAsync has cognitive complexity 25 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. Note what this body is, though: it works in explicit hardware vector and instruction-set types. A kernel divided across a call boundary passes its vectors between the parts and depends on the runtime putting them back together, so the division can cost more than the complexity it removes. The measurement stands — a hot path is not a licence to be unreadable — but the move that pays here is to lift the COLD parts out first (argument validation, fallback and error paths, one-off setup) and leave the kernel whole. Where the kernel itself has to be divided, ask for the extracted parts to be inlined as well, and measure the result rather than assuming the division is free.
SpanByteLruCache.Remove (cognitive 24) BTDB/Collections/SpanByteLruCache.cs:139— SpanByteLruCache.Remove has cognitive complexity 24 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Compactor.RunCore (cognitive 24) BTDB/KVDBLayer/Implementation/Compactor.cs:118— Compactor.RunCore has cognitive complexity 24 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ODBIterator.IterateRoaringBitmap (cognitive 24) BTDB/ODBLayer/ODBIterator.cs:458— ODBIterator.IterateRoaringBitmap has cognitive complexity 24 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RelationDBManipulator.RemoveById (cognitive 24) BTDB/ODBLayer/RelationDBManipulator.cs:554— RelationDBManipulator.RemoveById has cognitive complexity 24 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
RelationQueryCallSite.TryPrepare (cognitive 24) BTDB/ODBLayer/RelationQueryInterception.cs:259— RelationQueryCallSite.TryPrepare has cognitive complexity 24 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TableInfo.CreateInitializer (cognitive 24) BTDB/ODBLayer/TableInfo.cs:163— TableInfo.CreateInitializer has cognitive complexity 24 (threshold 15). Of this number, 20 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TableInfo.EnsureClientTypeVersion (cognitive 24) BTDB/ODBLayer/TableInfo.cs:453— TableInfo.EnsureClientTypeVersion has cognitive complexity 24 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MemReader.SkipString (cognitive 24) BTDB/StreamLayer/MemReader.cs:919— MemReader.SkipString has cognitive complexity 24 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. Note what this body is, though: it works in explicit hardware vector and instruction-set types, and it works in raw pointers or stack-allocated memory, whose lifetime is this stack frame. A kernel divided across a call boundary passes its vectors between the parts and depends on the runtime putting them back together, so the division can cost more than the complexity it removes. Anything extracted from it has to take that memory as a parameter rather than reach for it. The measurement stands — a hot path is not a licence to be unreadable — but the move that pays here is to lift the COLD parts out first (argument validation, fallback and error paths, one-off setup) and leave the kernel whole. Where the kernel itself has to be divided, ask for the extracted parts to be inlined as well, and measure the result rather than assuming the division is free.
EventLogEndToEnd.RunAsync (cognitive 24) DBBenchmark/EventLog/EventLogEndToEnd.cs:32— EventLogEndToEnd.RunAsync has cognitive complexity 24 (threshold 15). Of this number, 15 points are the body's own statements and 9 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SourceGenerator.FindDispatcherMethods (cognitive 24) BTDB.SourceGenerator/Main.cs:2975— SourceGenerator.FindDispatcherMethods has cognitive complexity 24 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Bon.DumpToJson (cognitive 23) BTDB/Bon/Bon.cs:1372— Bon.DumpToJson has cognitive complexity 23 (threshold 15). 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.
BTreeImpl12.OverwriteInEraseFromBranch (cognitive 23) BTDB/BTreeLib/BTreeImpl12.cs:600— BTreeImpl12.OverwriteInEraseFromBranch has cognitive complexity 23 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BTreeImpl12.KeyValueIterate (cognitive 23) BTDB/BTreeLib/BTreeImpl12.cs:2519— BTreeImpl12.KeyValueIterate has cognitive complexity 23 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ContainerImpl.CreateServiceProviderFactoryCacheValue (cognitive 23) BTDB/IOC/ContainerImpl.cs:283— ContainerImpl.CreateServiceProviderFactoryCacheValue has cognitive complexity 23 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ObjectDBTransaction.Enumerate (cognitive 23) BTDB/ODBLayer/ObjectDBTransaction.cs:210— ObjectDBTransaction.Enumerate has cognitive complexity 23 (threshold 15). Of this number, 16 points are the body's own statements and 7 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RelationVersionInfo.CreateSecondaryKeyInfo (cognitive 23) BTDB/ODBLayer/RelationVersionInfo.cs:93— RelationVersionInfo.CreateSecondaryKeyInfo has cognitive complexity 23 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PlannerScenario.Create (cognitive 23) DBBenchmark/BackendActions/PlannerScenario.cs:53— PlannerScenario.Create has cognitive complexity 23 (threshold 15). None of this is in the body itself: all 23 points belong to 11 function literals inside it that branch (lines 156, 174, 192, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
EventLogOwnerLane.RunAsync (cognitive 23) BTDB.Replication/EventLog/EventLogOwnerLane.cs:354— EventLogOwnerLane.RunAsync has cognitive complexity 23 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WalReplay.Apply (cognitive 23) BTDB.LSM/LsmKeyValueDB.Recovery.cs:50— WalReplay.Apply has cognitive complexity 23 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BTreeImpl12.CalcCommonPrefix (cognitive 22) BTDB/BTreeLib/BTreeImpl12.cs:2006— BTreeImpl12.CalcCommonPrefix has cognitive complexity 22 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EventSerializer.ProcessMetadataLog (cognitive 22) BTDB/EventStore2Layer/EventSerializer.cs:273— EventSerializer.ProcessMetadataLog has cognitive complexity 22 (threshold 15). Of this number, 18 points are the body's own statements and 4 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.
.GenerateLoadEx (cognitive 22) BTDB/EventStoreLayer/TypeDescriptorExtensions.cs:172— .GenerateLoadEx has cognitive complexity 22 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
DBObjectFieldHandler.UpdateNeedsFreeContent (cognitive 22) BTDB/FieldHandler/DBObjectFieldHandler.cs:319— DBObjectFieldHandler.UpdateNeedsFreeContent has cognitive complexity 22 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RelationQueryWindow.MoveNext (cognitive 22) BTDB/ODBLayer/RelationQuery.cs:4715— RelationQueryWindow.MoveNext has cognitive complexity 22 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SourceGenerator.ValidateUpdateByIdValueParameters (cognitive 22) BTDB.SourceGenerator/Main.cs:1220— SourceGenerator.ValidateUpdateByIdValueParameters has cognitive complexity 22 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LsmKeyValueDB.WorkerLoop (cognitive 22) BTDB.LSM/LsmKeyValueDB.Background.cs:61— LsmKeyValueDB.WorkerLoop has cognitive complexity 22 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
LsmKeyValueDB.CatchUpAsync (cognitive 22) BTDB.LSM/LsmKeyValueDB.Reader.cs:47— LsmKeyValueDB.CatchUpAsync has cognitive complexity 22 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Execution.RunAsync (cognitive 22) BTDB.BackendActions/ActionWorker.cs:206— Execution.RunAsync has cognitive complexity 22 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BTreeImpl12.FindFirst (cognitive 21) BTDB/BTreeLib/BTreeImpl12.cs:1408— BTreeImpl12.FindFirst has cognitive complexity 21 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BTreeImpl12.TestTreeCorrectness (cognitive 21) BTDB/BTreeLib/BTreeImpl12.cs:2583— BTreeImpl12.TestTreeCorrectness has cognitive complexity 21 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DiskChunkCache.CompactionCore (cognitive 21) BTDB/ChunkCache/DiskChunkCache.cs:256— DiskChunkCache.CompactionCore has cognitive complexity 21 (threshold 15). Of this number, 18 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TupleTypeDescriptor.GenerateNewDescriptor (cognitive 21) BTDB/EventStoreLayer/TupleTypeDescriptor.cs:364— TupleTypeDescriptor.GenerateNewDescriptor has cognitive complexity 21 (threshold 15). Of this number, 15 points are the body's own statements and 6 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CompactorScheduler.OnTimer (cognitive 21) BTDB/KVDBLayer/Implementation/CompactorScheduler.cs:94— CompactorScheduler.OnTimer has cognitive complexity 21 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ObjectDBTransaction.GetRelation (cognitive 21) BTDB/ODBLayer/ObjectDBTransaction.cs:468— ObjectDBTransaction.GetRelation has cognitive complexity 21 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ObjectDBTransaction.Store (cognitive 21) BTDB/ODBLayer/ObjectDBTransaction.cs:610— ObjectDBTransaction.Store has cognitive complexity 21 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (ObjectDBTransaction.StoreAndFlush) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
ObjectDBTransaction.StoreAndFlush (cognitive 21) BTDB/ODBLayer/ObjectDBTransaction.cs:667— ObjectDBTransaction.StoreAndFlush has cognitive complexity 21 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (ObjectDBTransaction.Store) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
ODBIterator.IterateLazyUlongList (cognitive 21) BTDB/ODBLayer/ODBIterator.cs:506— ODBIterator.IterateLazyUlongList has cognitive complexity 21 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RelationQueryScanner.Aggregate (cognitive 21) BTDB/ODBLayer/RelationQuery.cs:4403— RelationQueryScanner.Aggregate has cognitive complexity 21 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RelationQueryProjection.Construct (cognitive 21) BTDB/ODBLayer/RelationQuery.cs:5149— RelationQueryProjection.Construct has cognitive complexity 21 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RelationQueryAggregator.Create (cognitive 21) BTDB/ODBLayer/RelationQuery.cs:5343— RelationQueryAggregator.Create has cognitive complexity 21 (threshold 15). 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.
RelationQueryCallSite.Record (cognitive 21) BTDB/ODBLayer/RelationQueryInterception.cs:296— RelationQueryCallSite.Record has cognitive complexity 21 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SourceGenerator.FindHiddenDependency (cognitive 21) BTDB.SourceGenerator/Main.cs:2296— SourceGenerator.FindHiddenDependency has cognitive complexity 21 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ReplicationMaintenance.RunDueAsync (cognitive 21) BTDB.Replication/RemoteMaintenance.cs:86— ReplicationMaintenance.RunDueAsync has cognitive complexity 21 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BTreeImpl12.CalcCommonPrefix (cognitive 20) BTDB/BTreeLib/BTreeImpl12.cs:2049— BTreeImpl12.CalcCommonPrefix has cognitive complexity 20 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PackUnpack.WidenAsciiToUtf16Simd (cognitive 20) BTDB/Buffer/PackUnpack.cs:807— PackUnpack.WidenAsciiToUtf16Simd has cognitive complexity 20 (threshold 15). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level. Note what this body is, though: it works in explicit hardware vector and instruction-set types, and it works in raw pointers or stack-allocated memory, whose lifetime is this stack frame. A kernel divided across a call boundary passes its vectors between the parts and depends on the runtime putting them back together, so the division can cost more than the complexity it removes. Anything extracted from it has to take that memory as a parameter rather than reach for it. The measurement stands — a hot path is not a licence to be unreadable — but the move that pays here is to lift the COLD parts out first (argument validation, fallback and error paths, one-off setup) and leave the kernel whole. Where the kernel itself has to be divided, ask for the extracted parts to be inlined as well, and measure the result rather than assuming the division is free.
RoaringBitmaps.Operate (cognitive 20) BTDB/Buffer/RoaringBitmaps.cs:246— RoaringBitmaps.Operate has cognitive complexity 20 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RefDictionary.TryGetValueSeqLock (cognitive 20) BTDB/Collections/RefDictionary.cs:137— RefDictionary.TryGetValueSeqLock has cognitive complexity 20 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TupleTypeDescriptor.GenerateLoad (cognitive 20) BTDB/EventStoreLayer/TupleTypeDescriptor.cs:444— TupleTypeDescriptor.GenerateLoad has cognitive complexity 20 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LongBitArray.TryGetNextUnset (cognitive 20) BTDB/ODBLayer/CompactorLeakDetector.cs:161— LongBitArray.TryGetNextUnset has cognitive complexity 20 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ODBDictionary.RemoveRange (cognitive 20) BTDB/ODBLayer/ODBDictionary.cs:537— ODBDictionary.RemoveRange has cognitive complexity 20 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RelationQueryTypes.TryGetStorage (cognitive 20) BTDB/ODBLayer/RelationQuery.cs:1479— RelationQueryTypes.TryGetStorage has cognitive complexity 20 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
RelationQueryTypes.DefaultValue (cognitive 20) BTDB/ODBLayer/RelationQuery.cs:1548— RelationQueryTypes.DefaultValue has cognitive complexity 20 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
RelationQueryCompiler.AnalyzeRangeField (cognitive 20) BTDB/ODBLayer/RelationQuery.cs:2244— RelationQueryCompiler.AnalyzeRangeField has cognitive complexity 20 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MemReader.SkipStringOrdered (cognitive 20) BTDB/StreamLayer/MemReader.cs:965— MemReader.SkipStringOrdered has cognitive complexity 20 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TrlFileReader.Iterate (cognitive 20) ODbDump/TrlDump/TrlFileReader.cs:24— TrlFileReader.Iterate has cognitive complexity 20 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AzureBlobFileCollection.CreateAsync (cognitive 20) BTDB.AzureStorage/AzureBlobFileCollection.cs:55— AzureBlobFileCollection.CreateAsync has cognitive complexity 20 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EventLogOwnerLane.ValidateAsync (cognitive 20) BTDB.Replication/EventLog/EventLogOwnerLane.cs:719— EventLogOwnerLane.ValidateAsync has cognitive complexity 20 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LeaderSelection.SelectAsync (cognitive 20) BTDB.Replication/LeaderSelection.cs:32— LeaderSelection.SelectAsync has cognitive complexity 20 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RemoteGarbageCollector.CollectAsync (cognitive 20) BTDB.Replication/RemoteMaintenance.cs:26— RemoteGarbageCollector.CollectAsync has cognitive complexity 20 (threshold 15). Of this number, 17 points are the body's own statements and 3 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TableReader.Enumerate (cognitive 20) BTDB.LSM/Format/Table.cs:686— TableReader.Enumerate has cognitive complexity 20 (threshold 15). Of this number, 17 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, 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.
ActionCoordinator.QueueDueAsync (cognitive 20) BTDB.BackendActions/ActionCoordinator.cs:191— ActionCoordinator.QueueDueAsync has cognitive complexity 20 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SpanByteNoRemoveDictionary.TryGetValueSeqLock (cognitive 19) BTDB/Collections/SpanByteNoRemoveDictionary.cs:146— SpanByteNoRemoveDictionary.TryGetValueSeqLock has cognitive complexity 19 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EventSerializer.BuildNestedObjGatherer (cognitive 19) BTDB/EventStore2Layer/EventSerializer.cs:124— EventSerializer.BuildNestedObjGatherer has cognitive complexity 19 (threshold 15). Of this number, 16 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EventSerializer.StoreNewDescriptors (cognitive 19) BTDB/EventStore2Layer/EventSerializer.cs:565— EventSerializer.StoreNewDescriptors has cognitive complexity 19 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
EventSerializer.MergeDescriptor (cognitive 19) BTDB/EventStore2Layer/EventSerializer.cs:630— EventSerializer.MergeDescriptor has cognitive complexity 19 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DictionaryTypeDescriptor.GenerateNewDescriptor (cognitive 19) BTDB/EventStoreLayer/DictionaryTypeDescriptor.cs:343— DictionaryTypeDescriptor.GenerateNewDescriptor has cognitive complexity 19 (threshold 15). Most of this is not in the body itself: 3 of the 19 points are its own statements and the rest belongs to one function literal inside it that branches (line 360). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
ListTypeDescriptor.GenerateLoad (cognitive 19) BTDB/EventStoreLayer/ListTypeDescriptor.cs:161— ListTypeDescriptor.GenerateLoad has cognitive complexity 19 (threshold 15). Most of this is not in the body itself: 3 of the 19 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 193, 229, 166). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
ObjectTypeDescriptor.GenerateLoad (cognitive 19) BTDB/EventStoreLayer/ObjectTypeDescriptor.cs:584— ObjectTypeDescriptor.GenerateLoad has cognitive complexity 19 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RegistrationBaseImpl.GetAsTypesFor (cognitive 19) BTDB/IOC/RegistrationBaseImpl.cs:40— RegistrationBaseImpl.GetAsTypesFor has cognitive complexity 19 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BTreeKeyValueDB.WriteKeyIndexFile (cognitive 19) BTDB/KVDBLayer/Implementation/BTreeKeyValueDB.cs:2576— BTreeKeyValueDB.WriteKeyIndexFile has cognitive complexity 19 (threshold 15). Most of this is not in the body itself: 4 of the 19 points are its own statements and the rest belongs to one function literal inside it that branches (line 2597). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
ExpressionConverter.ConvertCall (cognitive 19) BTDB/ODBLayer/RelationQuery.cs:1219— ExpressionConverter.ConvertCall has cognitive complexity 19 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RelationQueryResult.Read (cognitive 19) BTDB/ODBLayer/RelationQuery.cs:1788— RelationQueryResult.Read has cognitive complexity 19 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
RelationQueryCompiler.AnalyzeAccessPath (cognitive 19) BTDB/ODBLayer/RelationQuery.cs:2195— RelationQueryCompiler.AnalyzeAccessPath has cognitive complexity 19 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RelationQueryCompiler.SaveConstant (cognitive 19) BTDB/ODBLayer/RelationQuery.cs:3595— RelationQueryCompiler.SaveConstant has cognitive complexity 19 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (RelationQueryProjection.SetField) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
RelationQueryScanner.MovePrevious (cognitive 19) BTDB/ODBLayer/RelationQuery.cs:4251— RelationQueryScanner.MovePrevious has cognitive complexity 19 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RelationQueryScanner.MoveLast (cognitive 19) BTDB/ODBLayer/RelationQuery.cs:4345— RelationQueryScanner.MoveLast has cognitive complexity 19 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RelationQueryProjection.SetField (cognitive 19) BTDB/ODBLayer/RelationQuery.cs:5279— RelationQueryProjection.SetField has cognitive complexity 19 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (RelationQueryCompiler.SaveConstant) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
BonSerializerFactory.SimpleType2String (cognitive 19) BTDB/Serialization/BonSerializer.cs:1682— BonSerializerFactory.SimpleType2String has cognitive complexity 19 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Extensions.AttributeUsage (cognitive 19) BTDB.SourceGenerator/Extensions.cs:68— Extensions.AttributeUsage has cognitive complexity 19 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RelationQueryInterceptorGenerator.IsSupported (cognitive 19) BTDB.SourceGenerator/RelationQueryInterceptorGenerator.cs:114— RelationQueryInterceptorGenerator.IsSupported has cognitive complexity 19 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EventLogMerger.KeepFromAsync (cognitive 19) BTDB.Replication/EventLog/EventLogMerger.cs:113— EventLogMerger.KeepFromAsync has cognitive complexity 19 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EventLogMerger.MergeGroupAsync (cognitive 19) BTDB.Replication/EventLog/EventLogMerger.cs:198— EventLogMerger.MergeGroupAsync has cognitive complexity 19 (threshold 15). Of this number, 18 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RoaringBitmaps.RunIntervalAndNot (cognitive 18) BTDB/Buffer/RoaringBitmaps.cs:647— RoaringBitmaps.RunIntervalAndNot has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AppendingEventStore.SerializeIntoBuffer (cognitive 18) BTDB/EventStoreLayer/AppendingEventStore.cs:67— AppendingEventStore.SerializeIntoBuffer has cognitive complexity 18 (threshold 15). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
TupleFieldHandler.Load (cognitive 18) BTDB/FieldHandler/TupleFieldHandler.cs:225— TupleFieldHandler.Load has cognitive complexity 18 (threshold 15). Of this number, 14 points are the body's own statements and 4 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.
MultiRegistration.Register (cognitive 18) BTDB/IOC/MultiRegistration.cs:77— MultiRegistration.Register has cognitive complexity 18 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline. This shape REPEATS in the file: one other method here (MultiRegistration.RegisterForServiceCollection) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
MultiRegistration.RegisterForServiceCollection (cognitive 18) BTDB/IOC/MultiRegistration.cs:113— MultiRegistration.RegisterForServiceCollection has cognitive complexity 18 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline. This shape REPEATS in the file: one other method here (MultiRegistration.Register) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
BTreeKeyValueDBCursor.FindNextKey (cognitive 18) BTDB/KVDBLayer/Implementation/BTreeKeyValueDBCursor.cs:180— BTreeKeyValueDBCursor.FindNextKey has cognitive complexity 18 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
BTreeKeyValueDBCursor.NotifyRemove (cognitive 18) BTDB/KVDBLayer/Implementation/BTreeKeyValueDBCursor.cs:684— BTreeKeyValueDBCursor.NotifyRemove has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ObjectDBTransaction.Delete (cognitive 18) BTDB/ODBLayer/ObjectDBTransaction.cs:950— ObjectDBTransaction.Delete has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AdvancedEnumerator.NextKey (cognitive 18) BTDB/ODBLayer/ODBDictionary.cs:856— AdvancedEnumerator.NextKey has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AdvancedEnumerator.MoveNext (cognitive 18) BTDB/ODBLayer/ODBSet.cs:483— AdvancedEnumerator.MoveNext has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RelationDBManipulator.RemoveByPrimaryKeyPrefix (cognitive 18) BTDB/ODBLayer/RelationDBManipulator.cs:735— RelationDBManipulator.RemoveByPrimaryKeyPrefix has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RelationDBManipulator.CountWithProposition (cognitive 18) BTDB/ODBLayer/RelationDBManipulator.cs:913— RelationDBManipulator.CountWithProposition has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RelationDBManipulator.PrepareOrderers (cognitive 18) BTDB/ODBLayer/RelationDBManipulator.cs:1298— RelationDBManipulator.PrepareOrderers has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (RelationDBManipulator.PrepareOrderersSK) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
RelationDBManipulator.RemoveWithSizesByPrimaryKey (cognitive 18) BTDB/ODBLayer/RelationDBManipulator.cs:1342— RelationDBManipulator.RemoveWithSizesByPrimaryKey has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RelationDBManipulator.PrepareOrderersSK (cognitive 18) BTDB/ODBLayer/RelationDBManipulator.cs:1566— RelationDBManipulator.PrepareOrderersSK has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (RelationDBManipulator.PrepareOrderers) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
RelationConstraintEnumerator.FastGather (cognitive 18) BTDB/ODBLayer/RelationEnumerator.cs:345— RelationConstraintEnumerator.FastGather has cognitive complexity 18 (threshold 15). Most of this is not in the body itself: 7 of the 18 points are its own statements and the rest belongs to one function literal inside it that branches (line 378). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
RelationAdvancedEnumerator.MoveNext (cognitive 18) BTDB/ODBLayer/RelationEnumerator.cs:759— RelationAdvancedEnumerator.MoveNext has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (RelationAdvancedOrderedEnumerator.NextKey) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
RelationAdvancedOrderedEnumerator.NextKey (cognitive 18) BTDB/ODBLayer/RelationEnumerator.cs:1150— RelationAdvancedOrderedEnumerator.NextKey has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (RelationAdvancedEnumerator.MoveNext) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
RelationInfo.CheckThatPrimaryKeyHasNotChanged (cognitive 18) BTDB/ODBLayer/RelationInfo.cs:1046— RelationInfo.CheckThatPrimaryKeyHasNotChanged has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RelationQueryTypes.WriteStorage (cognitive 18) BTDB/ODBLayer/RelationQuery.cs:1579— RelationQueryTypes.WriteStorage has cognitive complexity 18 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
RelationQueryTypes.CreateSet (cognitive 18) BTDB/ODBLayer/RelationQuery.cs:1602— RelationQueryTypes.CreateSet has cognitive complexity 18 (threshold 15). Of this number, 17 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
RelationQueryCallSite.Locate (cognitive 18) BTDB/ODBLayer/RelationQueryInterception.cs:385— RelationQueryCallSite.Locate has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RelationVersionInfo.RelationVersionInfo.ctor (cognitive 18) BTDB/ODBLayer/RelationVersionInfo.cs:186— RelationVersionInfo.RelationVersionInfo.ctor has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BonSerializerFactory.DeserializeObject (cognitive 18) BTDB/Serialization/BonSerializer.cs:796— BonSerializerFactory.DeserializeObject has cognitive complexity 18 (threshold 15). 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.
RawData.GetSizeAndAlign (cognitive 18) BTDB/Serialization/RawData.cs:201— RawData.GetSizeAndAlign has cognitive complexity 18 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
LsmSpillBenchmark.RunAsync (cognitive 18) DBBenchmark/LSM/LsmSpillBenchmark.cs:124— LsmSpillBenchmark.RunAsync has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SourceGenerator.GenerateCode (cognitive 18) BTDB.SourceGenerator/Main.cs:3081— SourceGenerator.GenerateCode has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LiveSubscription.NextAsync (cognitive 18) BTDB.Replication/EventLog/EventLogService.cs:940— LiveSubscription.NextAsync has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LsmKeyValueDB.WalLoop (cognitive 18) BTDB.LSM/LsmKeyValueDB.Wal.cs:50— LsmKeyValueDB.WalLoop has cognitive complexity 18 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
ActionCoordinator.RunAsync (cognitive 18) BTDB.BackendActions/ActionCoordinator.cs:66— ActionCoordinator.RunAsync has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ActionPlanner.Candidate (cognitive 18) BTDB.BackendActions/ActionPlanner.cs:660— ActionPlanner.Candidate has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BackendActions.Queue (cognitive 18) BTDB.BackendActions/BackendActions.cs:436— BackendActions.Queue has cognitive complexity 18 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
BackendActions.Import (cognitive 18) BTDB.BackendActions/Import.cs:61— BackendActions.Import has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IntervalResultBuilder.FlushPending (cognitive 17) BTDB/Buffer/RoaringBitmaps.cs:1172— IntervalResultBuilder.FlushPending has cognitive complexity 17 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TypeNewDescriptorGenerator.GenerateTypeIterator (cognitive 17) BTDB/EventStoreLayer/DictionaryTypeDescriptor.cs:487— TypeNewDescriptorGenerator.GenerateTypeIterator has cognitive complexity 17 (threshold 15). Most of this is not in the body itself: 6 of the 17 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 518, 534, 588, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
TupleTypeDescriptor.GenerateSave (cognitive 17) BTDB/EventStoreLayer/TupleTypeDescriptor.cs:283— TupleTypeDescriptor.GenerateSave has cognitive complexity 17 (threshold 15). Of this number, 11 points are the body's own statements and 6 belong to 3 function literals inside it that branch. 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.
TypeSerializersMapping.StoreNewDescriptors (cognitive 17) BTDB/EventStoreLayer/TypeSerializersMapping.cs:298— TypeSerializersMapping.StoreNewDescriptors has cognitive complexity 17 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DescriptorSerializerContext.StoreNewDescriptors (cognitive 17) BTDB/EventStoreLayer/TypeSerializersMapping.cs:429— DescriptorSerializerContext.StoreNewDescriptors has cognitive complexity 17 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Interpreter.HandleException (cognitive 17) BTDB/Interpreter/Interpreter.cs:2933— Interpreter.HandleException has cognitive complexity 17 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BTreeKeyValueDB.RevertWritingTransaction (cognitive 17) BTDB/KVDBLayer/Implementation/BTreeKeyValueDB.cs:2250— BTreeKeyValueDB.RevertWritingTransaction has cognitive complexity 17 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ObjectDBTransaction.Delete (cognitive 17) BTDB/ODBLayer/ObjectDBTransaction.cs:899— ObjectDBTransaction.Delete has cognitive complexity 17 (threshold 15). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
ODBIterator.IterateSecondaryIndexes (cognitive 17) BTDB/ODBLayer/ODBIterator.cs:286— ODBIterator.IterateSecondaryIndexes has cognitive complexity 17 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
RelationDBManipulator.ShallowUpsert (cognitive 17) BTDB/ODBLayer/RelationDBManipulator.cs:276— RelationDBManipulator.ShallowUpsert has cognitive complexity 17 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RelationInfo.CreateVersionInfoFromPrime (cognitive 17) BTDB/ODBLayer/RelationInfo.cs:2371— RelationInfo.CreateVersionInfoFromPrime has cognitive complexity 17 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RelationQueryCompiler.BuildPrimaryPrograms (cognitive 17) BTDB/ODBLayer/RelationQuery.cs:2123— RelationQueryCompiler.BuildPrimaryPrograms has cognitive complexity 17 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
RelationQueryCompiler.AddFrameConstant (cognitive 17) BTDB/ODBLayer/RelationQuery.cs:3525— RelationQueryCompiler.AddFrameConstant has cognitive complexity 17 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: 2 other methods here (RelationQueryProjection.GetNullableValueOffset, RelationQueryAggregator.CreateMinMax) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
RelationQueryProjection.GetNullableValueOffset (cognitive 17) BTDB/ODBLayer/RelationQuery.cs:5096— RelationQueryProjection.GetNullableValueOffset has cognitive complexity 17 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: 2 other methods here (RelationQueryCompiler.AddFrameConstant, RelationQueryAggregator.CreateMinMax) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
RelationQueryAggregator.CreateMinMax (cognitive 17) BTDB/ODBLayer/RelationQuery.cs:5372— RelationQueryAggregator.CreateMinMax has cognitive complexity 17 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: 2 other methods here (RelationQueryCompiler.AddFrameConstant, RelationQueryProjection.GetNullableValueOffset) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
RelationQueryInterceptorGenerator.EmitCall (cognitive 17) BTDB.SourceGenerator/RelationQueryInterceptorGenerator.cs:209— RelationQueryInterceptorGenerator.EmitCall has cognitive complexity 17 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EventLogOwnerLane.Stop (cognitive 17) BTDB.Replication/EventLog/EventLogOwnerLane.cs:785— EventLogOwnerLane.Stop has cognitive complexity 17 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FollowerComparisonSession.CompareAsync (cognitive 17) BTDB.Replication/FollowerComparisonSession.cs:41— FollowerComparisonSession.CompareAsync has cognitive complexity 17 (threshold 15). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
LeadershipActivation.CompareRangeAsync (cognitive 17) BTDB.Replication/LeadershipActivation.cs:149— LeadershipActivation.CompareRangeAsync has cognitive complexity 17 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LeaseSessionController.RunAsync (cognitive 17) BTDB.Replication/LeaseSessionController.cs:64— LeaseSessionController.RunAsync has cognitive complexity 17 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Driver.RunAsync (cognitive 17) REDACTED:23— Driver.RunAsync has cognitive complexity 17 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
LsmKeyValueDB.PublishVersion (cognitive 17) BTDB.LSM/LsmKeyValueDB.Background.cs:273— LsmKeyValueDB.PublishVersion has cognitive complexity 17 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EventSerializer.MergeTypesByShapeAndStoreNew (cognitive 16) BTDB/EventStore2Layer/EventSerializer.cs:708— EventSerializer.MergeTypesByShapeAndStoreNew has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BTreeLeafComp.CreateOrUpdate (cognitive 16) BTDB/KVDBLayer/BTreeMem/BTreeLeafComp.cs:101— BTreeLeafComp.CreateOrUpdate has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BTreeKeyValueDB.CommitWritingTransaction (cognitive 16) BTDB/KVDBLayer/Implementation/BTreeKeyValueDB.cs:1980— BTreeKeyValueDB.CommitWritingTransaction has cognitive complexity 16 (threshold 15). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
BTreeKeyValueDBCursor.FindPreviousKey (cognitive 16) BTDB/KVDBLayer/Implementation/BTreeKeyValueDBCursor.cs:152— BTreeKeyValueDBCursor.FindPreviousKey has cognitive complexity 16 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
ObjectDB.TryInitializeRelations (cognitive 16) BTDB/ODBLayer/ObjectDB.cs:363— ObjectDB.TryInitializeRelations has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RelationDBManipulator.RemoveByPrimaryKeyPrefixPartial (cognitive 16) BTDB/ODBLayer/RelationDBManipulator.cs:787— RelationDBManipulator.RemoveByPrimaryKeyPrefixPartial has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FastBehaviourSubject.Subscribe (cognitive 16) BTDB/Reactive/FastBehaviourSubject.cs:104— FastBehaviourSubject.Subscribe has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FastSubject.Unsubscribe (cognitive 16) BTDB/Reactive/FastSubject.cs:97— FastSubject.Unsubscribe has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LsmAzureBenchmark.RunAsync (cognitive 16) DBBenchmark/LSM/LsmAzureBenchmark.cs:80— LsmAzureBenchmark.RunAsync has cognitive complexity 16 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
RelationQueryEngineBenchmark.HandWrittenEncodedMatch (cognitive 16) DBBenchmark/RelationQueryEngineBenchmark.cs:157— RelationQueryEngineBenchmark.HandWrittenEncodedMatch has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SourceGenerator.OnBeforeRemoveCallParams (cognitive 16) BTDB.SourceGenerator/Main.cs:4467— SourceGenerator.OnBeforeRemoveCallParams has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SourceGenerator.AppendWriteOrderableValue (cognitive 16) BTDB.SourceGenerator/Main.cs:5868— SourceGenerator.AppendWriteOrderableValue has cognitive complexity 16 (threshold 15). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
EventLogFormat.ReadFrame (cognitive 16) BTDB.Replication/EventLog/EventLogFormat.cs:349— EventLogFormat.ReadFrame has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EventLogStorageReader.ReadFramesAsync (cognitive 16) BTDB.Replication/EventLog/EventLogStorageReader.cs:280— EventLogStorageReader.ReadFramesAsync has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NodeScenario.OpenLoadAsync (cognitive 16) EventLogBench/NodeScenario.cs:187— NodeScenario.OpenLoadAsync has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TableReader.Readahead (cognitive 16) BTDB.LSM/Format/Table.cs:478— TableReader.Readahead has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LsmKeyValueDBTransaction.EraseRangeCore (cognitive 16) BTDB.LSM/LsmKeyValueDBTransaction.cs:254— LsmKeyValueDBTransaction.EraseRangeCore has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ActionPlanner.Plan (cognitive 16) BTDB.BackendActions/ActionPlanner.cs:596— ActionPlanner.Plan has cognitive complexity 16 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D22 · Internal API Consistency· `BackendActions.ListActions` types `tenantId` as UInt64? where 3 sibling members type it UInt64 · ×1
`BackendActions.ListActions` types `tenantId` as UInt64? where 3 sibling members type it UInt64 BTDB.BackendActions/Monitoring.cs:21— 3 of 4 members of `BackendActions` that take `tenantId` type it UInt64 (3 of 4). Siblings: BackendActions.IsTenantSuspended (BTDB.BackendActions/BackendActions.cs:278); BackendActions.HasStartedActions (BTDB.BackendActions/Monitoring.cs:36); BackendActions.FindByUniqueKey (BTDB.BackendActions/Monitoring.cs:40). Type `tenantId` as UInt64. [rule A8]
D22 · Internal API Consistency· `ReplicationFileSet.RestoreAsync` takes its CancellationToken inside where 36 members of the package take it last · ×1
`ReplicationFileSet.RestoreAsync` takes its CancellationToken inside where 36 members of the package take it last BTDB.Replication/ReplicationFileSet.cs:60— 36 of 37 members of BTDB.Replication with a CancellationToken take it last (36 of 37). Siblings: CanonicalTrlInventory.DiscoverAsync (BTDB.Replication/CanonicalTrlInventory.cs:44); IEventLogPeerHandler.SubmitAsync (BTDB.Replication/EventLog/EventLogPeer.cs:51); IEventLogPeerHandler.GetBoundsAsync (BTDB.Replication/EventLog/EventLogPeer.cs:52); IEventLogPeerHandler.SubscribeAsync (BTDB.Replication/EventLog/EventLogPeer.cs:53); IEventLogPeerTransport.SubmitAsync (BTDB.Replication/EventLog/EventLogPeer.cs:60). Move the CancellationToken to the end of the parameter list. [rule A2]
Near-duplicate member pair (151 shared lines) BTDB/ODBLayer/RelationConstraintReverseEnumerator.cs:41— BTDB/ODBLayer/RelationConstraintReverseEnumerator.cs:41-239 | BTDB/ODBLayer/RelationEnumerator.cs:104-302 — These two members are variants of one another: 151 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.
Near-duplicate member pair (67 shared lines) BTDB.SourceGenerator/Main.cs:5730— BTDB.SourceGenerator/Main.cs:5730-5860 | BTDB.SourceGenerator/Main.cs:5871-6023 — These two members are variants of one another: 67 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.
Near-duplicate member pair (25 shared lines) BTDB/FieldHandler/DictionaryFieldHandler.cs:93— BTDB/FieldHandler/DictionaryFieldHandler.cs:93-144 | BTDB/FieldHandler/ListFieldHandler.cs:91-143 — These two members are variants of one another: 25 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication· Members sharing a duplicated core (9 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (9 members, 50+ identical tokens) BTDB/EventStoreLayer/DictionaryTypeDescriptor.cs:273— BTDB/EventStoreLayer/DictionaryTypeDescriptor.cs:273-341 | BTDB/EventStoreLayer/DictionaryTypeDescriptor.cs:345-415 | BTDB/EventStoreLayer/ListTypeDescriptor.cs:286-411 | BTDB/EventStoreLayer/ListTypeDescriptor.cs:415-535 | BTDB/FieldHandler/DictionaryFieldHandler.cs:326-367 | BTDB/FieldHandler/ListFieldHandler.cs:294-418 | BTDB/FieldHandler/ListFieldOrderedHandler.cs:255-358 | BTDB/Serialization/BonSerializer.cs:188-616 | BTDB/Serialization/DefaultTypeConverterFactory.cs:963-1199 — These 9 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 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 (8 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (8 members, 50+ identical tokens) BTDB/EventStoreLayer/ObjectTypeDescriptor.cs:233— BTDB/EventStoreLayer/ObjectTypeDescriptor.cs:233-372 | BTDB/EventStoreLayer/ObjectTypeDescriptor.cs:334-340 | BTDB/ODBLayer/RelationInfo.cs:277-540 | BTDB/ODBLayer/RelationInfo.cs:372-378 | BTDB/ODBLayer/RelationInfo.cs:544-885 | BTDB/ODBLayer/RelationInfo.cs:638-644 | BTDB/ODBLayer/TableInfo.cs:601-846 | BTDB/ODBLayer/TableInfo.cs:684-690 — These 8 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 8 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 8 times.
D4 · Code Duplication· Members sharing a duplicated core (5 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (5 members, 50+ identical tokens) BTDB/BTreeLib/Cursor12.cs:136— BTDB/BTreeLib/Cursor12.cs:136-161 | BTDB/BTreeLib/Cursor12.cs:178-208 | BTDB/BTreeLib/Cursor12.cs:211-247 | BTDB/BTreeLib/Cursor12.cs:250-286 | BTDB/BTreeLib/Cursor12.cs:289-325 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
D4 · Code Duplication· Edited copy of a member (88 corresponding lines) · ×1
Edited copy of a member (88 corresponding lines) BTDB/EventStoreLayer/EnumTypeDescriptor.cs:343— BTDB/EventStoreLayer/EnumTypeDescriptor.cs:343-452 | BTDB/FieldHandler/EnumFieldHandler.cs:329-416 — These two members are one piece of code written twice and then edited apart: 88 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (91 corresponding lines) · ×1
Edited copy of a member (91 corresponding lines) BTDB/StreamLayer/MemWriter.cs:492— BTDB/StreamLayer/MemWriter.cs:492-595 | BTDB/StreamLayer/MemWriter.cs:610-700 — These two members are one piece of code written twice and then edited apart: 91 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (84 corresponding lines) · ×1
Edited copy of a member (84 corresponding lines) BTDB/StreamLayer/MemReader.cs:724— BTDB/StreamLayer/MemReader.cs:724-808 | BTDB/StreamLayer/MemReader.cs:811-894 — These two members are one piece of code written twice and then edited apart: 84 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (86 corresponding lines) · ×1
Edited copy of a member (86 corresponding lines) BTDB/EventStore2Layer/EventDeserializer.cs:161— BTDB/EventStore2Layer/EventDeserializer.cs:161-250 | BTDB/EventStore2Layer/EventSerializer.cs:274-359 — These two members are one piece of code written twice and then edited apart: 86 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (77 corresponding lines) · ×1
Edited copy of a member (77 corresponding lines) BTDB/EventStoreLayer/TupleTypeDescriptor.cs:284— BTDB/EventStoreLayer/TupleTypeDescriptor.cs:284-362 | BTDB/EventStoreLayer/TupleTypeDescriptor.cs:366-442 — These two members are one piece of code written twice and then edited apart: 77 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (85 corresponding lines) · ×1
Edited copy of a member (85 corresponding lines) BTDB/EventStoreLayer/ObjectTypeDescriptor.cs:396— BTDB/EventStoreLayer/ObjectTypeDescriptor.cs:396-482 | BTDB/EventStoreLayer/ObjectTypeDescriptor.cs:498-582 — These two members are one piece of code written twice and then edited apart: 85 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (68 corresponding lines) · ×1
Edited copy of a member (68 corresponding lines) BTDB/Buffer/PackUnpack.cs:154— BTDB/Buffer/PackUnpack.cs:154-221 | BTDB/Buffer/PackUnpack.cs:409-479 — These two members are one piece of code written twice and then edited apart: 68 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (46 corresponding lines) · ×1
Edited copy of a member (46 corresponding lines) BTDB/FieldHandler/DictionaryFieldHandler.cs:175— BTDB/FieldHandler/DictionaryFieldHandler.cs:175-231 | BTDB/FieldHandler/ListFieldHandler.cs:172-217 — These two members are one piece of code written twice and then edited apart: 46 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (43 corresponding lines) · ×1
Edited copy of a member (43 corresponding lines) BTDB/KVDBLayer/Helpers/KeyValueDBExportImporter.cs:17— BTDB/KVDBLayer/Helpers/KeyValueDBExportImporter.cs:17-60 | BTDB/KVDBLayer/Helpers/KeyValueDBExportImporter.cs:69-111 — These two members are one piece of code written twice and then edited apart: 43 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (63 corresponding lines) · ×1
Edited copy of a member (63 corresponding lines) BTDB/EventStore2Layer/EventSerializer.cs:126— BTDB/EventStore2Layer/EventSerializer.cs:126-206 | BTDB/EventStoreLayer/TypeSerializers.cs:657-719 — These two members are one piece of code written twice and then edited apart: 63 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (58 corresponding lines) · ×1
Edited copy of a member (58 corresponding lines) BTDB/ODBLayer/RelationDBManipulator.cs:1406— BTDB/ODBLayer/RelationDBManipulator.cs:1406-1463 | BTDB/ODBLayer/RelationDBManipulator.cs:1507-1564 — These two members are one piece of code written twice and then edited apart: 58 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (64 corresponding lines) · ×1
Edited copy of a member (64 corresponding lines) BTDB/Collections/LruCache.cs:120— BTDB/Collections/LruCache.cs:120-183 | BTDB/Collections/SpanByteLruCache.cs:140-203 — These two members are one piece of code written twice and then edited apart: 64 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 38+ corresponding lines) · ×1
Edited copies of one member (3 members, 38+ corresponding lines) BTDB/FieldHandler/Extensions.cs:140— BTDB/FieldHandler/Extensions.cs:140-177 | BTDB/FieldHandler/Extensions.cs:181-219 | BTDB/FieldHandler/Extensions.cs:223-261 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 38 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (30 corresponding lines) · ×1
Edited copy of a member (30 corresponding lines) BTDB/ODBLayer/ODBDictionaryFieldHandler.cs:327— BTDB/ODBLayer/ODBDictionaryFieldHandler.cs:327-360 | BTDB/ODBLayer/ODBSetFieldHandler.cs:198-227 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 24+ corresponding lines) · ×1
Edited copies of one member (3 members, 24+ corresponding lines) BTDB.SourceGenerator/HashCode.cs:123— BTDB.SourceGenerator/HashCode.cs:123-146 | BTDB.SourceGenerator/HashCode.cs:150-175 | BTDB.SourceGenerator/HashCode.cs:179-206 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 24 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 46+ corresponding lines) · ×1
Edited copies of one member (4 members, 46+ corresponding lines) BTDB/Collections/LruCache.cs:71— BTDB/Collections/LruCache.cs:71-117 | BTDB/Collections/LruCache.cs:200-247 | BTDB/Collections/SpanByteLruCache.cs:92-137 | BTDB/Collections/SpanByteLruCache.cs:209-255 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 46 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 27+ corresponding lines) · ×1
Edited copies of one member (3 members, 27+ corresponding lines) BTDB/EventStore2Layer/EventSerializer.cs:83— BTDB/EventStore2Layer/EventSerializer.cs:83-113 | BTDB/EventStoreLayer/TypeSerializers.cs:575-604 | BTDB/EventStoreLayer/TypeSerializers.cs:612-638 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 27 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (35 corresponding lines) · ×1
Edited copy of a member (35 corresponding lines) BTDB/ODBLayer/ODBDictionary.cs:538— BTDB/ODBLayer/ODBDictionary.cs:538-573 | BTDB/ODBLayer/ODBSet.cs:328-362 — These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (29 corresponding lines) · ×1
Edited copy of a member (29 corresponding lines) BTDB/EventStore2Layer/EventDeserializer.cs:43— BTDB/EventStore2Layer/EventDeserializer.cs:43-71 | BTDB/EventStore2Layer/EventSerializer.cs:51-80 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 27+ corresponding lines) · ×1
Edited copies of one member (4 members, 27+ corresponding lines) BTDB/EventStoreLayer/ByteArrayTypeDescriptor.cs:86— BTDB/EventStoreLayer/ByteArrayTypeDescriptor.cs:86-112 | BTDB/EventStoreLayer/ByteArrayTypeDescriptor.cs:120-148 | BTDB/FieldHandler/ByteArrayFieldHandler.cs:100-126 | BTDB/FieldHandler/ByteArrayLastFieldHandler.cs:102-128 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 27 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (45 corresponding lines) · ×1
Edited copy of a member (45 corresponding lines) BTDB.LSM/LsmKeyValueDB.Background.cs:62— BTDB.LSM/LsmKeyValueDB.Background.cs:62-114 | BTDB.LSM/LsmKeyValueDB.Wal.cs:51-95 — These two members are one piece of code written twice and then edited apart: 45 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (40 corresponding lines) · ×1
Edited copy of a member (40 corresponding lines) BTDB/EventStore2Layer/EventDeserializer.cs:331— BTDB/EventStore2Layer/EventDeserializer.cs:331-370 | BTDB/EventStore2Layer/EventDeserializer.cs:393-432 — These two members are one piece of code written twice and then edited apart: 40 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (31 corresponding lines) · ×1
Edited copy of a member (31 corresponding lines) BTDB.SourceGenerator/Main.cs:2509— BTDB.SourceGenerator/Main.cs:2509-2539 | BTDB.SourceGenerator/Main.cs:2542-2578 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (36 corresponding lines) · ×1
Edited copy of a member (36 corresponding lines) BTDB/KVDBLayer/Implementation/BTreeKeyValueDBCursor.cs:545— BTDB/KVDBLayer/Implementation/BTreeKeyValueDBCursor.cs:545-580 | BTDB/KVDBLayer/MemoryImplementation/InMemoryKeyValueDBCursor.cs:530-568 — These two members are one piece of code written twice and then edited apart: 36 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 25+ corresponding lines) · ×1
Edited copies of one member (3 members, 25+ corresponding lines) BTDB/BTreeLib/BTreeImpl12.cs:1223— BTDB/BTreeLib/BTreeImpl12.cs:1223-1251 | BTDB/BTreeLib/BTreeImpl12.cs:1303-1327 | BTDB/KVDBLayer/BTreeMem/BTreeLeaf.cs:212-236 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 25 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 23+ corresponding lines) · ×1
Edited copies of one member (3 members, 23+ corresponding lines) BTDB/EventStoreLayer/DictionaryTypeDescriptor.cs:755— BTDB/EventStoreLayer/DictionaryTypeDescriptor.cs:755-777 | BTDB/EventStoreLayer/ListTypeDescriptor.cs:938-964 | BTDB/FieldHandler/DictionaryFieldHandler.cs:147-171 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 23 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 28+ corresponding lines) · ×1
Edited copies of one member (3 members, 28+ corresponding lines) BTDB/FieldHandler/ListFieldHandler.cs:436— BTDB/FieldHandler/ListFieldHandler.cs:436-463 | BTDB/FieldHandler/ListFieldOrderedHandler.cs:369-400 | BTDB/FieldHandler/NullableFieldHandler.cs:221-248 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 28 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (5 members, 21+ corresponding lines) · ×1
Edited copies of one member (5 members, 21+ corresponding lines) BTDB/ODBLayer/RelationBuilder.cs:673— BTDB/ODBLayer/RelationBuilder.cs:673-696 | BTDB/ODBLayer/RelationBuilder.cs:700-720 | BTDB/ODBLayer/RelationBuilder.cs:724-747 | BTDB/ODBLayer/RelationBuilder.cs:751-771 | BTDB/ODBLayer/RelationBuilder.cs:1704-1727 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 21 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 22+ corresponding lines) · ×1
Edited copies of one member (3 members, 22+ corresponding lines) BTDB/EventStoreLayer/NullableTypeDescriptor.cs:170— BTDB/EventStoreLayer/NullableTypeDescriptor.cs:170-191 | BTDB/FieldHandler/NullableFieldHandler.cs:164-186 | BTDB/FieldHandler/NullableFieldHandler.cs:197-218 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 22 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (15 corresponding lines) · ×1
Edited copy of a member (15 corresponding lines) BTDB/ODBLayer/ODBLazyUlongList.cs:165— BTDB/ODBLayer/ODBLazyUlongList.cs:165-179 | BTDB/ODBLayer/ODBRoaringBitmap.cs:164-179 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (23 corresponding lines) · ×1
Edited copy of a member (23 corresponding lines) BTDB/BTreeLib/BTreeImpl12.cs:895— BTDB/BTreeLib/BTreeImpl12.cs:895-917 | BTDB/BTreeLib/BTreeImpl12.cs:920-943 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 22+ corresponding lines) · ×1
Edited copies of one member (4 members, 22+ corresponding lines) BTDB/ODBLayer/ODBDictionary.cs:488— BTDB/ODBLayer/ODBDictionary.cs:488-510 | BTDB/ODBLayer/ODBDictionary.cs:513-535 | BTDB/ODBLayer/ODBSet.cs:280-301 | BTDB/ODBLayer/ODBSet.cs:304-325 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 22 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 18+ corresponding lines) · ×1
Edited copies of one member (3 members, 18+ corresponding lines) BTDB/FieldHandler/ListFieldHandler.cs:466— BTDB/FieldHandler/ListFieldHandler.cs:466-484 | BTDB/FieldHandler/ListFieldOrderedHandler.cs:403-426 | BTDB/FieldHandler/NullableFieldHandler.cs:251-268 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 18 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 25+ corresponding lines) · ×1
Edited copies of one member (4 members, 25+ corresponding lines) BTDB/BTreeLib/BTreeImpl12.cs:1172— BTDB/BTreeLib/BTreeImpl12.cs:1172-1197 | BTDB/BTreeLib/BTreeImpl12.cs:1254-1278 | BTDB/KVDBLayer/BTreeMem/BTreeLeaf.cs:44-68 | BTDB/KVDBLayer/BTreeMem/BTreeLeafComp.cs:72-99 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 25 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 11+ corresponding lines) · ×1
Edited copies of one member (3 members, 11+ corresponding lines) BTDB/ODBLayer/ODBLazyUlongList.cs:35— BTDB/ODBLayer/ODBLazyUlongList.cs:35-45 | BTDB/ODBLayer/ODBRoaringBitmap.cs:44-54 | BTDB/ODBLayer/ODBSet.cs:38-51 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 14+ corresponding lines) · ×1
Edited copies of one member (3 members, 14+ corresponding lines) BTDB.SourceGenerator/Main.cs:1071— BTDB.SourceGenerator/Main.cs:1071-1084 | BTDB.SourceGenerator/Main.cs:1162-1177 | BTDB.SourceGenerator/Main.cs:1183-1198 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 17+ corresponding lines) · ×1
Edited copies of one member (3 members, 17+ corresponding lines) BTDB/KVDBLayer/BTreeMem/BTreeBranch.cs:502— BTDB/KVDBLayer/BTreeMem/BTreeBranch.cs:502-518 | BTDB/KVDBLayer/BTreeMem/BTreeLeaf.cs:294-312 | BTDB/KVDBLayer/BTreeMem/BTreeLeafComp.cs:438-456 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 12+ corresponding lines) · ×1
Edited copies of one member (4 members, 12+ corresponding lines) BTDB.LSM/Engine/NativeMemtable.cs:155— BTDB.LSM/Engine/NativeMemtable.cs:155-167 | BTDB.LSM/Engine/NativeMemtable.cs:171-183 | BTDB.LSM/Format/Table.cs:243-254 | BTDB.LSM/Format/Table.cs:428-439 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 16+ corresponding lines) · ×1
Edited copies of one member (3 members, 16+ corresponding lines) BTDB.LSM/Engine/Memtable.cs:262— BTDB.LSM/Engine/Memtable.cs:262-277 | BTDB.LSM/Engine/Memtable.cs:327-343 | BTDB.LSM/Engine/Memtable.cs:346-362 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 15+ corresponding lines) · ×1
Edited copies of one member (4 members, 15+ corresponding lines) BTDB/EventStore2Layer/EventDeserializer.cs:435— BTDB/EventStore2Layer/EventDeserializer.cs:435-449 | BTDB/EventStoreLayer/TypeSerializers.cs:544-561 | BTDB/ODBLayer/DBReaderCtx.cs:138-155 | BTDB/ODBLayer/DBReaderCtx.cs:164-181 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 8+ corresponding lines) · ×1
Edited copies of one member (4 members, 8+ corresponding lines) BTDB.LSM/LsmKeyValueDBCursor.cs:314— BTDB.LSM/LsmKeyValueDBCursor.cs:314-321 | BTDB/KVDBLayer/MemoryImplementation/InMemoryKeyValueDBCursor.cs:329-339 | BTDB/KVDBLayer/MemoryImplementation/InMemoryKeyValueDBCursor.cs:342-352 | BTDB/KVDBLayer/ReadOnly/ReadOnlyKeyValueDBCursor.cs:253-261 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (2 corresponding lines) · ×1
Edited copy of a member (2 corresponding lines) EventLogBench/TimedStorage.cs:51— EventLogBench/TimedStorage.cs:51-52 | EventLogBench/TopicProbe.cs:75-76 — These two members are one piece of code written twice and then edited apart: 2 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 6+ corresponding lines) · ×1
Edited copies of one member (4 members, 6+ corresponding lines) DBBenchmark/LSM/LsmAzureBenchmark.cs:60— DBBenchmark/LSM/LsmAzureBenchmark.cs:60-65 | DBBenchmark/LSM/LsmDurableBenchmark.cs:52-57 | DBBenchmark/LSM/LsmSpillBenchmark.cs:70-75 | EventLogBench/TopicProbe.cs:73-78 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (1 corresponding lines) · ×1
Edited copy of a member (1 corresponding lines) DBBenchmark/EventLog/EventLogEndToEnd.cs:146— DBBenchmark/EventLog/EventLogEndToEnd.cs:146-146 | DBBenchmark/EventLog/EventLogStorageScreening.cs:339-339 — These two members are one piece of code written twice and then edited apart: 1 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 4+ corresponding lines) · ×1
Edited copies of one member (3 members, 4+ corresponding lines) BTDB/FieldHandler/EncryptedStringHandler.cs:133— BTDB/FieldHandler/EncryptedStringHandler.cs:133-136 | BTDB/FieldHandler/OrderedEncryptedStringHandler.cs:130-133 | BTDB/FieldHandler/SimpleFieldHandlerBase.cs:149-152 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Duplicated block (72 lines × 2) BTDB/ODBLayer/ODBDictionary.cs:724— BTDB/ODBLayer/ODBDictionary.cs:724-795 | BTDB/ODBLayer/ODBSet.cs:400-471 — before extracting anything, compare `BTDB/ODBLayer/ODBDictionary.cs` and `BTDB/ODBLayer/ODBSet.cs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 133 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. Note first that the copies are not typed on the same thing: the declarations holding them bind `owner` to `ODBDictionary<TKey, TValue>` in one and `ODBSet<TKey>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (58 lines × 2) BTDB/ODBLayer/RelationConstraintReverseEnumerator.cs:81— BTDB/ODBLayer/RelationConstraintReverseEnumerator.cs:81-138 | BTDB/ODBLayer/RelationEnumerator.cs:144-201 — before extracting anything, compare `BTDB/ODBLayer/RelationConstraintReverseEnumerator.cs` and `BTDB/ODBLayer/RelationEnumerator.cs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 154 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/ODBLayer/RelationConstraintReverseEnumerator.cs:81` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (43 lines × 2) BTDB/KVDBLayer/Implementation/Compactor.cs:279— BTDB/KVDBLayer/Implementation/Compactor.cs:279-321 | BTDB/KVDBLayer/Implementation/ReplicationCompactor.cs:204-246 — before extracting anything, compare `BTDB/KVDBLayer/Implementation/Compactor.cs` and `BTDB/KVDBLayer/Implementation/ReplicationCompactor.cs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 132 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (40 lines × 2) BTDB/KVDBLayer/Implementation/BTreeKeyValueDB.cs:890— BTDB/KVDBLayer/Implementation/BTreeKeyValueDB.cs:890-929 | BTDB/KVDBLayer/Implementation/BTreeKeyValueDB.cs:965-1004 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/KVDBLayer/Implementation/BTreeKeyValueDB.cs:890` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `BTDB/KVDBLayer/Implementation/BTreeKeyValueDB.cs:963` calls `AppendKeyValue`, `AsSyncReadOnlySpan` and `BTDB/KVDBLayer/Implementation/BTreeKeyValueDB.cs:889` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (39 lines × 2) BTDB/ODBLayer/RelationConstraintReverseEnumerator.cs:201— BTDB/ODBLayer/RelationConstraintReverseEnumerator.cs:201-239 | BTDB/ODBLayer/RelationEnumerator.cs:264-302 — before extracting anything, compare `BTDB/ODBLayer/RelationConstraintReverseEnumerator.cs` and `BTDB/ODBLayer/RelationEnumerator.cs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 154 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/ODBLayer/RelationConstraintReverseEnumerator.cs:201` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (36 lines × 2) BTDB/BTreeLib/Cursor12.cs:251— BTDB/BTreeLib/Cursor12.cs:251-286 | BTDB/BTreeLib/Cursor12.cs:290-325 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. Note first that the copies are not typed on the same thing: the declarations holding them bind `buffer` to `scoped ref Span<byte>` in one and `Span<byte>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (33–36 lines × 2) BTDB/EventStore2Layer/EventDeserializer.cs:162— BTDB/EventStore2Layer/EventDeserializer.cs:162-197 | BTDB/EventStore2Layer/EventSerializer.cs:278-310 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/EventStore2Layer/EventDeserializer.cs:162` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (75 lines × 2) BTDB/ODBLayer/RelationInfo.cs:310— BTDB/ODBLayer/RelationInfo.cs:310-384 | BTDB/ODBLayer/RelationInfo.cs:576-650 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/ODBLayer/RelationInfo.cs:310` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (34 lines × 2) BTDB.SourceGenerator/Main.cs:5748— BTDB.SourceGenerator/Main.cs:5748-5781 | BTDB.SourceGenerator/Main.cs:5898-5931 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB.SourceGenerator/Main.cs:5748` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (30–33 lines × 2) BTDB/ODBLayer/RelationConstraintReverseEnumerator.cs:137— BTDB/ODBLayer/RelationConstraintReverseEnumerator.cs:137-169 | BTDB/ODBLayer/RelationEnumerator.cs:205-234 — before extracting anything, compare `BTDB/ODBLayer/RelationConstraintReverseEnumerator.cs` and `BTDB/ODBLayer/RelationEnumerator.cs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 154 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/ODBLayer/RelationConstraintReverseEnumerator.cs:137` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (14–32 lines × 2) BTDB/BTreeLib/BTreeImpl12.cs:1154— BTDB/BTreeLib/BTreeImpl12.cs:1154-1167 | BTDB/BTreeLib/BTreeImpl12.cs:1373-1404 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (28 lines × 2) BTDB.SourceGenerator/Main.cs:197— BTDB.SourceGenerator/Main.cs:197-224 | BTDB.SourceGenerator/Main.cs:228-255 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (27 lines × 2) BTDB.SourceGenerator/Main.cs:5084— BTDB.SourceGenerator/Main.cs:5084-5110 | BTDB.SourceGenerator/Main.cs:5147-5173 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB.SourceGenerator/Main.cs:5084` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (24 lines × 4) BTDB/Serialization/DefaultTypeConverterFactory.cs:988— BTDB/Serialization/DefaultTypeConverterFactory.cs:988-1011 | BTDB/Serialization/DefaultTypeConverterFactory.cs:1045-1068 | BTDB/Serialization/DefaultTypeConverterFactory.cs:1104-1127 | BTDB/Serialization/DefaultTypeConverterFactory.cs:1163-1186 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/Serialization/DefaultTypeConverterFactory.cs:988` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `BTDB/Serialization/DefaultTypeConverterFactory.cs:1071` calls `valueConverter`, `Ref` and `BTDB/Serialization/DefaultTypeConverterFactory.cs:1013` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (24 lines × 2) BTDB/ODBLayer/RelationInfo.cs:1651— BTDB/ODBLayer/RelationInfo.cs:1651-1674 | BTDB/ODBLayer/RelationInfo.cs:2009-2032 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/ODBLayer/RelationInfo.cs:1651` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `BTDB/ODBLayer/RelationInfo.cs:2007` calls `InitializeBuffer` and `BTDB/ODBLayer/RelationInfo.cs:1650` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (20 lines × 2) BTDB/ODBLayer/ObjectDBTransaction.cs:612— BTDB/ODBLayer/ObjectDBTransaction.cs:612-631 | BTDB/ODBLayer/ObjectDBTransaction.cs:669-688 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/ODBLayer/ObjectDBTransaction.cs:612` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (20–22 lines × 2) BTDB/ODBLayer/RelationDBManipulator.cs:597— BTDB/ODBLayer/RelationDBManipulator.cs:597-618 | BTDB/ODBLayer/RelationDBManipulator.cs:640-659 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/ODBLayer/RelationDBManipulator.cs:597` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (18–21 lines × 2) BTDB/ODBLayer/RelationBuilder.cs:1195— BTDB/ODBLayer/RelationBuilder.cs:1195-1215 | BTDB/ODBLayer/RelationBuilder.cs:1244-1261 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (16 lines × 3) BTDB/EventStore2Layer/EventSerializer.cs:434— BTDB/EventStore2Layer/EventSerializer.cs:434-449 | BTDB/EventStore2Layer/EventSerializer.cs:457-472 | BTDB/EventStore2Layer/EventSerializer.cs:483-498 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/EventStore2Layer/EventSerializer.cs:434` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (19 lines × 3) BTDB.SourceGenerator/Main.cs:4819— BTDB.SourceGenerator/Main.cs:4819-4837 | BTDB.SourceGenerator/Main.cs:5117-5135 | BTDB.SourceGenerator/Main.cs:5181-5199 — 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 (18–19 lines × 2) BTDB/ODBLayer/RelationDBManipulator.cs:159— BTDB/ODBLayer/RelationDBManipulator.cs:159-176 | BTDB/ODBLayer/RelationDBManipulator.cs:289-307 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/ODBLayer/RelationDBManipulator.cs:159` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (18 lines × 3) BTDB.SourceGenerator/Main.cs:394— BTDB.SourceGenerator/Main.cs:394-411 | BTDB.SourceGenerator/Main.cs:415-432 | BTDB.SourceGenerator/Main.cs:436-453 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB.SourceGenerator/Main.cs:394` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (17–18 lines × 2) BTDB/ODBLayer/RelationInfo.cs:1698— BTDB/ODBLayer/RelationInfo.cs:1698-1714 | BTDB/ODBLayer/RelationInfo.cs:1774-1791 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/ODBLayer/RelationInfo.cs:1698` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (15 lines × 3) BTDB/ODBLayer/ODBIterator.cs:612— BTDB/ODBLayer/ODBIterator.cs:612-626 | BTDB/ODBLayer/ODBIterator.cs:660-674 | BTDB/ODBLayer/ODBIterator.cs:682-696 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/ODBLayer/ODBIterator.cs:612` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16–17 lines × 3) BTDB.SourceGenerator/Main.cs:4982— BTDB.SourceGenerator/Main.cs:4982-4998 | BTDB.SourceGenerator/Main.cs:5077-5092 | BTDB.SourceGenerator/Main.cs:5140-5155 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB.SourceGenerator/Main.cs:4982` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14–17 lines × 2) BTDB/ODBLayer/RelationBuilder.cs:975— BTDB/ODBLayer/RelationBuilder.cs:975-991 | BTDB/ODBLayer/RelationBuilder.cs:1018-1031 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/ODBLayer/RelationBuilder.cs:975` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (13–16 lines × 2) BTDB/EventStoreLayer/DictionaryTypeDescriptor.cs:430— BTDB/EventStoreLayer/DictionaryTypeDescriptor.cs:430-442 | BTDB/EventStoreLayer/ListTypeDescriptor.cs:612-627 — 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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (25 lines × 2) BTDB/EventStoreLayer/ListTypeDescriptor.cs:372— BTDB/EventStoreLayer/ListTypeDescriptor.cs:372-396 | BTDB/FieldHandler/ListFieldHandler.cs:378-402 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/EventStoreLayer/ListTypeDescriptor.cs:372` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (14–16 lines × 2) BTDB/FieldHandler/ListFieldHandler.cs:199— BTDB/FieldHandler/ListFieldHandler.cs:199-212 | BTDB/FieldHandler/ListFieldOrderedHandler.cs:177-192 — before extracting anything, compare `BTDB/FieldHandler/ListFieldHandler.cs` and `BTDB/FieldHandler/ListFieldOrderedHandler.cs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 176 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/FieldHandler/ListFieldHandler.cs:199` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (4–16 lines × 3) BTDB/KVDBLayer/Implementation/InMemoryFileCollection.cs:274— BTDB/KVDBLayer/Implementation/InMemoryFileCollection.cs:274-289 | BTDB/KVDBLayer/Implementation/InMemoryReplicationFileStorage.cs:274-289 | BTDB/KVDBLayer/Implementation/OnDiskReplicationFileStorage.cs:569-572 — before extracting anything, compare `BTDB/KVDBLayer/Implementation/InMemoryFileCollection.cs` and `BTDB/KVDBLayer/Implementation/InMemoryReplicationFileStorage.cs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 162 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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (13 lines × 3) BTDB/BTreeLib/Cursor12.cs:212— BTDB/BTreeLib/Cursor12.cs:212-224 | BTDB/BTreeLib/Cursor12.cs:251-263 | BTDB/BTreeLib/Cursor12.cs:290-302 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/BTreeLib/Cursor12.cs:212` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind `buffer` to `ref Memory<byte>` in one and `scoped ref Span<byte>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (12–14 lines × 3) BTDB/FieldHandler/DictionaryFieldHandler.cs:349— BTDB/FieldHandler/DictionaryFieldHandler.cs:349-360 | BTDB/FieldHandler/ListFieldHandler.cs:351-364 | BTDB/FieldHandler/ListFieldOrderedHandler.cs:305-318 — before extracting anything, compare `BTDB/FieldHandler/DictionaryFieldHandler.cs` and `BTDB/FieldHandler/ListFieldHandler.cs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 92 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/FieldHandler/DictionaryFieldHandler.cs:349` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 6) ODbDump/Program.cs:48— ODbDump/Program.cs:48-58 | ODbDump/Program.cs:97-107 | ODbDump/Program.cs:120-130 | ODbDump/Program.cs:139-149 | ODbDump/Program.cs:158-168 | ODbDump/Program.cs:186-196 — 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 (12 lines × 5) BTDB/Interpreter/Interpreter.cs:3696— BTDB/Interpreter/Interpreter.cs:3696-3707 | BTDB/Interpreter/Interpreter.cs:3712-3723 | BTDB/Interpreter/Interpreter.cs:3729-3740 | BTDB/Interpreter/Interpreter.cs:3747-3758 | BTDB/Interpreter/Interpreter.cs:3766-3777 — 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 (12 lines × 4) BTDB/EventStoreLayer/ListTypeDescriptor.cs:311— BTDB/EventStoreLayer/ListTypeDescriptor.cs:311-322 | BTDB/EventStoreLayer/ListTypeDescriptor.cs:327-338 | BTDB/FieldHandler/ListFieldHandler.cs:317-328 | BTDB/FieldHandler/ListFieldHandler.cs:333-344 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/EventStoreLayer/ListTypeDescriptor.cs:311` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (12–13 lines × 4) BTDB.SourceGenerator/Main.cs:4894— BTDB.SourceGenerator/Main.cs:4894-4905 | BTDB.SourceGenerator/Main.cs:4983-4995 | BTDB.SourceGenerator/Main.cs:5078-5089 | BTDB.SourceGenerator/Main.cs:5141-5152 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB.SourceGenerator/Main.cs:4894` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10–12 lines × 12) BTDB/EventStoreLayer/DictionaryTypeDescriptor.cs:301— BTDB/EventStoreLayer/DictionaryTypeDescriptor.cs:301-310 | BTDB/EventStoreLayer/DictionaryTypeDescriptor.cs:374-383 | BTDB/EventStoreLayer/ListTypeDescriptor.cs:345-356 | BTDB/EventStoreLayer/ListTypeDescriptor.cs:473-484 | BTDB/FieldHandler/DictionaryFieldHandler.cs:349-358 | BTDB/FieldHandler/ListFieldHandler.cs:351-362 | BTDB/FieldHandler/ListFieldOrderedHandler.cs:305-316 | BTDB/Serialization/BonSerializer.cs:527-536 | BTDB/Serialization/DefaultTypeConverterFactory.cs:1002-1011 | BTDB/Serialization/DefaultTypeConverterFactory.cs:1059-1068 | BTDB/Serialization/DefaultTypeConverterFactory.cs:1118-1127 | BTDB/Serialization/DefaultTypeConverterFactory.cs:1177-1186 — there are 12 copies across 7 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 12 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/EventStoreLayer/DictionaryTypeDescriptor.cs:301` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `BTDB/Serialization/BonSerializer.cs:524` calls `AsCtx`, `StartDictionary` and `BTDB/EventStoreLayer/ListTypeDescriptor.cs:470` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (11–12 lines × 4) BTDB.Replication/ReplicationFileSet.Streaming.cs:113— BTDB.Replication/ReplicationFileSet.Streaming.cs:113-123 | BTDB/KVDBLayer/Implementation/InMemoryFileCollection.cs:136-147 | BTDB/KVDBLayer/Implementation/InMemoryReplicationFileStorage.cs:136-147 | BTDB/KVDBLayer/Implementation/OnDiskReplicationFileStorage.cs:482-492 — before extracting anything, compare `BTDB/KVDBLayer/Implementation/InMemoryFileCollection.cs` and `BTDB/KVDBLayer/Implementation/InMemoryReplicationFileStorage.cs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 162 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (11–12 lines × 2) BTDB/ODBLayer/RelationDBManipulator.cs:171— BTDB/ODBLayer/RelationDBManipulator.cs:171-182 | BTDB/ODBLayer/RelationDBManipulator.cs:407-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. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/ODBLayer/RelationDBManipulator.cs:171` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 6) BTDB/EventStoreLayer/ListTypeDescriptor.cs:311— BTDB/EventStoreLayer/ListTypeDescriptor.cs:311-319 | BTDB/EventStoreLayer/ListTypeDescriptor.cs:327-335 | BTDB/EventStoreLayer/ListTypeDescriptor.cs:372-380 | BTDB/FieldHandler/ListFieldHandler.cs:317-325 | BTDB/FieldHandler/ListFieldHandler.cs:333-341 | BTDB/FieldHandler/ListFieldHandler.cs:378-386 — there are 6 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 6 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/EventStoreLayer/ListTypeDescriptor.cs:311` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (10–11 lines × 3) DBBenchmark/LSM/LsmAzureBenchmark.cs:81— DBBenchmark/LSM/LsmAzureBenchmark.cs:81-91 | DBBenchmark/LSM/LsmDurableBenchmark.cs:125-134 | DBBenchmark/LSM/LsmSpillBenchmark.cs:125-134 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `DBBenchmark/LSM/LsmAzureBenchmark.cs:81` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 3) BTDB/KVDBLayer/Implementation/InMemoryFileCollection.cs:333— BTDB/KVDBLayer/Implementation/InMemoryFileCollection.cs:333-341 | BTDB/KVDBLayer/Implementation/InMemoryReplicationFileStorage.cs:337-345 | BTDB/KVDBLayer/Implementation/OnDiskFileCollection.cs:302-310 — before extracting anything, compare `BTDB/KVDBLayer/Implementation/InMemoryFileCollection.cs` and `BTDB/KVDBLayer/Implementation/InMemoryReplicationFileStorage.cs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 162 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8–9 lines × 2) BTDB/SnappyCompression/SnappyCompress.cs:125— BTDB/SnappyCompression/SnappyCompress.cs:125-132 | BTDB/SnappyCompression/SnappyCompress.cs:134-142 — both copies are in the same file, so extract the 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–8 lines × 6) BTDB/EventStoreLayer/ListTypeDescriptor.cs:342— BTDB/EventStoreLayer/ListTypeDescriptor.cs:342-348 | BTDB/EventStoreLayer/ListTypeDescriptor.cs:470-476 | BTDB/FieldHandler/ListFieldHandler.cs:348-354 | BTDB/FieldHandler/ListFieldOrderedHandler.cs:301-308 | BTDB/Serialization/BonSerializer.cs:483-489 | BTDB/Serialization/BonSerializer.cs:524-530 — there are 6 copies across 4 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 6 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/EventStoreLayer/ListTypeDescriptor.cs:342` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `BTDB/EventStoreLayer/ListTypeDescriptor.cs:350` calls `BTDBException` and `BTDB/Serialization/BonSerializer.cs:531` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7 lines × 6) BTDB/FieldHandler/ListFieldHandler.cs:316— BTDB/FieldHandler/ListFieldHandler.cs:316-322 | BTDB/FieldHandler/ListFieldHandler.cs:332-338 | BTDB/FieldHandler/ListFieldHandler.cs:377-383 | BTDB/FieldHandler/ListFieldOrderedHandler.cs:275-281 | BTDB/FieldHandler/ListFieldOrderedHandler.cs:288-294 | BTDB/FieldHandler/ListFieldOrderedHandler.cs:328-334 — before extracting anything, compare `BTDB/FieldHandler/ListFieldHandler.cs` and `BTDB/FieldHandler/ListFieldOrderedHandler.cs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 176 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 × 13) BTDB/EventStoreLayer/ListTypeDescriptor.cs:310— BTDB/EventStoreLayer/ListTypeDescriptor.cs:310-314 | BTDB/EventStoreLayer/ListTypeDescriptor.cs:326-330 | BTDB/EventStoreLayer/ListTypeDescriptor.cs:371-375 | BTDB/EventStoreLayer/ListTypeDescriptor.cs:441-445 | BTDB/EventStoreLayer/ListTypeDescriptor.cs:456-460 | BTDB/EventStoreLayer/ListTypeDescriptor.cs:498-502 | BTDB/FieldHandler/ListFieldHandler.cs:316-320 | BTDB/FieldHandler/ListFieldHandler.cs:332-336 | BTDB/FieldHandler/ListFieldHandler.cs:377-381 | BTDB/FieldHandler/ListFieldOrderedHandler.cs:275-279 | BTDB/FieldHandler/ListFieldOrderedHandler.cs:288-292 | BTDB/FieldHandler/ListFieldOrderedHandler.cs:328-332 | BTDB/Serialization/BonSerializer.cs:454-458 — there are 13 copies across 4 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 13 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/EventStoreLayer/ListTypeDescriptor.cs:310` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `BTDB/EventStoreLayer/ListTypeDescriptor.cs:309` calls `WriteVUInt32` and `BTDB/EventStoreLayer/ListTypeDescriptor.cs:440` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7 lines × 5) BTDB/BTreeLib/Cursor12.cs:143— BTDB/BTreeLib/Cursor12.cs:143-149 | BTDB/BTreeLib/Cursor12.cs:180-186 | BTDB/BTreeLib/Cursor12.cs:213-219 | BTDB/BTreeLib/Cursor12.cs:252-258 | BTDB/BTreeLib/Cursor12.cs:291-297 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/BTreeLib/Cursor12.cs:143` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6–7 lines × 2) BTDB/EventStoreLayer/DictionaryTypeDescriptor.cs:293— BTDB/EventStoreLayer/DictionaryTypeDescriptor.cs:293-298 | BTDB/FieldHandler/DictionaryFieldHandler.cs:340-346 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/EventStoreLayer/DictionaryTypeDescriptor.cs:293` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5–7 lines × 2) DBBenchmark/EventLog/EventLogStorageScreening.cs:47— DBBenchmark/EventLog/EventLogStorageScreening.cs:47-51 | DBBenchmark/LSM/LsmStorageScreening.cs:74-80 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (6 lines × 25) BTDB/EventStoreLayer/DictionaryTypeDescriptor.cs:301— BTDB/EventStoreLayer/DictionaryTypeDescriptor.cs:301-306 | BTDB/EventStoreLayer/DictionaryTypeDescriptor.cs:374-379 | BTDB/EventStoreLayer/ListTypeDescriptor.cs:309-314 | BTDB/EventStoreLayer/ListTypeDescriptor.cs:325-330 | BTDB/EventStoreLayer/ListTypeDescriptor.cs:345-352 | BTDB/EventStoreLayer/ListTypeDescriptor.cs:370-375 | BTDB/EventStoreLayer/ListTypeDescriptor.cs:440-445 | BTDB/EventStoreLayer/ListTypeDescriptor.cs:455-460 | BTDB/EventStoreLayer/ListTypeDescriptor.cs:473-480 | BTDB/EventStoreLayer/ListTypeDescriptor.cs:497-502 | BTDB/FieldHandler/DictionaryFieldHandler.cs:349-354 | BTDB/FieldHandler/ListFieldHandler.cs:315-320 | BTDB/FieldHandler/ListFieldHandler.cs:331-336 | BTDB/FieldHandler/ListFieldHandler.cs:351-358 | BTDB/FieldHandler/ListFieldHandler.cs:376-381 | BTDB/FieldHandler/ListFieldOrderedHandler.cs:274-279 | BTDB/FieldHandler/ListFieldOrderedHandler.cs:287-292 | BTDB/FieldHandler/ListFieldOrderedHandler.cs:305-312 | BTDB/FieldHandler/ListFieldOrderedHandler.cs:327-332 | BTDB/Serialization/BonSerializer.cs:453-458 | BTDB/Serialization/BonSerializer.cs:527-532 | BTDB/Serialization/DefaultTypeConverterFactory.cs:1002-1007 | BTDB/Serialization/DefaultTypeConverterFactory.cs:1059-1064 | BTDB/Serialization/DefaultTypeConverterFactory.cs:1118-1123 | BTDB/Serialization/DefaultTypeConverterFactory.cs:1177-1182 — there are 25 copies across 7 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 25 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/EventStoreLayer/DictionaryTypeDescriptor.cs:301` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `BTDB/EventStoreLayer/ListTypeDescriptor.cs:309` calls `WriteVUInt32` and `BTDB/EventStoreLayer/ListTypeDescriptor.cs:440` does not — after which the two agree again for 5 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (5 lines × 14) BTDB/EventStoreLayer/ListTypeDescriptor.cs:310— BTDB/EventStoreLayer/ListTypeDescriptor.cs:310-314 | BTDB/EventStoreLayer/ListTypeDescriptor.cs:326-330 | BTDB/EventStoreLayer/ListTypeDescriptor.cs:371-375 | BTDB/EventStoreLayer/ListTypeDescriptor.cs:441-445 | BTDB/EventStoreLayer/ListTypeDescriptor.cs:456-460 | BTDB/EventStoreLayer/ListTypeDescriptor.cs:498-502 | BTDB/FieldHandler/ListFieldHandler.cs:316-320 | BTDB/FieldHandler/ListFieldHandler.cs:332-336 | BTDB/FieldHandler/ListFieldHandler.cs:377-381 | BTDB/FieldHandler/ListFieldOrderedHandler.cs:275-279 | BTDB/FieldHandler/ListFieldOrderedHandler.cs:288-292 | BTDB/FieldHandler/ListFieldOrderedHandler.cs:328-332 | BTDB/Serialization/BonSerializer.cs:423-427 | BTDB/Serialization/BonSerializer.cs:454-458 — there are 14 copies across 4 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 14 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/EventStoreLayer/ListTypeDescriptor.cs:310` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `BTDB/EventStoreLayer/ListTypeDescriptor.cs:309` calls `WriteVUInt32` and `BTDB/EventStoreLayer/ListTypeDescriptor.cs:440` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (5–6 lines × 2) BTDB.AzureStorage/AzureBlobFileCollection.cs:879— BTDB.AzureStorage/AzureBlobFileCollection.cs:879-883 | BTDB/KVDBLayer/Implementation/OnDiskMemoryMappedFileCollection.cs:197-202 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB.AzureStorage/AzureBlobFileCollection.cs:879` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (3–5 lines × 3) BTDB/Interpreter/Interpreter.cs:979— BTDB/Interpreter/Interpreter.cs:979-981 | BTDB/Interpreter/Interpreter.cs:990-994 | BTDB/Interpreter/Interpreter.cs:1075-1079 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `BTDB/Interpreter/Interpreter.cs:979` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Off the main sequence: BTDB BTDB/BTDB.csproj:1— BTDB: abstractness 0.23, instability 0.00, distance 0.77 — zone of pain — concrete and depended on by 4 project(s), so it's rigid to change.
IC1 · Incompleteness & stubs· Task never completes · ×1
Task never completes — nothing completes its TaskCompletionSource BTDB.Replication/EventLog/EventLogOwnerLane.cs:401— The local `full` hands out its `.Task`, and nothing in its scope ever calls `SetResult`/`TrySetResult`/`SetException`/`SetCanceled` on it or passes it on to anything that could — every caller that awaits the task waits for ever. Complete it where the awaited event happens, or return the real operation's task.
Skeleton type — most members are unfinished BTDB/ODBLayer/Constraint.cs:245— `ConstraintNotImplemented` has 4 unfinished members out of 4 declared members (methods, properties, indexers and events, whether or not each carries a body) — a scaffolded type that was never implemented.
Blocking `Compactor.CompactOnePureValueFileIteration` inside an `async` method BTDB/KVDBLayer/Implementation/Compactor.cs:180— `Compactor.CompactOnePureValueFileIteration` is a synchronous helper that blocks (`Thread.Sleep`): called from an `async` method it parks the thread exactly as the inline call would. Make the helper `async` and `await` it (`await Task.Delay`, `SemaphoreSlim.WaitAsync`, a `TaskCompletionSource` instead of the poll).
async void method: OnTimer BTDB/KVDBLayer/Implementation/CompactorScheduler.cs:94— `async void` can't be awaited and its exceptions crash the process instead of propagating. Return `Task` — or, where the delegate contract requires void (timer/event/callback registrations), make this a thin void shim that awaits a Task-returning inner method inside try/catch so exceptions are contained.
Blocking `ReplicationCompactor.CompactOnePureValueFileIteration` inside an `async` method BTDB/KVDBLayer/Implementation/ReplicationCompactor.cs:127— `ReplicationCompactor.CompactOnePureValueFileIteration` is a synchronous helper that blocks (`Thread.Sleep`): called from an `async` method it parks the thread exactly as the inline call would. Make the helper `async` and `await` it (`await Task.Delay`, `SemaphoreSlim.WaitAsync`, a `TaskCompletionSource` instead of the poll).
Blocking `CanonicalTrlPublisher.Dispose` inside an `async` method BTDB.Replication/LeadershipActivation.cs:89— `CanonicalTrlPublisher.Dispose` is a synchronous helper that blocks (`SemaphoreSlim.Wait`): called from an `async` method it parks the thread exactly as the inline call would. Make the helper `async` and `await` it (`await Task.Delay`, `SemaphoreSlim.WaitAsync`, a `TaskCompletionSource` instead of the poll).
Sync-over-async (deadlock risk) through `.Wait(…)` BTDB.LSM/LsmKeyValueDB.cs:183— `.Wait(…)` blocks this thread until the task completes or the bound expires — sync-over-async: it can deadlock under a synchronization context and it parks a thread while it waits. `await` the task (with `.WaitAsync(timeout, token)` where the bound matters).
X18 · Disposal-pattern correctness· Disposable acquired into a field and never released · ×1
Disposable acquired into a field and never released BTDB/Encrypted/AesGcmSymmetricCipher.cs:12— `_aesCbc` (line 12) holds a `Aes` that `AesGcmSymmetricCipher` acquires itself — every assignment to it is a call that opens or creates a new instance for the caller to own — and nothing in `AesGcmSymmetricCipher` ever releases it: the type is not `IDisposable`, declares no `Dispose`, and every other mention of `_aesCbc` only reads through it, so it is never disposed, closed, returned or handed on. Whatever it opened (a connection, a channel, a file) stays open until finalization if the type has a finalizer and until the process ends if it does not, once per instance of `AesGcmSymmetricCipher`. Implement `IDisposable` and release `_aesCbc` there, or take the instance from the caller so its owner ends it.
X18 · Disposal-pattern correctness· Release token given back after an unprotected call · ×1
Release token given back after an unprotected call DBBenchmark/Replication/ReplicationMeasurements.cs:210— `Storage` is declared `IDisposable` and nothing more, and every assignment to it takes a constructor parameter — so `Node` can do exactly one thing with it, which is the release performed here (line 210), and it is the only reference left that can perform it. That release is the tail of an unprotected sequence: `Files.DisposeAsync()` runs first (line 209), and nothing in `DisposeAsync` catches it. A single throw from that call skips the release entirely — and because a bare `IDisposable` carries no state to inspect and no second holder to fall back on, whatever it represents (a lock taken for this instance, a semaphore lease, a scope) is then held for the remaining lifetime of the process, with nothing left that could ever give it back. Wrap the calls that precede it in a `try` and move the release into the `finally`, so the one statement that must happen is the one that always happens.
Duplicated predicate BTDB.LSM/LsmKeyValueDB.cs:240— `!_isWriter || transaction.WriterEpoch != _epoch` appears character-identically in 2 files — BTDB.LSM/LsmKeyValueDB.Spill.cs, BTDB.LSM/LsmKeyValueDB.cs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate BTDB/EventStoreLayer/ListTypeDescriptor.cs:123— `!_itemDescriptor!.StoredInline || _itemDescriptor.AnyOpNeedsCtx()` appears character-identically in 2 files — BTDB/EventStoreLayer/ListTypeDescriptor.cs, BTDB/EventStoreLayer/NullableTypeDescriptor.cs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate BTDB/ODBLayer/RelationQuery.cs:1550— `!type.IsValueType || Nullable.GetUnderlyingType(type) != null` appears character-identically in 2 files — BTDB/ODBLayer/RelationQuery.cs, BTDB/ODBLayer/RelationQueryCache.cs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate BTDB/ODBLayer/ODBDictionary.cs:132— `(arrayIndex < 0) || (arrayIndex > array.Length)` appears character-identically in 2 files — BTDB/ODBLayer/ODBDictionary.cs, BTDB/ODBLayer/ODBSet.cs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate BTDB/KVDBLayer/Implementation/BTreeKeyValueDBCursor.cs:703— `(ulong)_keyIndex >= startIndex && (ulong)_keyIndex <= endIndex` appears character-identically in 2 files — BTDB/KVDBLayer/Implementation/BTreeKeyValueDBCursor.cs, BTDB/KVDBLayer/MemoryImplementation/InMemoryKeyValueDBCursor.cs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate BTDB/FieldHandler/EncryptedStringHandler.cs:187— `HandledType() == type || DefaultTypeConvertorGenerator.Instance.GenerateConversion(type, typeof(EncryptedString)) == null` appears character-identically in 2 files — BTDB/FieldHandler/EncryptedStringHandler.cs, BTDB/FieldHandler/OrderedEncryptedStringHandler.cs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate BTDB/FieldHandler/EncryptedStringHandler.cs:87— `HandledType() == type || DefaultTypeConvertorGenerator.Instance.GenerateConversion(typeof(EncryptedString), type) == null` appears character-identically in 2 files — BTDB/FieldHandler/EncryptedStringHandler.cs, BTDB/FieldHandler/OrderedEncryptedStringHandler.cs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate BTDB/EventStore2Layer/EventSerializer.cs:85— `IFieldHandler.UseNoEmitForDescriptors || typeof(IKnowDescriptor).IsAssignableFrom(type)` appears character-identically in 2 files — BTDB/EventStore2Layer/EventSerializer.cs, BTDB/EventStoreLayer/TypeSerializers.cs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate BTDB/Collections/RefDictionary.cs:362— `_count == entries.Length || entries.Length == 1` appears character-identically in 2 files — BTDB/Collections/RefDictionary.cs, BTDB/Collections/SpanByteNoRemoveDictionary.cs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate BTDB/KVDBLayer/Implementation/BTreeKeyValueDBCursor.cs:436— `_modifiedFromLastFind && _keyIndex != -1` appears character-identically in 2 files — BTDB/KVDBLayer/Implementation/BTreeKeyValueDBCursor.cs, BTDB/KVDBLayer/MemoryImplementation/InMemoryKeyValueDBCursor.cs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate BTDB/KVDBLayer/Implementation/BTreeKeyValueDBCursor.cs:246— `_modifiedFromLastFind && _removedCurrent && _keyIndex != -1` appears character-identically in 2 files — BTDB/KVDBLayer/Implementation/BTreeKeyValueDBCursor.cs, BTDB/KVDBLayer/MemoryImplementation/InMemoryKeyValueDBCursor.cs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate BTDB/KVDBLayer/Implementation/BTreeKeyValueDBCursor.cs:744— `_removedCurrent && (ulong)_keyIndex == index` appears character-identically in 2 files — BTDB/KVDBLayer/Implementation/BTreeKeyValueDBCursor.cs, BTDB/KVDBLayer/MemoryImplementation/InMemoryKeyValueDBCursor.cs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate BTDB/ODBLayer/RelationConstraintReverseEnumerator.cs:93— `_skipNextOn != -1 && i >= _skipNextOn - 1` appears character-identically in 2 files — BTDB/ODBLayer/RelationConstraintReverseEnumerator.cs, BTDB/ODBLayer/RelationEnumerator.cs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate BTDB/KVDBLayer/Implementation/Compactor.cs:51— `_totalLength != 0 && _valueLength == 0 && !_forbidToDelete` appears character-identically in 2 files — BTDB/KVDBLayer/Implementation/Compactor.cs, BTDB/KVDBLayer/Implementation/ReplicationCompactor.cs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate BTDB/EventStoreLayer/ListTypeDescriptor.cs:970— `_typeSerializers == typeSerializers && itemDesc == _itemDescriptor` appears character-identically in 2 files — BTDB/EventStoreLayer/ListTypeDescriptor.cs, BTDB/EventStoreLayer/NullableTypeDescriptor.cs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate BTDB/BTreeLib/RootNode12.cs:118— `_ulongs == null || idx >= _ulongs.Length` appears character-identically in 2 files — BTDB/BTreeLib/RootNode12.cs, BTDB/KVDBLayer/BTreeMem/BTreeRoot.cs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate BTDB/FieldHandler/EncryptedStringHandler.cs:56— `asType == typeof(EncryptedString) || asType == typeof(string)` appears character-identically in 2 files — BTDB/FieldHandler/EncryptedStringHandler.cs, BTDB/FieldHandler/OrderedEncryptedStringHandler.cs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate BTDB/ODBLayer/RelationConstraintReverseEnumerator.cs:143— `dataDidntChangedForConstraint < i && _skipNextOn == -1` appears character-identically in 2 files — BTDB/ODBLayer/RelationConstraintReverseEnumerator.cs, BTDB/ODBLayer/RelationEnumerator.cs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate BTDB/EventStoreLayer/ListTypeDescriptor.cs:49— `descriptor == _itemDescriptor && _name != null` appears character-identically in 2 files — BTDB/EventStoreLayer/ListTypeDescriptor.cs, BTDB/EventStoreLayer/NullableTypeDescriptor.cs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate BTDB.Replication/FileSystem/FileSystemReplicationStorage.cs:322— `file.FileId >= first && file.DeleteAfter != null` appears character-identically in 2 files — BTDB.Replication.Azure/AzureReplicationStorage.cs, BTDB.Replication/FileSystem/FileSystemReplicationStorage.cs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate DBBenchmark/EventLog/EventLogStorageScreening.cs:332— `filter != null && !name.Contains(filter, StringComparison.OrdinalIgnoreCase)` appears character-identically in 2 files — DBBenchmark/EventLog/EventLogStorageScreening.cs, DBBenchmark/LSM/LsmStorageScreening.cs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate REDACTED:76— `from == typeof(object) && !to.IsValueType` appears character-identically in 2 files — REDACTED, BTDB/Serialization/DefaultTypeConverterFactory.cs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate BTDB/EventStoreLayer/DictionaryTypeDescriptor.cs:503— `m.Name == nameof(IEnumerable.GetEnumerator) && m.ReturnType.IsValueType && m.GetParameters().Length == 0` appears character-identically in 2 files — BTDB/EventStoreLayer/DictionaryTypeDescriptor.cs, BTDB/EventStoreLayer/ListTypeDescriptor.cs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate BTDB/KVDBLayer/Implementation/Compactor.cs:273— `maxInOneFile < (ulong)_keyValueDB.FileSplitSize / 4 || totalWaste < (ulong)_keyValueDB.FileSplitSize` appears character-identically in 2 files — BTDB/KVDBLayer/Implementation/Compactor.cs, BTDB/KVDBLayer/Implementation/ReplicationCompactor.cs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate BTDB/FieldHandler/DictionaryFieldHandler.cs:302— `obj == null || !asType!.IsAssignableFrom(obj.GetType())` appears character-identically in 2 files — BTDB/FieldHandler/DictionaryFieldHandler.cs, BTDB/FieldHandler/ListFieldHandler.cs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
+ 14 more in this group — see findings.md.
P10 · Library API & versioning· Public type used only inside its own library · ×36
Public type used only inside its own library BTDB.BackendActions/Events.cs:6— `BTDB.BackendActions.ActionEnqueued` (BTDB.BackendActions/Events.cs:6) is public, and the library's own code uses it, but no other project in this repository uses it (read: `AotActionsSmoke`, `BTDB.BackendActions.Process.Test`, `BTDB.BackendActions.Test`, `BTDB.SourceGenerator.Tests`, `DBBenchmark`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such.
Public type used only inside its own library BTDB.BackendActions/Events.cs:19— `BTDB.BackendActions.ActionCancelRequested` (BTDB.BackendActions/Events.cs:19) is public, and the library's own code uses it, but no other project in this repository uses it (read: `AotActionsSmoke`, `BTDB.BackendActions.Process.Test`, `BTDB.BackendActions.Test`, `BTDB.SourceGenerator.Tests`, `DBBenchmark`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such.
Public type used only inside its own library BTDB.BackendActions/Events.cs:93— `BTDB.BackendActions.ActionsSuspended` (BTDB.BackendActions/Events.cs:93) is public, and the library's own code uses it, but no other project in this repository uses it (read: `AotActionsSmoke`, `BTDB.BackendActions.Process.Test`, `BTDB.BackendActions.Test`, `BTDB.SourceGenerator.Tests`, `DBBenchmark`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such.
Public type used only inside its own library BTDB.BackendActions/Import.cs:28— `BTDB.BackendActions.ActionsImported` (BTDB.BackendActions/Import.cs:28) is public, and the library's own code uses it, but no other project in this repository uses it (read: `AotActionsSmoke`, `BTDB.BackendActions.Process.Test`, `BTDB.BackendActions.Test`, `BTDB.SourceGenerator.Tests`, `DBBenchmark`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such.
Public type used only inside its own library BTDB.BackendActions/Storage.cs:146— `BTDB.BackendActions.IBackendActionsStates` (BTDB.BackendActions/Storage.cs:146) is public, and the library's own code uses it, but no other project in this repository uses it (read: `AotActionsSmoke`, `BTDB.BackendActions.Process.Test`, `BTDB.BackendActions.Test`, `BTDB.SourceGenerator.Tests`, `DBBenchmark`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such.
Public type used only inside its own library BTDB.SourceGenerator/EquatableArray.cs:132— `BTDB.SourceGenerator.EquatableArray` (BTDB.SourceGenerator/EquatableArray.cs:132) is public, and the library's own code uses it, but no other project in this repository uses it (read: `BTDB.SourceGenerator.Tests`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such.
Public type used only inside its own library BTDB/EventStoreLayer/AppendingEventStore.cs:8— `BTDB.EventStoreLayer.AppendingEventStore` (BTDB/EventStoreLayer/AppendingEventStore.cs:8) is public, and the library's own code uses it, but no other project in this repository uses it (read: `AotActionsSmoke`, `AotQuerySmoke`, `BTDB.AzureStorage`, `BTDB.AzureStorage.Test`, `BTDB.BackendActions`, `BTDB.BackendActions.Process.Test`, `BTDB.BackendActions.Test`, `BTDB.LSM`, `BTDB.LSM.Azure`, `BTDB.LSM.Azure.Test`, `BTDB.LSM.Process.Test`, `BTDB.LSM.Test`, `BTDB.Replication`, `BTDB.Replication.Azure`, `BTDB.Replication.Azure.Test`, `BTDB.Replication.EventSourcing`, `BTDB.Replication.EventSourcing.Test`, `BTDB.Replication.Http`, `BTDB.Replication.Http.Test`, `BTDB.Replication.Process.Test`, `BTDB.Replication.Test`, `BTDB.SourceGenerator.Sample`, `BTDB.SourceGenerator.Tests`, `BTDBTest`, `DBBenchmark`, `EventLogBench`, `ODbDump`, `Sample3rdPartyLib`, `SimpleTester`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such.
Public type used only inside its own library BTDB/EventStoreLayer/ByteArrayTypeDescriptor.cs:13— `BTDB.EventStoreLayer.ByteArrayTypeDescriptor` (BTDB/EventStoreLayer/ByteArrayTypeDescriptor.cs:13) is public, and the library's own code uses it, but no other project in this repository uses it (read: `AotActionsSmoke`, `AotQuerySmoke`, `BTDB.AzureStorage`, `BTDB.AzureStorage.Test`, `BTDB.BackendActions`, `BTDB.BackendActions.Process.Test`, `BTDB.BackendActions.Test`, `BTDB.LSM`, `BTDB.LSM.Azure`, `BTDB.LSM.Azure.Test`, `BTDB.LSM.Process.Test`, `BTDB.LSM.Test`, `BTDB.Replication`, `BTDB.Replication.Azure`, `BTDB.Replication.Azure.Test`, `BTDB.Replication.EventSourcing`, `BTDB.Replication.EventSourcing.Test`, `BTDB.Replication.Http`, `BTDB.Replication.Http.Test`, `BTDB.Replication.Process.Test`, `BTDB.Replication.Test`, `BTDB.SourceGenerator.Sample`, `BTDB.SourceGenerator.Tests`, `BTDBTest`, `DBBenchmark`, `EventLogBench`, `ODbDump`, `Sample3rdPartyLib`, `SimpleTester`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such.
Public type used only inside its own library BTDB/EventStoreLayer/EncryptedStringDescriptor.cs:13— `BTDB.EventStoreLayer.EncryptedStringDescriptor` (BTDB/EventStoreLayer/EncryptedStringDescriptor.cs:13) is public, and the library's own code uses it, but no other project in this repository uses it (read: `AotActionsSmoke`, `AotQuerySmoke`, `BTDB.AzureStorage`, `BTDB.AzureStorage.Test`, `BTDB.BackendActions`, `BTDB.BackendActions.Process.Test`, `BTDB.BackendActions.Test`, `BTDB.LSM`, `BTDB.LSM.Azure`, `BTDB.LSM.Azure.Test`, `BTDB.LSM.Process.Test`, `BTDB.LSM.Test`, `BTDB.Replication`, `BTDB.Replication.Azure`, `BTDB.Replication.Azure.Test`, `BTDB.Replication.EventSourcing`, `BTDB.Replication.EventSourcing.Test`, `BTDB.Replication.Http`, `BTDB.Replication.Http.Test`, `BTDB.Replication.Process.Test`, `BTDB.Replication.Test`, `BTDB.SourceGenerator.Sample`, `BTDB.SourceGenerator.Tests`, `BTDBTest`, `DBBenchmark`, `EventLogBench`, `ODbDump`, `Sample3rdPartyLib`, `SimpleTester`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such.
Public type used only inside its own library BTDB/EventStoreLayer/ITypeSerializerMappingFactory.cs:3— `BTDB.EventStoreLayer.ITypeSerializerMappingFactory` (BTDB/EventStoreLayer/ITypeSerializerMappingFactory.cs:3) is public, and the library's own code uses it, but no other project in this repository uses it (read: `AotActionsSmoke`, `AotQuerySmoke`, `BTDB.AzureStorage`, `BTDB.AzureStorage.Test`, `BTDB.BackendActions`, `BTDB.BackendActions.Process.Test`, `BTDB.BackendActions.Test`, `BTDB.LSM`, `BTDB.LSM.Azure`, `BTDB.LSM.Azure.Test`, `BTDB.LSM.Process.Test`, `BTDB.LSM.Test`, `BTDB.Replication`, `BTDB.Replication.Azure`, `BTDB.Replication.Azure.Test`, `BTDB.Replication.EventSourcing`, `BTDB.Replication.EventSourcing.Test`, `BTDB.Replication.Http`, `BTDB.Replication.Http.Test`, `BTDB.Replication.Process.Test`, `BTDB.Replication.Test`, `BTDB.SourceGenerator.Sample`, `BTDB.SourceGenerator.Tests`, `BTDBTest`, `DBBenchmark`, `EventLogBench`, `ODbDump`, `Sample3rdPartyLib`, `SimpleTester`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such.
Public type used only inside its own library BTDB/EventStoreLayer/SimpleTypeDescriptor.cs:12— `BTDB.EventStoreLayer.SimpleTypeDescriptor` (BTDB/EventStoreLayer/SimpleTypeDescriptor.cs:12) is public, and the library's own code uses it, but no other project in this repository uses it (read: `AotActionsSmoke`, `AotQuerySmoke`, `BTDB.AzureStorage`, `BTDB.AzureStorage.Test`, `BTDB.BackendActions`, `BTDB.BackendActions.Process.Test`, `BTDB.BackendActions.Test`, `BTDB.LSM`, `BTDB.LSM.Azure`, `BTDB.LSM.Azure.Test`, `BTDB.LSM.Process.Test`, `BTDB.LSM.Test`, `BTDB.Replication`, `BTDB.Replication.Azure`, `BTDB.Replication.Azure.Test`, `BTDB.Replication.EventSourcing`, `BTDB.Replication.EventSourcing.Test`, `BTDB.Replication.Http`, `BTDB.Replication.Http.Test`, `BTDB.Replication.Process.Test`, `BTDB.Replication.Test`, `BTDB.SourceGenerator.Sample`, `BTDB.SourceGenerator.Tests`, `BTDBTest`, `DBBenchmark`, `EventLogBench`, `ODbDump`, `Sample3rdPartyLib`, `SimpleTester`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such.
Public type used only inside its own library BTDB/EventStoreLayer/SnappyCompressionStrategy.cs:6— `BTDB.EventStoreLayer.SnappyCompressionStrategy` (BTDB/EventStoreLayer/SnappyCompressionStrategy.cs:6) is public, and the library's own code uses it, but no other project in this repository uses it (read: `AotActionsSmoke`, `AotQuerySmoke`, `BTDB.AzureStorage`, `BTDB.AzureStorage.Test`, `BTDB.BackendActions`, `BTDB.BackendActions.Process.Test`, `BTDB.BackendActions.Test`, `BTDB.LSM`, `BTDB.LSM.Azure`, `BTDB.LSM.Azure.Test`, `BTDB.LSM.Process.Test`, `BTDB.LSM.Test`, `BTDB.Replication`, `BTDB.Replication.Azure`, `BTDB.Replication.Azure.Test`, `BTDB.Replication.EventSourcing`, `BTDB.Replication.EventSourcing.Test`, `BTDB.Replication.Http`, `BTDB.Replication.Http.Test`, `BTDB.Replication.Process.Test`, `BTDB.Replication.Test`, `BTDB.SourceGenerator.Sample`, `BTDB.SourceGenerator.Tests`, `BTDBTest`, `DBBenchmark`, `EventLogBench`, `ODbDump`, `Sample3rdPartyLib`, `SimpleTester`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such.
Public type used only inside its own library BTDB/FieldHandler/ByteArrayLastFieldHandler.cs:10— `BTDB.FieldHandler.ByteArrayLastFieldHandler` (BTDB/FieldHandler/ByteArrayLastFieldHandler.cs:10) is public, and the library's own code uses it, but no other project in this repository uses it (read: `AotActionsSmoke`, `AotQuerySmoke`, `BTDB.AzureStorage`, `BTDB.AzureStorage.Test`, `BTDB.BackendActions`, `BTDB.BackendActions.Process.Test`, `BTDB.BackendActions.Test`, `BTDB.LSM`, `BTDB.LSM.Azure`, `BTDB.LSM.Azure.Test`, `BTDB.LSM.Process.Test`, `BTDB.LSM.Test`, `BTDB.Replication`, `BTDB.Replication.Azure`, `BTDB.Replication.Azure.Test`, `BTDB.Replication.EventSourcing`, `BTDB.Replication.EventSourcing.Test`, `BTDB.Replication.Http`, `BTDB.Replication.Http.Test`, `BTDB.Replication.Process.Test`, `BTDB.Replication.Test`, `BTDB.SourceGenerator.Sample`, `BTDB.SourceGenerator.Tests`, `BTDBTest`, `DBBenchmark`, `EventLogBench`, `ODbDump`, `Sample3rdPartyLib`, `SimpleTester`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such.
Public type used only inside its own library BTDB/FieldHandler/DBObjectFieldHandler.cs:14— `BTDB.FieldHandler.DBObjectFieldHandler` (BTDB/FieldHandler/DBObjectFieldHandler.cs:14) is public, and the library's own code uses it, but no other project in this repository uses it (read: `AotActionsSmoke`, `AotQuerySmoke`, `BTDB.AzureStorage`, `BTDB.AzureStorage.Test`, `BTDB.BackendActions`, `BTDB.BackendActions.Process.Test`, `BTDB.BackendActions.Test`, `BTDB.LSM`, `BTDB.LSM.Azure`, `BTDB.LSM.Azure.Test`, `BTDB.LSM.Process.Test`, `BTDB.LSM.Test`, `BTDB.Replication`, `BTDB.Replication.Azure`, `BTDB.Replication.Azure.Test`, `BTDB.Replication.EventSourcing`, `BTDB.Replication.EventSourcing.Test`, `BTDB.Replication.Http`, `BTDB.Replication.Http.Test`, `BTDB.Replication.Process.Test`, `BTDB.Replication.Test`, `BTDB.SourceGenerator.Sample`, `BTDB.SourceGenerator.Tests`, `BTDBTest`, `DBBenchmark`, `EventLogBench`, `ODbDump`, `Sample3rdPartyLib`, `SimpleTester`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such.
Public type used only inside its own library BTDB/FieldHandler/DictionaryFieldHandler.cs:13— `BTDB.FieldHandler.DictionaryFieldHandler` (BTDB/FieldHandler/DictionaryFieldHandler.cs:13) is public, and the library's own code uses it, but no other project in this repository uses it (read: `AotActionsSmoke`, `AotQuerySmoke`, `BTDB.AzureStorage`, `BTDB.AzureStorage.Test`, `BTDB.BackendActions`, `BTDB.BackendActions.Process.Test`, `BTDB.BackendActions.Test`, `BTDB.LSM`, `BTDB.LSM.Azure`, `BTDB.LSM.Azure.Test`, `BTDB.LSM.Process.Test`, `BTDB.LSM.Test`, `BTDB.Replication`, `BTDB.Replication.Azure`, `BTDB.Replication.Azure.Test`, `BTDB.Replication.EventSourcing`, `BTDB.Replication.EventSourcing.Test`, `BTDB.Replication.Http`, `BTDB.Replication.Http.Test`, `BTDB.Replication.Process.Test`, `BTDB.Replication.Test`, `BTDB.SourceGenerator.Sample`, `BTDB.SourceGenerator.Tests`, `BTDBTest`, `DBBenchmark`, `EventLogBench`, `ODbDump`, `Sample3rdPartyLib`, `SimpleTester`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such.
Public type used only inside its own library BTDB/FieldHandler/EncryptedStringHandler.cs:11— `BTDB.FieldHandler.EncryptedStringHandler` (BTDB/FieldHandler/EncryptedStringHandler.cs:11) is public, and the library's own code uses it, but no other project in this repository uses it (read: `AotActionsSmoke`, `AotQuerySmoke`, `BTDB.AzureStorage`, `BTDB.AzureStorage.Test`, `BTDB.BackendActions`, `BTDB.BackendActions.Process.Test`, `BTDB.BackendActions.Test`, `BTDB.LSM`, `BTDB.LSM.Azure`, `BTDB.LSM.Azure.Test`, `BTDB.LSM.Process.Test`, `BTDB.LSM.Test`, `BTDB.Replication`, `BTDB.Replication.Azure`, `BTDB.Replication.Azure.Test`, `BTDB.Replication.EventSourcing`, `BTDB.Replication.EventSourcing.Test`, `BTDB.Replication.Http`, `BTDB.Replication.Http.Test`, `BTDB.Replication.Process.Test`, `BTDB.Replication.Test`, `BTDB.SourceGenerator.Sample`, `BTDB.SourceGenerator.Tests`, `BTDBTest`, `DBBenchmark`, `EventLogBench`, `ODbDump`, `Sample3rdPartyLib`, `SimpleTester`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such.
Public type used only inside its own library BTDB/FieldHandler/ListFieldHandler.cs:14— `BTDB.FieldHandler.ListFieldHandler` (BTDB/FieldHandler/ListFieldHandler.cs:14) is public, and the library's own code uses it, but no other project in this repository uses it (read: `AotActionsSmoke`, `AotQuerySmoke`, `BTDB.AzureStorage`, `BTDB.AzureStorage.Test`, `BTDB.BackendActions`, `BTDB.BackendActions.Process.Test`, `BTDB.BackendActions.Test`, `BTDB.LSM`, `BTDB.LSM.Azure`, `BTDB.LSM.Azure.Test`, `BTDB.LSM.Process.Test`, `BTDB.LSM.Test`, `BTDB.Replication`, `BTDB.Replication.Azure`, `BTDB.Replication.Azure.Test`, `BTDB.Replication.EventSourcing`, `BTDB.Replication.EventSourcing.Test`, `BTDB.Replication.Http`, `BTDB.Replication.Http.Test`, `BTDB.Replication.Process.Test`, `BTDB.Replication.Test`, `BTDB.SourceGenerator.Sample`, `BTDB.SourceGenerator.Tests`, `BTDBTest`, `DBBenchmark`, `EventLogBench`, `ODbDump`, `Sample3rdPartyLib`, `SimpleTester`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such.
Public type used only inside its own library BTDB/FieldHandler/ListFieldOrderedHandler.cs:13— `BTDB.FieldHandler.ListFieldOrderedHandler` (BTDB/FieldHandler/ListFieldOrderedHandler.cs:13) is public, and the library's own code uses it, but no other project in this repository uses it (read: `AotActionsSmoke`, `AotQuerySmoke`, `BTDB.AzureStorage`, `BTDB.AzureStorage.Test`, `BTDB.BackendActions`, `BTDB.BackendActions.Process.Test`, `BTDB.BackendActions.Test`, `BTDB.LSM`, `BTDB.LSM.Azure`, `BTDB.LSM.Azure.Test`, `BTDB.LSM.Process.Test`, `BTDB.LSM.Test`, `BTDB.Replication`, `BTDB.Replication.Azure`, `BTDB.Replication.Azure.Test`, `BTDB.Replication.EventSourcing`, `BTDB.Replication.EventSourcing.Test`, `BTDB.Replication.Http`, `BTDB.Replication.Http.Test`, `BTDB.Replication.Process.Test`, `BTDB.Replication.Test`, `BTDB.SourceGenerator.Sample`, `BTDB.SourceGenerator.Tests`, `BTDBTest`, `DBBenchmark`, `EventLogBench`, `ODbDump`, `Sample3rdPartyLib`, `SimpleTester`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such.
Public type used only inside its own library BTDB/FieldHandler/NullableFieldHandler.cs:11— `BTDB.FieldHandler.NullableFieldHandler` (BTDB/FieldHandler/NullableFieldHandler.cs:11) is public, and the library's own code uses it, but no other project in this repository uses it (read: `AotActionsSmoke`, `AotQuerySmoke`, `BTDB.AzureStorage`, `BTDB.AzureStorage.Test`, `BTDB.BackendActions`, `BTDB.BackendActions.Process.Test`, `BTDB.BackendActions.Test`, `BTDB.LSM`, `BTDB.LSM.Azure`, `BTDB.LSM.Azure.Test`, `BTDB.LSM.Process.Test`, `BTDB.LSM.Test`, `BTDB.Replication`, `BTDB.Replication.Azure`, `BTDB.Replication.Azure.Test`, `BTDB.Replication.EventSourcing`, `BTDB.Replication.EventSourcing.Test`, `BTDB.Replication.Http`, `BTDB.Replication.Http.Test`, `BTDB.Replication.Process.Test`, `BTDB.Replication.Test`, `BTDB.SourceGenerator.Sample`, `BTDB.SourceGenerator.Tests`, `BTDBTest`, `DBBenchmark`, `EventLogBench`, `ODbDump`, `Sample3rdPartyLib`, `SimpleTester`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such.
Public type used only inside its own library BTDB/FieldHandler/OrderedEncryptedStringHandler.cs:11— `BTDB.FieldHandler.OrderedEncryptedStringHandler` (BTDB/FieldHandler/OrderedEncryptedStringHandler.cs:11) is public, and the library's own code uses it, but no other project in this repository uses it (read: `AotActionsSmoke`, `AotQuerySmoke`, `BTDB.AzureStorage`, `BTDB.AzureStorage.Test`, `BTDB.BackendActions`, `BTDB.BackendActions.Process.Test`, `BTDB.BackendActions.Test`, `BTDB.LSM`, `BTDB.LSM.Azure`, `BTDB.LSM.Azure.Test`, `BTDB.LSM.Process.Test`, `BTDB.LSM.Test`, `BTDB.Replication`, `BTDB.Replication.Azure`, `BTDB.Replication.Azure.Test`, `BTDB.Replication.EventSourcing`, `BTDB.Replication.EventSourcing.Test`, `BTDB.Replication.Http`, `BTDB.Replication.Http.Test`, `BTDB.Replication.Process.Test`, `BTDB.Replication.Test`, `BTDB.SourceGenerator.Sample`, `BTDB.SourceGenerator.Tests`, `BTDBTest`, `DBBenchmark`, `EventLogBench`, `ODbDump`, `Sample3rdPartyLib`, `SimpleTester`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such.
Public type used only inside its own library BTDB/FieldHandler/SignedFieldHandler.cs:7— `BTDB.FieldHandler.SignedFieldHandler` (BTDB/FieldHandler/SignedFieldHandler.cs:7) is public, and the library's own code uses it, but no other project in this repository uses it (read: `AotActionsSmoke`, `AotQuerySmoke`, `BTDB.AzureStorage`, `BTDB.AzureStorage.Test`, `BTDB.BackendActions`, `BTDB.BackendActions.Process.Test`, `BTDB.BackendActions.Test`, `BTDB.LSM`, `BTDB.LSM.Azure`, `BTDB.LSM.Azure.Test`, `BTDB.LSM.Process.Test`, `BTDB.LSM.Test`, `BTDB.Replication`, `BTDB.Replication.Azure`, `BTDB.Replication.Azure.Test`, `BTDB.Replication.EventSourcing`, `BTDB.Replication.EventSourcing.Test`, `BTDB.Replication.Http`, `BTDB.Replication.Http.Test`, `BTDB.Replication.Process.Test`, `BTDB.Replication.Test`, `BTDB.SourceGenerator.Sample`, `BTDB.SourceGenerator.Tests`, `BTDBTest`, `DBBenchmark`, `EventLogBench`, `ODbDump`, `Sample3rdPartyLib`, `SimpleTester`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such.
Public type used only inside its own library BTDB/FieldHandler/SimpleFieldHandlerJustOrderableBase.cs:6— `BTDB.FieldHandler.SimpleFieldHandlerJustOrderableBase` (BTDB/FieldHandler/SimpleFieldHandlerJustOrderableBase.cs:6) is public, and the library's own code uses it, but no other project in this repository uses it (read: `AotActionsSmoke`, `AotQuerySmoke`, `BTDB.AzureStorage`, `BTDB.AzureStorage.Test`, `BTDB.BackendActions`, `BTDB.BackendActions.Process.Test`, `BTDB.BackendActions.Test`, `BTDB.LSM`, `BTDB.LSM.Azure`, `BTDB.LSM.Azure.Test`, `BTDB.LSM.Process.Test`, `BTDB.LSM.Test`, `BTDB.Replication`, `BTDB.Replication.Azure`, `BTDB.Replication.Azure.Test`, `BTDB.Replication.EventSourcing`, `BTDB.Replication.EventSourcing.Test`, `BTDB.Replication.Http`, `BTDB.Replication.Http.Test`, `BTDB.Replication.Process.Test`, `BTDB.Replication.Test`, `BTDB.SourceGenerator.Sample`, `BTDB.SourceGenerator.Tests`, `BTDBTest`, `DBBenchmark`, `EventLogBench`, `ODbDump`, `Sample3rdPartyLib`, `SimpleTester`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such.
Public type used only inside its own library BTDB/FieldHandler/TupleFieldHandler.cs:14— `BTDB.FieldHandler.TupleFieldHandler` (BTDB/FieldHandler/TupleFieldHandler.cs:14) is public, and the library's own code uses it, but no other project in this repository uses it (read: `AotActionsSmoke`, `AotQuerySmoke`, `BTDB.AzureStorage`, `BTDB.AzureStorage.Test`, `BTDB.BackendActions`, `BTDB.BackendActions.Process.Test`, `BTDB.BackendActions.Test`, `BTDB.LSM`, `BTDB.LSM.Azure`, `BTDB.LSM.Azure.Test`, `BTDB.LSM.Process.Test`, `BTDB.LSM.Test`, `BTDB.Replication`, `BTDB.Replication.Azure`, `BTDB.Replication.Azure.Test`, `BTDB.Replication.EventSourcing`, `BTDB.Replication.EventSourcing.Test`, `BTDB.Replication.Http`, `BTDB.Replication.Http.Test`, `BTDB.Replication.Process.Test`, `BTDB.Replication.Test`, `BTDB.SourceGenerator.Sample`, `BTDB.SourceGenerator.Tests`, `BTDBTest`, `DBBenchmark`, `EventLogBench`, `ODbDump`, `Sample3rdPartyLib`, `SimpleTester`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such.
Public type used only inside its own library BTDB/FieldHandler/UnsignedFieldHandler.cs:7— `BTDB.FieldHandler.UnsignedFieldHandler` (BTDB/FieldHandler/UnsignedFieldHandler.cs:7) is public, and the library's own code uses it, but no other project in this repository uses it (read: `AotActionsSmoke`, `AotQuerySmoke`, `BTDB.AzureStorage`, `BTDB.AzureStorage.Test`, `BTDB.BackendActions`, `BTDB.BackendActions.Process.Test`, `BTDB.BackendActions.Test`, `BTDB.LSM`, `BTDB.LSM.Azure`, `BTDB.LSM.Azure.Test`, `BTDB.LSM.Process.Test`, `BTDB.LSM.Test`, `BTDB.Replication`, `BTDB.Replication.Azure`, `BTDB.Replication.Azure.Test`, `BTDB.Replication.EventSourcing`, `BTDB.Replication.EventSourcing.Test`, `BTDB.Replication.Http`, `BTDB.Replication.Http.Test`, `BTDB.Replication.Process.Test`, `BTDB.Replication.Test`, `BTDB.SourceGenerator.Sample`, `BTDB.SourceGenerator.Tests`, `BTDBTest`, `DBBenchmark`, `EventLogBench`, `ODbDump`, `Sample3rdPartyLib`, `SimpleTester`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such.
Public type used only inside its own library BTDB/IOC/ContainerImpl.cs:1078— `BTDB.IOC.ResolvingCtx` (BTDB/IOC/ContainerImpl.cs:1078) is public, and the library's own code uses it, but no other project in this repository uses it (read: `AotActionsSmoke`, `AotQuerySmoke`, `BTDB.AzureStorage`, `BTDB.AzureStorage.Test`, `BTDB.BackendActions`, `BTDB.BackendActions.Process.Test`, `BTDB.BackendActions.Test`, `BTDB.LSM`, `BTDB.LSM.Azure`, `BTDB.LSM.Azure.Test`, `BTDB.LSM.Process.Test`, `BTDB.LSM.Test`, `BTDB.Replication`, `BTDB.Replication.Azure`, `BTDB.Replication.Azure.Test`, `BTDB.Replication.EventSourcing`, `BTDB.Replication.EventSourcing.Test`, `BTDB.Replication.Http`, `BTDB.Replication.Http.Test`, `BTDB.Replication.Process.Test`, `BTDB.Replication.Test`, `BTDB.SourceGenerator.Sample`, `BTDB.SourceGenerator.Tests`, `BTDBTest`, `DBBenchmark`, `EventLogBench`, `ODbDump`, `Sample3rdPartyLib`, `SimpleTester`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such.
Silent fallback default in catch BTDB/ChunkCache/DiskChunkCache.cs:127— `LoadContent` swallows `EndOfStreamException` and sets `fileInfo = UnknownFile.Instance;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch BTDB/Encrypted/AesGcmSymmetricCipher.cs:60— `Decrypt` swallows `CryptographicException` into `return false;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch BTDB/FieldHandler/DefaultFieldHandlerLogger.cs:65— `TryGetHandledType` swallows every exception into `return null;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch BTDB/KVDBLayer/Implementation/BTreeKeyValueDB.cs:799— `LoadUsedFilesFromKeyIndex` swallows every exception into `return false;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch BTDB/KVDBLayer/Implementation/BTreeKeyValueDB.cs:815— `LoadKeyIndex` swallows every exception into `return false;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch BTDB/KVDBLayer/Implementation/FileCollectionWithFileInfos.cs:159— `ReadFileInfo` swallows `EndOfStreamException` into `return UnknownFile.Instance;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch BTDB/KVDBLayer/Implementation/FileCollectionWithFileInfos.cs:191— `ReadFileInfo` swallows every exception into `return UnknownFile.Instance;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch BTDB/ODBLayer/RelationInfo.cs:139— `TryCreateTargetFieldHandler` swallows every exception into `return null;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch Releaser/Releaser/Program.cs:138— `MainAsync` swallows every exception into `return 1;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch BTDB.AzureStorage/AzureBlobStorageBackend.cs:157— `GetCommittedBlocksAsync` swallows `RequestFailedException` into `return [];` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch BTDB.Replication/EventLog/EventLogService.cs:384— `SubmitLocalAsync` swallows `EventLogSequenceGapException` into `return false;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch BTDB.Replication.Azure/AzureEventLogStorage.cs:148— `WriteAsync` swallows `RequestFailedException` into `return EventLogWriteResult.Rejected;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch BTDB.Replication.Azure/AzureEventLogStorage.cs:162— `SetOwnerAsync` swallows `RequestFailedException` into `return EventLogWriteResult.Rejected;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch BTDB.Replication.Azure/AzureLeaderStorage.cs:112— `WriteAsync` swallows `RequestFailedException` into `return LeaderWriteOutcome.Rejected;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch BTDB.LSM/LsmKeyValueDBCursor.cs:297— `IsValueCorrupted` swallows every exception into `return true;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch BTDB.LSM.Azure/AzureLsmStorage.cs:100— `CreateAsync` swallows `RequestFailedException` into `return LsmWriteOutcome.Rejected;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch BTDB.LSM.Azure/AzureLsmStorage.cs:231— `RenewLeaseAsync` swallows `RequestFailedException` into `return false;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch BTDB.BackendActions/ActionWorker.cs:296— `RunAsync` swallows every exception and sets `lost = true;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
IC1 · Incompleteness & stubs· Member throws NotSupportedException · ×16
Member throws NotSupportedException BTDB.AzureStorage/AzureBlobFileCollection.cs:808— `SetCurrentPosition`'s body only throws NotSupportedException — sometimes a deliberate contract, often an unfinished stub. Confirm it's intentional.
Member throws NotSupportedException BTDB.AzureStorage/AzureBlobFileCollection.cs:892— `SetCurrentPosition`'s body only throws NotSupportedException — sometimes a deliberate contract, often an unfinished stub. Confirm it's intentional.
Member throws NotSupportedException BTDB.AzureStorage/AzureBlobFileCollection.cs:1114— `SetCurrentPosition`'s body only throws NotSupportedException — sometimes a deliberate contract, often an unfinished stub. Confirm it's intentional.
Member throws NotSupportedException BTDB.AzureStorage/AzureBlobFileCollection.cs:1175— `SetCurrentPosition`'s body only throws NotSupportedException — sometimes a deliberate contract, often an unfinished stub. Confirm it's intentional.
Member throws NotSupportedException BTDB.Replication.Azure/AzureReplicationStorage.cs:587— `Read`'s body only throws NotSupportedException — sometimes a deliberate contract, often an unfinished stub. Confirm it's intentional.
Member throws NotSupportedException BTDB/Collections/HashHelpers.cs:49— `ThrowNotSupportedException`'s body only throws NotSupportedException — sometimes a deliberate contract, often an unfinished stub. Confirm it's intentional.
Member throws NotSupportedException BTDB/Encrypted/InvalidSymmetricCipher.cs:7— `CalcEncryptedSizeFor`'s body only throws NotSupportedException — sometimes a deliberate contract, often an unfinished stub. Confirm it's intentional.
Member throws NotSupportedException BTDB/Encrypted/InvalidSymmetricCipher.cs:12— `Encrypt`'s body only throws NotSupportedException — sometimes a deliberate contract, often an unfinished stub. Confirm it's intentional.
Member throws NotSupportedException BTDB/Encrypted/InvalidSymmetricCipher.cs:17— `CalcPlainSizeFor`'s body only throws NotSupportedException — sometimes a deliberate contract, often an unfinished stub. Confirm it's intentional.
Member throws NotSupportedException BTDB/Encrypted/InvalidSymmetricCipher.cs:22— `Decrypt`'s body only throws NotSupportedException — sometimes a deliberate contract, often an unfinished stub. Confirm it's intentional.
Member throws NotSupportedException BTDB/Encrypted/InvalidSymmetricCipher.cs:27— `CalcOrderedEncryptedSizeFor`'s body only throws NotSupportedException — sometimes a deliberate contract, often an unfinished stub. Confirm it's intentional.
Member throws NotSupportedException BTDB/Encrypted/InvalidSymmetricCipher.cs:32— `OrderedEncrypt`'s body only throws NotSupportedException — sometimes a deliberate contract, often an unfinished stub. Confirm it's intentional.
Member throws NotSupportedException BTDB/Encrypted/InvalidSymmetricCipher.cs:37— `CalcOrderedPlainSizeFor`'s body only throws NotSupportedException — sometimes a deliberate contract, often an unfinished stub. Confirm it's intentional.
Member throws NotSupportedException BTDB/Encrypted/InvalidSymmetricCipher.cs:42— `OrderedDecrypt`'s body only throws NotSupportedException — sometimes a deliberate contract, often an unfinished stub. Confirm it's intentional.
Member throws NotSupportedException BTDB/EventStoreLayer/OrderedDictionaryWithDescriptor.cs:14— `GetAdvancedEnumerator`'s body only throws NotSupportedException — sometimes a deliberate contract, often an unfinished stub. Confirm it's intentional.
Member throws NotSupportedException BTDB/EventStoreLayer/OrderedDictionaryWithDescriptor.cs:17— `GetDecreasingEnumerator`'s body only throws NotSupportedException — sometimes a deliberate contract, often an unfinished stub. Confirm it's intentional.
Fat interface: ICursor (33 members) BTDB/BTreeLib/ICursor.cs:8— `ICursor` declares 33 members: `SetNewRoot`, `Invalidate`, `Clone`, `FindExact`, `FindFirst`, `FindLastWithPrefix`, `Find`, `SeekIndex`, `MoveNext`, `MovePrevious`, `CalcIndex`, `IsValid`, `GetKeyLength`, `GetKeyParts`, `GetKey`, `GetKeyMemory`, `GetKeySpan`, `GetKeySpan`, `KeyHasPrefix`, `GetValueLength`, `GetValue`, `WriteValue`, `RefreshNodes`, `Upsert`, `UpdateKeySuffix`, `Erase`, `EraseTo`, `BuildTree`, `ValueReplacer`, `GetKeyAsArray`, `TestTreeCorrectness`, `FastIterate`, `FastIterateNoCursor`. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. Those 33 declarations carry 32 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 32 operations clears the >15 bar on its own, so the row is about responsibilities, not signatures. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
Fat interface: IRootNode (23 members) BTDB/BTreeLib/IRootNode.cs:11— `IRootNode` declares 23 members: `Reference`, `Dereference`, `ShouldBeDisposed`, `Next`, `CommitUlong`, `TransactionId`, `TrLogFileId`, `TrLogOffset`, `DescriptionForLeaks`, `Snapshot`, `CreateWritableTransaction`, `Commit`, `RevertTo`, `CreateCursor`, `GetCount`, `GetUlong`, `SetUlong`, `GetUlongCount`, `UlongsArray`, `ValuesIterate`, `KeyValueIterate`, `CalcBTreeStats`, `GatherUsedFiles`. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
Fat interface: ITypeDescriptor (24 members) BTDB/EventStoreLayer/ITypeDescriptor.cs:14— `ITypeDescriptor` declares 24 members: `Name`, `FinishBuildFromType`, `BuildHumanReadableFullName`, `Equals`, `GetPreferredType`, `GetPreferredType`, `AnyOpNeedsCtx`, `GenerateLoad`, `Skip`, `GenerateSave`, `GenerateNewDescriptor`, `GenerateLoad`, `GenerateSkip`, `GenerateSave`, `BuildNewDescriptorGenerator`, `NestedType`, `MapNestedTypes`, `CloneAndMapNestedTypes`, `Sealed`, `StoredInline`, `LoadNeedsHelpWithConversion`, `ClearMappingToType`, `ContainsField`, `Fields`. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. Those 24 declarations carry 21 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 21 operations clears the >15 bar on its own, so the row is about responsibilities, not signatures. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
Fat interface: IFieldHandler (16 members) BTDB/FieldHandler/IFieldHandler.cs:13— `IFieldHandler` declares 16 members under just 13 distinct name(s): `Name`, `Configuration`, `IsCompatibleWith`, `HandledType`, `NeedsCtx`, `Load`, `Skip`, `Save`, `Load`, `Skip`, `Save`, `FreeContent`, `DoesNeedFreeContent`, `SpecializeLoadForType`, `SpecializeSaveForType`, `DoesPreferLoadAsMemory`. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. That is an OVERLOAD SET, not 16 separate responsibilities: a caller binds to 13 operation(s) and uses the overload it selected, so the Interface-Segregation harm does NOT apply on the caller's side and splitting this into role-interfaces would scatter one operation without relieving anything. The burden that does remain is the IMPLEMENTER's — all 16 signatures must be written and kept in step. Reduce it by collapsing overloads (optional or default parameters, or an options object) rather than by segregating the interface.
Fat interface: IILGen (25 members) BTDB/IL/IILGen.cs:7— `IILGen` declares 25 members under just 11 distinct name(s): `DefineLabel`, `DeclareLocal`, `Comment`, `Mark`, `Ldftn`, `Ldstr`, `Try`, `Catch`, `Finally`, `EndTry`, `Emit`, `Emit`, `Emit`, `Emit`, `Emit`, `Emit`, `Emit`, `Emit`, `Emit`, `Emit`, `Emit`, `Emit`, `Emit`, `Emit`, `Emit`. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. That is an OVERLOAD SET, not 25 separate responsibilities: a caller binds to 11 operation(s) and uses the overload it selected, so the Interface-Segregation harm does NOT apply on the caller's side and splitting this into role-interfaces would scatter one operation without relieving anything. The burden that does remain is the IMPLEMENTER's — all 25 signatures must be written and kept in step. Reduce it by collapsing overloads (optional or default parameters, or an options object) rather than by segregating the interface.
Fat interface: IKeyValueDB (17 members) BTDB/KVDBLayer/Interface/IKeyValueDB.cs:8— `IKeyValueDB` declares 17 members: `DurableTransactions`, `StartTransaction`, `StartReadOnlyTransaction`, `StartWritingTransaction`, `StartWritingTransaction`, `FinishTransactionBatchAfterCurrentTransaction`, `CalcStats`, `GetNativeMemoryStats`, `Compact`, `CreateKvi`, `PreserveHistoryUpToCommitUlong`, `Logger`, `CompactorRamLimitInMb`, `MaxTrLogFileSize`, `Transactions`, `CompactorReadBytesPerSecondLimit`, `CompactorWriteBytesPerSecondLimit`. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. Those 17 declarations carry 16 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 16 operations clears the >15 bar on its own, so the row is about responsibilities, not signatures. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
Fat interface: IKeyValueDBCursor (26 members) BTDB/KVDBLayer/Interface/IKeyValueDBCursor.cs:16— `IKeyValueDBCursor` declares 26 members: `Transaction`, `FindFirstKey`, `FindLastKey`, `FindPreviousKey`, `FindNextKey`, `Find`, `GetKeyIndex`, `FindKeyIndex`, `FindKeyIndex`, `KeyHasPrefix`, `Invalidate`, `IsValid`, `GetStorageSizeOfCurrentKey`, `GetKeyMemory`, `GetKeySpan`, `GetKeySpan`, `IsValueCorrupted`, `GetValueMemory`, `GetValueSpan`, `SetValue`, `EraseCurrent`, `EraseUpTo`, `CreateOrUpdateKeyValue`, `UpdateKeySuffix`, `FastIterate`, `FastIterateNoCursor`. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. Those 26 declarations carry 24 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 24 operations clears the >15 bar on its own, so the row is about responsibilities, not signatures. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
Fat interface: IKeyValueDBTransaction (20 members) BTDB/KVDBLayer/Interface/IKeyValueDBTransaction.cs:6— `IKeyValueDBTransaction` declares 20 members: `Owner`, `CreatedTime`, `DescriptionForLeaks`, `CreateCursor`, `GetKeyValueCount`, `IsWriting`, `IsReadOnly`, `IsDisposed`, `GetCommitUlong`, `SetCommitUlong`, `GetUlongCount`, `GetUlong`, `SetUlong`, `NextCommitTemporaryCloseTransactionLog`, `Commit`, `GetTransactionNumber`, `RollbackAdvised`, `CalcBTreeStats`, `FirstCursor`, `LastCursor`. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
Fat interface: IObjectDB (26 members) BTDB/ODBLayer/IObjectDB.cs:12— `IObjectDB` declares 26 members: `Open`, `Open`, `StartTransaction`, `StartReadOnlyTransaction`, `StartWritingTransaction`, `StartWritingTransaction`, `FinishTransactionBatchAfterCurrentTransaction`, `RunLeakDetection`, `CollectLeakRemovalCandidates`, `RunLeakRemovalAsync`, `RegisterType`, `RegisterType`, `RegisterTypeAlias`, `GetPolymorphicTypes`, `TypeByName`, `TypeConvertorGenerator`, `TypeConverterFactory`, `FieldHandlerFactory`, `ActualOptions`, `Logger`, `GetSymmetricCipher`, `InitializeRelations`, `TryInitializeRelationsWithoutWriting`, `RegisterCustomRelation`, `AllowAutoRegistrationOfRelations`, `AutoRegisterTypes`. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. Those 26 declarations carry 23 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 23 operations clears the >15 bar on its own, so the row is about responsibilities, not signatures. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
Fat interface: IObjectDBTransaction (29 members) BTDB/ODBLayer/IObjectDBTransaction.cs:7— `IObjectDBTransaction` declares 29 members: `Owner`, `KeyValueDBTransaction`, `SkipUnknownTypes`, `Enumerate`, `Enumerate`, `Get`, `GetOid`, `GetStorageSize`, `EnumerateSingletonTypes`, `Singleton`, `Singleton`, `New`, `New`, `Store`, `StoreAndFlush`, `Delete`, `Delete`, `DeleteAll`, `DeleteAll`, `DeleteAllData`, `GetCommitUlong`, `SetCommitUlong`, `NextCommitTemporaryCloseTransactionLog`, `Commit`, `RollbackAdvised`, `InitRelation`, `EnumerateRelationTypes`, `GetRelation`, `GetRelation`. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. Those 29 declarations carry 23 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 23 operations clears the >15 bar on its own, so the row is about responsibilities, not signatures. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
Fat interface: IODBVisitor (37 members) BTDB/ODBLayer/IODBVisitor.cs:10— `IODBVisitor` declares 37 members: `VisitSingleton`, `StartObject`, `StartField`, `NeedScalarAsObject`, `ScalarAsObject`, `NeedScalarAsText`, `ScalarAsText`, `OidReference`, `StartInlineObject`, `EndInlineObject`, `StartList`, `StartItem`, `EndItem`, `EndList`, `StartDictionary`, `StartDictKey`, `EndDictKey`, `StartDictValue`, `EndDictValue`, `EndDictionary`, `StartSet`, `StartSetKey`, `EndSetKey`, `EndSet`, `EndField`, `EndObject`, `StartRelation`, `StartRelationKey`, `EndRelationKey`, `StartRelationValue`, `EndRelationValue`, `EndRelation`, `InlineBackRef`, `InlineRef`, `StartSecondaryIndex`, `NextSecondaryKey`, `EndSecondaryIndex`. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
P2 · Observability· Console output used as the logging channel · ×9
Console output used as the logging channel BTDB.SourceGenerator.Sample/Examples.cs:26— `BTDB.SourceGenerator.Sample/Examples.cs` reports through `Console.Write…` at line 26 although other files in its project log through a logger. Console lines carry no level, category or structured properties and never reach the log pipeline or its exporters.
Console output used as the logging channel BTDB.SourceGenerator.Sample/Examples.cs:141— `BTDB.SourceGenerator.Sample/Examples.cs` reports through `Console.Write…` at line 141 although other files in its project log through a logger. Console lines carry no level, category or structured properties and never reach the log pipeline or its exporters.
Console output used as the logging channel BTDB.SourceGenerator.Sample/Examples.cs:190— `BTDB.SourceGenerator.Sample/Examples.cs` reports through `Console.Write…` at line 190 although other files in its project log through a logger. Console lines carry no level, category or structured properties and never reach the log pipeline or its exporters.
Console output used as the logging channel BTDB.SourceGenerator.Sample/Examples.cs:199— `BTDB.SourceGenerator.Sample/Examples.cs` reports through `Console.Write…` at line 199 although other files in its project log through a logger. Console lines carry no level, category or structured properties and never reach the log pipeline or its exporters.
Console output used as the logging channel BTDB.SourceGenerator.Sample/Examples.cs:214— `BTDB.SourceGenerator.Sample/Examples.cs` reports through `Console.Write…` at line 214 although other files in its project log through a logger. Console lines carry no level, category or structured properties and never reach the log pipeline or its exporters.
Console output used as the logging channel BTDB.SourceGenerator.Sample/Examples.cs:299— `BTDB.SourceGenerator.Sample/Examples.cs` reports through `Console.Write…` at line 299 although other files in its project log through a logger. Console lines carry no level, category or structured properties and never reach the log pipeline or its exporters.
Console output used as the logging channel BTDB.SourceGenerator.Sample/Examples.cs:306— `BTDB.SourceGenerator.Sample/Examples.cs` reports through `Console.Write…` at line 306 although other files in its project log through a logger. Console lines carry no level, category or structured properties and never reach the log pipeline or its exporters.
Console output used as the logging channel BTDB.SourceGenerator.Sample/Examples.cs:313— `BTDB.SourceGenerator.Sample/Examples.cs` reports through `Console.Write…` at line 313 although other files in its project log through a logger. Console lines carry no level, category or structured properties and never reach the log pipeline or its exporters.
Console output used as the logging channel BTDB.SourceGenerator.Sample/Examples.cs:314— `BTDB.SourceGenerator.Sample/Examples.cs` reports through `Console.Write…` at line 314 although other files in its project log through a logger. Console lines carry no level, category or structured properties and never reach the log pipeline or its exporters.
Orphaned file ODbDump/DataLeakExtension.cs: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 ODbDump/Visitor/ToConsoleVisitorNice.cs: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 ODbDump/Visitor/ToConsoleVisitor.cs: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 ODbDump/Visitor/ToConsoleSizeVisitor.cs: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 ODbDump/Visitor/ToConsoleFrequencyVisitor.cs: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 ODbDump/Visitor/ToNullVisitor.cs: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 ODbDump/Visitor/ToFileVisitorForComparison.cs: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.
redundant comment BTDB.SourceGenerator/Main.cs:299— 7 comments in this file only repeat the code they sit on (lines 299, 306, 488, 508, 568, 1163, 1184), for example "Get the RelationDBManipulator<> type from BTDB.ODBLayer namespace". Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment BTDB/ODBLayer/ObjectDB.cs:48— "Index Relation => last allocated id" repeats the code it sits on: 4 of its 5 words (relation, last, allocated, id) are already in `internal static readonly byte[] RelationLastAllocatedIdPrefix = [0, 6]; // Index Relation => last allocated id`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment BTDB/ODBLayer/RelationQuery.cs:3003— "Jumps to label when (operand has a value) == wantHasValue equals jumpIfTrue." repeats the code it sits on: 8 of its 8 words (jumps, label, operand, value, want, equals, jump, true) are already in `void EmitHasValueBranch(QueryOperand operand, bool wantHasValue, uint label, bool jumpIfTrue)`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment BTDB/ODBLayer/RelationVersionInfo.cs:101— "fieldIndex, attribute" repeats the code it sits on: 3 of its 3 words (field, index, attribute) are already in `var indexFields = new List<Tuple<int, SecondaryKeyAttribute>>(); //fieldIndex, attribute`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment BTDBTest/ObjectDbBeforeRemovePartialTest.cs:130— "An overridden hook method runs once, as its override." repeats the code it sits on: 5 of its 6 words (overridden, hook, method, runs, once) are already in `[Theory]`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment SimpleTester/TestModel/Events/TemplateSavedV2.cs:31— "New DataMember here" repeats the code it sits on: 3 of its 3 words (new, data, member) are already in `[DataMember(Order = 12)]`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
P10 · Library API & versioning· Implementation type on the public API · ×4
Implementation type on the public API BTDB/IL/ILDynamicMethodWithThisImpl.cs:7— 1 public type in `BTDB.IL` is marked as implementation by its own namespace, folder or name: `ILDynamicMethodWithThisImpl` (BTDB/IL/ILDynamicMethodWithThisImpl.cs:7, name ends in `Impl`). While it is public, every consumer of the library can bind to it, so changing it is a breaking change for those consumers.
Implementation type on the public API BTDB/IOC/ContainerImpl.cs:21— 1 public type in `BTDB.IOC` is marked as implementation by its own namespace, folder or name: `ContainerImpl` (BTDB/IOC/ContainerImpl.cs:21, name ends in `Impl`). While it is public, every consumer of the library can bind to it, so changing it is a breaking change for those consumers.
Implementation type on the public API BTDB/KVDBLayer/Implementation/BTreeKeyValueDB.cs:19— 31 public types in `BTDB.KVDBLayer` are marked as implementation by their own namespace, folder or name: `BTreeKeyValueDB` (BTDB/KVDBLayer/Implementation/BTreeKeyValueDB.cs:19, `Implementation`), `BTreeKeyValueDBCursor` (BTDB/KVDBLayer/Implementation/BTreeKeyValueDBCursor.cs:12, `Implementation`), `BTreeKeyValueDBTransaction` (BTDB/KVDBLayer/Implementation/BTreeKeyValueDBTransaction.cs:10, `Implementation`), `CompactorScheduler` (BTDB/KVDBLayer/Implementation/CompactorScheduler.cs:8, `Implementation`), `DefaultCompressionKviStrategy` (BTDB/KVDBLayer/Implementation/DefaultCompressionKviStrategy.cs:7, `Implementation`), `FileCollectionWithFileInfos` (BTDB/KVDBLayer/Implementation/FileCollectionWithFileInfos.cs:11, `Implementation`), `FileKeyIndex` (BTDB/KVDBLayer/Implementation/FileKeyIndex.cs:8, `Implementation`), `ICompactorScheduler` (BTDB/KVDBLayer/Implementation/ICompactorScheduler.cs:7, `Implementation`), and 23 more. While they are public, every consumer of the library can bind to them, so changing them is a breaking change for those consumers.
Implementation type on the public API BTDB/KVDBLayer/Implementation/BytesPerSecondLimiter.cs:7— 1 public type in `BTDB.KVDBLayer.Implementation` is marked as implementation by its own namespace, folder or name: `BytesPerSecondLimiter` (BTDB/KVDBLayer/Implementation/BytesPerSecondLimiter.cs:7, `Implementation`). While it is public, every consumer of the library can bind to it, so changing it is a breaking change for those consumers.
No security response headers detected — None of the 11 security response headers the OWASP Secure Headers Project recommends (Content-Security-Policy, Strict-Transport-Security, X-Content-Type-Options, X-Frame-Options, …) is configured — defense in depth, even when a reverse proxy could set them. (−2.0 on this card.)
No security response headers detected DBBenchmark/EventLog/EventLogEndToEnd.cs:68— This web host's pipeline is composed here and adds no security response header (Content-Security-Policy, Strict-Transport-Security, X-Content-Type-Options, a frame policy) to what it serves.
No security response headers detected EventLogBench/Program.cs:44— This web host's pipeline is composed here and adds no security response header (Content-Security-Policy, Strict-Transport-Security, X-Content-Type-Options, a frame policy) to what it serves.
No app-layer HTTPS enforcement detected — No UseHttpsRedirection/UseHsts and no reverse-proxy signal — transport security is unverified at the app layer. (−2.0 on this card.)
No app-layer HTTPS enforcement detected DBBenchmark/EventLog/EventLogEndToEnd.cs:68— This web host's pipeline is composed here with no UseHttpsRedirection/UseHsts, and nothing says a reverse proxy terminates TLS in front of it.
No app-layer HTTPS enforcement detected EventLogBench/Program.cs:44— This web host's pipeline is composed here with no UseHttpsRedirection/UseHsts, and nothing says a reverse proxy terminates TLS in front of it.
Silent fallback default on parse failure BTDB/KVDBLayer/Implementation/OnDiskFileCollection.cs:335— `GetFileId` falls back to `0` when `uint.TryParse(fileName, NumberStyles.None, CultureInfo.InvariantCulture, out var…` is false, with no log or throw — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer to the test rather than a stand-in for a value that could not be read, this is not a silent default: say so in a comment on the member and the row stops firing.
Silent fallback default on parse failure BTDB/KVDBLayer/Implementation/OnDiskMemoryMappedFileCollection.cs:306— `GetFileId` falls back to `0` when `uint.TryParse(fileName, NumberStyles.None, CultureInfo.InvariantCulture, out var…` is false, with no log or throw — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer to the test rather than a stand-in for a value that could not be read, this is not a silent default: say so in a comment on the member and the row stops firing.
Silent fallback default on parse failure BTDB.LSM/LsmKeyValueDB.Reader.cs:165— `ParseNumber` falls back to `ulong.MaxValue` when `ulong.TryParse(dot < 0 ? name : name[..dot], System.Globalization.NumberStyles.N…` is false, with no log or throw — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer to the test rather than a stand-in for a value that could not be read, this is not a silent default: say so in a comment on the member and the row stops firing.
Pass-through layer BTDB/Reactive/FastSubjectHelpers.cs:198— SingleSubjectWithValue: all 3 public methods forward their arguments unchanged to Observer and add no behaviour — an extra hop (and usually an extra interface) to trace through. Call Observer directly, or give the layer a job.
Pass-through layer SimpleTester/EventSerializationBenchmark.cs:20— ColumnOrderFirst: all 4 public methods forward their arguments unchanged to _parent and add no behaviour — an extra hop (and usually an extra interface) to trace through. Call _parent directly, or give the layer a job.
No seccomp profile REDACTED:28— The workload runs a container with no seccomp profile in force (neither RuntimeDefault nor a Localhost profile, on the container or the pod), so Kubernetes runs it Unconfined. Seccomp blocks the syscalls a container never needs, shrinking the kernel attack surface a container escape would use.
No seccomp profile REDACTED:106— The workload runs a container with no seccomp profile in force (neither RuntimeDefault nor a Localhost profile, on the container or the pod), so Kubernetes runs it Unconfined. Seccomp blocks the syscalls a container never needs, shrinking the kernel attack surface a container escape would use.
IC1 · Incompleteness & stubs· Placeholder data left in code · ×2
Placeholder data left in code AotQuerySmoke/Program.cs:202— A placeholder e-mail address ("user025@example.com") is still in shipped code — its domain is reserved for documentation, so anything sent here is undeliverable by construction. Replace it with the real address, or take it from configuration.
Placeholder data left in code AotQuerySmoke/Program.cs:203— A placeholder e-mail address ("user025@example.com") is still in shipped code — its domain is reserved for documentation, so anything sent here is undeliverable by construction. Replace it with the real address, or take it from configuration.
C4 · Data Retention· Partial data-retention evidence · ×1
Partial data-retention evidence — A retention mechanism is present, but the data-lifecycle is not yet complete — missing: a scheduled purge / cleanup job (PurgeOlderThan / CleanupJob).
Documentation: no build, run or usage example BTDB.BackendActions/README.md:1— `BTDB.BackendActions` is a package (`IsPackable true`) and neither `BTDB.BackendActions/README.md` nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet.
No ADRs found AotActionsSmoke/AotActionsSmoke.csproj:3— No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`. ADRs are expected here because `AotActionsSmoke/AotActionsSmoke.csproj` makes this repository a deployable product (line 3).
D21 · Naming Consistency· `outOfOrderSkParts` spells `Sk` where 14 names in the project spell it `SK` · ×1
`outOfOrderSkParts` spells `Sk` where 14 names in the project spell it `SK` BTDB/ODBLayer/RelationInfo.cs:2114— 14 of 15 names in project BTDB spell the token `SK` (14 of 15; unit: names in project BTDB containing `SK`). Peers: ObjectDB.AllRelationsSKPrefix (BTDB/ODBLayer/ObjectDB.cs:58); ObjectDB.AllRelationsSKPrefixByte (BTDB/ODBLayer/ObjectDB.cs:66); RelationBuilder.WriteRelationSKPrefix (BTDB/ODBLayer/RelationBuilder.cs:2327); RelationDBManipulator.WriteRelationSKPrefix (BTDB/ODBLayer/RelationDBManipulator.cs:96); RelationDBManipulator.RemapPrimeSK (BTDB/ODBLayer/RelationDBManipulator.cs:102). Rename to `outOfOrderSKParts`. [rule N6]
D26 · Project Cohesion· Projects may be oversized for their cohesion · ×1
Projects may be oversized for their cohesion BTDB/BTDB.csproj:1— `BTDB` overshoots its size bounds (81334 LoC, 503 public types across 24 namespaces). 1 of 32 project(s) overshoot their size bounds, lowering Project Cohesion to 9.4/10. Size alone is no reason to split a project: where its type references show a separable part, a Split row names it.
Split BTDB BTDB/BTDB.csproj:1— `BTDB` overshoots its size bounds (81334 LoC, 503 public types across 24 namespaces). These parts reach the rest of the project only through its shared core (`(root)`, `Allocators`, `Buffer`, `Collections`, `Encrypted`, `IL`, `Locks`, `StreamLayer`), so they are the cleanest seams: `BTDB.Reactive` (18 types in 4 files): 0 of 116 of its type references cross into a sibling namespace, and the rest of the project uses it 0 times and it uses the rest 0 times. Extract each into its own project.
D28 · Secrets (history)· Rotate the exposed credentials · ×1
D34 · Knowledge Freshness· Orphaned files with no living knowledge · ×1
Orphaned files with no living knowledge — 7 of 301 analysed file(s) have no living knowledge left — their last meaningful change has decayed away, so if one breaks, no one currently understands it (counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 301 of the 587 production source files in this repository met that bar). None is large enough to earn a read-through of its own, so this row stands in for the per-file rows rather than raising one each — most significant first: ODbDump/DataLeakExtension.cs, ODbDump/Visitor/ToConsoleVisitorNice.cs, ODbDump/Visitor/ToConsoleVisitor.cs, ODbDump/Visitor/ToConsoleSizeVisitor.cs, ODbDump/Visitor/ToConsoleFrequencyVisitor.cs, ODbDump/Visitor/ToNullVisitor.cs, ODbDump/Visitor/ToFileVisitorForComparison.cs. 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.
D40 · Network Egress Confinement· No network policy · ×1
No network policy — No Kubernetes NetworkPolicy (or Cilium policy) found. Without one, every pod can talk to every other pod and reach out to the internet by default. Add a default-deny policy and open only the flows you need.
Commented-out code BTDB.SourceGenerator.Sample/Examples.cs:19— A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
README/code drift Doc/SourceGenerator.md:196— Doc/SourceGenerator.md names .NET 9, but the projects target .NET 10. 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 4/11 service-like projects use logging (pure contract/DTO projects are excluded — they have nothing to log). Of those 11, 5 ship a process this repository operates; the rest are libraries their consumer hosts, where the logging decision belongs to the host.
No SAST REDACTED:6— No static application security testing detected. For this repository's stack, add CodeQL's csharp pack, or a .NET security analyzer package (or `semgrep --config=auto`, which runs on any language) as a CI step. What was searched, so you can tell an absence from a miss: the 1 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.
No dependency-update automation BTDB.AzureStorage.Test/BTDB.AzureStorage.Test.csproj:9— `BTDB.AzureStorage.Test/BTDB.AzureStorage.Test.csproj` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`.
X2 · Cancellation propagation· Not all async methods take a CancellationToken · ×1
Not all async methods take a CancellationToken — Only 250/360 async methods accept a CancellationToken, so in-flight work can't be stopped early when the caller gives up — whatever ends it in your host (shutdown signal, timeout, abandoned request, user cancel). Thread a token through the call chain and honour it at each await and loop; where a method genuinely cannot be interrupted, omitting it is a deliberate choice — judge against your hosting model.
Nullable reference types not enabled everywhere — 17/18 NRT-eligible project(s) enable <Nullable>enable</Nullable> (projects targeting a pre-C#-8 framework are excluded — NRTs aren't available there). NRTs catch a whole class of null-deref bugs at compile time.
Null-forgiving operator (`!`) suppressions override nullable warnings — ~1.1 `!` suppressions per 1k syntax nodes — 293 suppression(s) across the 263457 syntax node(s) in code where nullable warnings are ENABLED, which is the only code a `!` can suppress anything in (a `!` under `#nullable disable` is inert and is not counted, and its file's nodes are not in the denominator). Each one tells the compiler to trust you about null, suppressing the very safety NRTs provide. Many are correct: each is a claim the checker could not verify, and it is wrong only where the value can in fact be missing, so review the densest places first.
Hand-rolled JSON/XML parsing via regex Releaser/Releaser/Program.cs:204— A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. .NET ships a real parser for it (System.Text.Json, System.Xml.Linq); use it here.
Skipped (documented): SerializationRunsAndDoesNotLeak1Byte BTDBTest/EventStore2Test.cs:48— Skipped with a documented reason — a deferral, not lazy debt: Waiting for allocated bytes method to be precise
Skipped (documented): SerializationOfStruct_Succeeds BTDBTest/EventStore2Test.cs:1190— Skipped with a documented reason — a deferral, not lazy debt: Generic serialization of structs is hard to implement, that's why it is not working for now.
Skipped (documented): UninitializedLocalsWorks BTDBTest/ILExtensionsTest.cs:271— Skipped with a documented reason — a deferral, not lazy debt: Does not work anymore
Skipped (documented): Reader BTDBTest/KeyValueDBCustomTest.cs:25— Skipped with a documented reason — a deferral, not lazy debt: Takes too long time
Skipped (documented): UpgradingKeyInDictionary BTDBTest/ObjectDBTest.cs:1738— Skipped with a documented reason — a deferral, not lazy debt: This is very difficult to do
Skipped (documented): CannotStoreDateTimeKindUnspecified BTDBTest/ObjectDBTest.cs:2350— Skipped with a documented reason — a deferral, not lazy debt: Very difficult without breaking backward compatibility of database. And what is worse problem string inside object is not ordered correctly!
Skipped (documented): CanDeserializeWithReferentialIdentityAndBoxedEnum BTDBTest/ObjectDBTest.cs:3012— Skipped with a documented reason — a deferral, not lazy debt: Not implemented yet
Skipped (documented): CanSerializeBoxedCustomList BTDBTest/TypeSerializersTest.cs:689— Skipped with a documented reason — a deferral, not lazy debt: By design - not supported yet
Skipped (documented): CanSerializeBoxedIOrderedDictionary BTDBTest/TypeSerializersTest.cs:701— Skipped with a documented reason — a deferral, not lazy debt: By design - not supported yet
doc comments repeat the names BTDB/Collections/RefDictionary.cs:19— 0 of 57 documented parameters and 4 of 103 summaries in `BTDB` only repeat the member or parameter name (e.g. "RefDictionary" for `RefDictionary`). 1 documentation tag(s) are empty. Delete the restating tags, or add what the name does not say.
Appendix B — Reproduction & audit trail
Every external tool invocation behind a deep-scan dimension — the tool, its captured version, the exact command, how many findings it yielded, and a link to the retained raw output. To reproduce any finding: check out the same commit and run the command shown (repo-relative — never an absolute scratch path). The complete raw scanner output is retained verbatim under artifacts/raw/ (indexed in artifacts/raw/index.json); per-invocation exit codes and wall-clock durations are in sidecar.json — kept out of this table so the rendered report stays byte-identical across runs of the same commit.
nuget: not applicable — nuget: the solution did not restore on the analyzer's .NET SDK (an SDK/target-framework/restore mismatch, common for an older codebase), so there was no restored dependency graph to scan
semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that. semgrep could not parse 132 file(s) — `AotActionsSmoke/Program.cs`, `AotActionsSmoke/Storage.cs`, `BTDB.BackendActions/ActionCoordinator.cs`, `BTDB.BackendActions/ActionPlanner.cs`, `BTDB.BackendActions/ActionWorker.cs`, … (+127 more) — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.
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 — The repository ships application workloads but no cluster-governance resources (CRDs, admission webhooks, or a committed policy engine). Runtime threat-detection (Falco/Tetragon) and admission control (Kyverno/OPA-Gatekeeper/PodSecurity) are cluster-OPERATOR controls owned by the platform, not shipped by an application repo/chart — nothing for this repo to assess.
Run 01a1e5ac-967d-7c91-8053-e323f8a87b75 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Appendix C — Personal-data map
Every field, property and record parameter whose name is conventional personal data — 8 field(s) across 2 categories, each with an exact repo-relative file:line. This is the data inventory a compliance review starts from — right-to-erasure, retention, minimisation. Detected by NAME, from the C# syntax tree, with a deliberately specific identifier classifier — the same one the C1–C5 compliance cards use to decide whether personal data is present, so CardDefinition or FileName don't trip. Two caveats stated rather than glossed: those cards additionally require corroboration (a persistence/account signal, or two distinct PII categories) that this inventory deliberately does not, so it lists more than they gate on; and D32 Data Compliance shares nothing with it — that dimension is a separate semgrep ruleset for personal data leaking into logs, URLs and browser storage, and a clean D32 result says nothing about this list. Informational — it feeds no score.
Issues: 74 · Warnings: 1799 · Recommendations: 187 · Info: 29 — Appendix A · all findings · full markdown report.
Generated by the Canine Code Analyzer: deterministic code-health analysis. 16-11-2026 @ 18:44 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.