Public report of apache/iggy, published 14 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, 14 November 2026, 19:52 UTC · Survey ID cd_d530f0ffb0b649d580f52769170f53eb
apache/iggy
Measured 14 November 2026, 19:51 UTC, at code version 66f5adc
CAI scoreAdequate
CriticalWeakAdequateStrongExemplary
Up 2 since the last survey
The score is built from these lenses. Each lens grades one area of the code, such as how easy it is to change or how well it is protected. The weakest lens counts most, so one weak area pulls the score down instead of being averaged away.
A very large codebase: 768,170 lines of product code in 44 projects, tests not counted · Estimated rebuild effort: about 12.1 person-years · Weakest lens: Security and Compliance, 46
Findings by how serious they are
311 critical2368 serious165 minor
22 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
14 November 2026, 19:51 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 ▸
63of 63 dimensions measured by tools.
2765of 2844 findings point to an exact file and line, so you can open each one in the code. The other 79 concern the repository as a whole, such as missing documentation.
63dimensions across 7 lenses, read from 768,170 lines of product code in 44 projects.
apache/iggy falls short of our standard for a preview release because it has passwords or keys in the code's history and pipeline tools referenced by a changeable name. It scores 58 out of 100 and is rated Adequate, and 304 of its 311 critical findings are security problems.
Security and Compliance, at 46, is the weakest lens and counts most in the score. The best first step is replacing the nine passwords or keys found in the code's history, worth about 3 points. Handling the discarded errors comes next, worth about 1 point. Raising Security and Compliance to 68 would lift the score to about 66.
164 pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with. Forty-two pipeline steps put outside input straight into a shell command, so an attacker can run commands in the build pipeline, and thirty-seven settings leave the servers or containers unsafe. Pinning each tool to an exact version, passing outside input through environment variables and correcting the unsafe settings would close these risks. Limiting each secret to its own step would fix the 18 secrets exposed to more of the pipeline than needed, and the 17 passwords or keys in the code and the 14 passwords or keys in the code's history need replacing, with the old ones switched off. The four errors that are caught and ignored need handling or logging instead of being ignored.
The product code is 768,170 lines, about €1,800,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 46 to 68, the lowest score rated Strong, the score would rise from 58 to about 66.
Code composition: what the lines of code are
Business logic 3%Supporting code 3%Tests 94%
New since the last survey: 1036 findings
These 1036 critical or serious findings weren't in the previous survey, on 28 October 2026. The first 100 are listed here, and the findings file in the download package lists them all.
We compare every finding with the previous survey's. A finding that has only moved to another line in the same file counts as the same finding, so only new findings appear here. Advisory notes from the AI model are left out, because the model words them afresh in every survey.
Fixed since the last survey: 1004 findings
These 1004 critical or serious findings were in the previous survey, on 28 October 2026, and are gone from this one. The first 100 are listed here.
€580,000 to €2,900,000, for 9,748 to 31,012 hours of work, about 12.1 person-years for 7 to 23 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.8 at a score of 58. 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
Very large: 768,170 lines of product code
Comment lines
The estimate prices 763,687 lines. Comment lines count towards the size of 768,170 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
Resolve the 9 REDACTED finding(s) in Secrets (history) — start with REDACTED (6), REDACTED (3).
Resolve the 4 EmptyCatchBlock finding(s) in Explicit Debt — start with PartitionReader.cs (2), IggyConsumer.cs, TcpMessageStream.Vsr.cs.
Raises the score by about 1 point · Low effort · Explicit Debt
3
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.
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,800,000 to build again, about 12.1 person-years of work. Its weakest lens is Security and Compliance, at 46 (Weak). Security and Compliance is about how well the product is protected, and how it handles personal data. Because the weakest lens counts most in the score, work on Security and Compliance also moves the score most.
Based on: the rebuild estimate · the Security and Compliance grade · how much each lens counts
What to do: Start with the Security and Compliance actions in Top priorities.
If you do one thing first · First action
Resolve the 9 REDACTED finding(s) in Secrets (history). Of all the actions in this report, it raises the score most for the work it takes: about 3 points for low effort, because it clears the 9 Secrets (history) findings. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 7.2 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 2% to 5% on every change. The history of the code shows how much it changes: about 1,251,466 lines over the last 90 days, which is about 5,075,390 lines a year. At that pace, the extra work comes to an estimated 257.6 to 1691.8 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.
1130 modules, with 3368 dependencies between them. 20 loops run through 105 of the modules, marked above the diagonal.
The table shows the 40 modules with the most connections; 1090 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.
configs.server_config.server uses iggy_common.traits.validatable, so a change to iggy_common.traits.validatable can break configs.server_config.server, while a change to configs.server_config.server can't break iggy_common.traits.validatable.
Position
Below the diagonal: configs.server_config.server uses a module listed above it, which is the healthy direction.
28 pairs of types, where a type in iggy_binary_protocol.consensus.header uses a type in iggy_binary_protocol.consensus.operation. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
iggy_binary_protocol.consensus.header uses iggy_binary_protocol.consensus.operation, so a change to iggy_binary_protocol.consensus.operation can break iggy_binary_protocol.consensus.header, while a change to iggy_binary_protocol.consensus.header can't break iggy_binary_protocol.consensus.operation.
Position
Below the diagonal: iggy_binary_protocol.consensus.header uses a module listed above it, which is the healthy direction.
iggy_binary_protocol.primitives.identifier uses iggy_binary_protocol.codec, so a change to iggy_binary_protocol.codec can break iggy_binary_protocol.primitives.identifier, while a change to iggy_binary_protocol.primitives.identifier can't break iggy_binary_protocol.codec.
Position
Below the diagonal: iggy_binary_protocol.primitives.identifier uses a module listed above it, which is the healthy direction.
iggy_common.utils.byte_size uses iggy_common.utils.duration, so a change to iggy_common.utils.duration can break iggy_common.utils.byte_size, while a change to iggy_common.utils.byte_size can't break iggy_common.utils.duration.
Position
Below the diagonal: iggy_common.utils.byte_size uses a module listed above it, which is the healthy direction.
iggy_common.utils.timestamp uses iggy_common.utils.duration, so a change to iggy_common.utils.duration can break iggy_common.utils.timestamp, while a change to iggy_common.utils.timestamp can't break iggy_common.utils.duration.
Position
Below the diagonal: iggy_common.utils.timestamp uses a module listed above it, which is the healthy direction.
server_common.consensus_message uses iggy_binary_protocol.consensus.operation, so a change to iggy_binary_protocol.consensus.operation can break server_common.consensus_message, while a change to server_common.consensus_message can't break iggy_binary_protocol.consensus.operation.
Position
Below the diagonal: server_common.consensus_message uses a module listed above it, which is the healthy direction.
server_common.consensus_message uses server_common.iobuf, so a change to server_common.iobuf can break server_common.consensus_message, while a change to server_common.consensus_message can't break server_common.iobuf.
Position
Below the diagonal: server_common.consensus_message uses a module listed above it, which is the healthy direction.
simulator.workload.options uses server_common.sharding.namespace, so a change to server_common.sharding.namespace can break simulator.workload.options, while a change to simulator.workload.options can't break server_common.sharding.namespace.
Position
Below the diagonal: simulator.workload.options uses a module listed above it, which is the healthy direction.
consensus.client_table uses iggy_binary_protocol.consensus.operation, so a change to iggy_binary_protocol.consensus.operation can break consensus.client_table, while a change to consensus.client_table can't break iggy_binary_protocol.consensus.operation.
Position
Below the diagonal: consensus.client_table uses a module listed above it, which is the healthy direction.
consensus.client_table uses server_common.iobuf, so a change to server_common.iobuf can break consensus.client_table, while a change to consensus.client_table can't break server_common.iobuf.
Position
Below the diagonal: consensus.client_table uses a module listed above it, which is the healthy direction.
consensus.client_table uses iggy_binary_protocol.consensus.header, so a change to iggy_binary_protocol.consensus.header can break consensus.client_table, while a change to consensus.client_table can't break iggy_binary_protocol.consensus.header.
Position
Below the diagonal: consensus.client_table uses a module listed above it, which is the healthy direction.
consensus.client_table uses server_common.consensus_message, so a change to server_common.consensus_message can break consensus.client_table, while a change to consensus.client_table can't break server_common.consensus_message.
Position
Below the diagonal: consensus.client_table uses a module listed above it, which is the healthy direction.
iggy_binary_protocol.primitives.partition_history uses iggy_binary_protocol.codec, so a change to iggy_binary_protocol.codec can break iggy_binary_protocol.primitives.partition_history, while a change to iggy_binary_protocol.primitives.partition_history can't break iggy_binary_protocol.codec.
Position
Below the diagonal: iggy_binary_protocol.primitives.partition_history uses a module listed above it, which is the healthy direction.
iggy_binary_protocol.primitives.partition_history uses iggy_binary_protocol.consensus.header, so a change to iggy_binary_protocol.consensus.header can break iggy_binary_protocol.primitives.partition_history, while a change to iggy_binary_protocol.primitives.partition_history can't break iggy_binary_protocol.consensus.header.
Position
Below the diagonal: iggy_binary_protocol.primitives.partition_history uses a module listed above it, which is the healthy direction.
iggy_common.types.identifier uses iggy_common.traits.validatable, so a change to iggy_common.traits.validatable can break iggy_common.types.identifier, while a change to iggy_common.types.identifier can't break iggy_common.traits.validatable.
Position
Below the diagonal: iggy_common.types.identifier uses a module listed above it, which is the healthy direction.
iggy_common.types.identifier uses iggy_binary_protocol.primitives.identifier, so a change to iggy_binary_protocol.primitives.identifier can break iggy_common.types.identifier, while a change to iggy_common.types.identifier can't break iggy_binary_protocol.primitives.identifier.
Position
Below the diagonal: iggy_common.types.identifier uses a module listed above it, which is the healthy direction.
iggy_common.types.identifier uses iggy_common.utils.byte_size, so a change to iggy_common.utils.byte_size can break iggy_common.types.identifier, while a change to iggy_common.types.identifier can't break iggy_common.utils.byte_size.
Position
Below the diagonal: iggy_common.types.identifier uses a module listed above it, which is the healthy direction.
iggy_common.types.options uses iggy_common.utils.byte_size, so a change to iggy_common.utils.byte_size can break iggy_common.types.options, while a change to iggy_common.types.options can't break iggy_common.utils.byte_size.
Position
Below the diagonal: iggy_common.types.options uses a module listed above it, which is the healthy direction.
message_bus uses server_common.iobuf, so a change to server_common.iobuf can break message_bus, while a change to message_bus can't break server_common.iobuf.
Position
Below the diagonal: message_bus uses a module listed above it, which is the healthy direction.
message_bus uses configs.server_config.server, so a change to configs.server_config.server can break message_bus, while a change to message_bus can't break configs.server_config.server.
Position
Below the diagonal: message_bus uses a module listed above it, which is the healthy direction.
consensus.impls uses consensus.oneshot, so a change to consensus.oneshot can break consensus.impls, while a change to consensus.impls can't break consensus.oneshot.
Position
Below the diagonal: consensus.impls uses a module listed above it, which is the healthy direction.
consensus.impls uses server_common.iobuf, so a change to server_common.iobuf can break consensus.impls, while a change to consensus.impls can't break server_common.iobuf.
Position
Below the diagonal: consensus.impls uses a module listed above it, which is the healthy direction.
consensus.impls uses iggy_binary_protocol.consensus.header, so a change to iggy_binary_protocol.consensus.header can break consensus.impls, while a change to consensus.impls can't break iggy_binary_protocol.consensus.header.
Position
Below the diagonal: consensus.impls uses a module listed above it, which is the healthy direction.
consensus.impls uses iggy_common.utils.timestamp, so a change to iggy_common.utils.timestamp can break consensus.impls, while a change to consensus.impls can't break iggy_common.utils.timestamp.
Position
Below the diagonal: consensus.impls uses a module listed above it, which is the healthy direction.
consensus.impls uses server_common.consensus_message, so a change to server_common.consensus_message can break consensus.impls, while a change to consensus.impls can't break server_common.consensus_message.
Position
Below the diagonal: consensus.impls uses a module listed above it, which is the healthy direction.
consensus.impls uses consensus.client_table, so a change to consensus.client_table can break consensus.impls, while a change to consensus.impls can't break consensus.client_table.
Position
Below the diagonal: consensus.impls uses a module listed above it, which is the healthy direction.
iggy_common.types.consumer.consumer_kind uses iggy_common.traits.validatable, so a change to iggy_common.traits.validatable can break iggy_common.types.consumer.consumer_kind, while a change to iggy_common.types.consumer.consumer_kind can't break iggy_common.traits.validatable.
Position
Below the diagonal: iggy_common.types.consumer.consumer_kind uses a module listed above it, which is the healthy direction.
iggy_common.types.consumer.consumer_kind uses iggy_common.types.identifier, so a change to iggy_common.types.identifier can break iggy_common.types.consumer.consumer_kind, while a change to iggy_common.types.consumer.consumer_kind can't break iggy_common.types.identifier.
Position
Below the diagonal: iggy_common.types.consumer.consumer_kind uses a module listed above it, which is the healthy direction.
iggy_common.types.message.polling_strategy uses iggy_common.utils.timestamp, so a change to iggy_common.utils.timestamp can break iggy_common.types.message.polling_strategy, while a change to iggy_common.types.message.polling_strategy can't break iggy_common.utils.timestamp.
Position
Below the diagonal: iggy_common.types.message.polling_strategy uses a module listed above it, which is the healthy direction.
iggy_common.types.message.polling_strategy uses iggy_binary_protocol.primitives.partition_history, so a change to iggy_binary_protocol.primitives.partition_history can break iggy_common.types.message.polling_strategy, while a change to iggy_common.types.message.polling_strategy can't break iggy_binary_protocol.primitives.partition_history.
Position
Below the diagonal: iggy_common.types.message.polling_strategy uses a module listed above it, which is the healthy direction.
metadata.stm.stream uses iggy_binary_protocol.codec, so a change to iggy_binary_protocol.codec can break metadata.stm.stream, while a change to metadata.stm.stream can't break iggy_binary_protocol.codec.
Position
Below the diagonal: metadata.stm.stream uses a module listed above it, which is the healthy direction.
metadata.stm.stream uses iggy_binary_protocol.consensus.operation, so a change to iggy_binary_protocol.consensus.operation can break metadata.stm.stream, while a change to metadata.stm.stream can't break iggy_binary_protocol.consensus.operation.
Position
Below the diagonal: metadata.stm.stream uses a module listed above it, which is the healthy direction.
metadata.stm.stream uses server_common.sharding.namespace, so a change to server_common.sharding.namespace can break metadata.stm.stream, while a change to metadata.stm.stream can't break server_common.sharding.namespace.
Position
Below the diagonal: metadata.stm.stream uses a module listed above it, which is the healthy direction.
metadata.stm.stream uses iggy_binary_protocol.primitives.identifier, so a change to iggy_binary_protocol.primitives.identifier can break metadata.stm.stream, while a change to metadata.stm.stream can't break iggy_binary_protocol.primitives.identifier.
Position
Below the diagonal: metadata.stm.stream uses a module listed above it, which is the healthy direction.
metadata.stm.stream uses iggy_common.utils.byte_size, so a change to iggy_common.utils.byte_size can break metadata.stm.stream, while a change to metadata.stm.stream can't break iggy_common.utils.byte_size.
Position
Below the diagonal: metadata.stm.stream uses a module listed above it, which is the healthy direction.
metadata.stm.stream uses iggy_common.utils.timestamp, so a change to iggy_common.utils.timestamp can break metadata.stm.stream, while a change to metadata.stm.stream can't break iggy_common.utils.timestamp.
Position
Below the diagonal: metadata.stm.stream uses a module listed above it, which is the healthy direction.
metadata.stm.stream uses iggy_binary_protocol.primitives.partition_history, so a change to iggy_binary_protocol.primitives.partition_history can break metadata.stm.stream, while a change to metadata.stm.stream can't break iggy_binary_protocol.primitives.partition_history.
Position
Below the diagonal: metadata.stm.stream uses a module listed above it, which is the healthy direction.
metadata.stm.stream uses iggy_common.types.options, so a change to iggy_common.types.options can break metadata.stm.stream, while a change to metadata.stm.stream can't break iggy_common.types.options.
Position
Below the diagonal: metadata.stm.stream uses a module listed above it, which is the healthy direction.
simulator.client uses iggy_binary_protocol.consensus.operation, so a change to iggy_binary_protocol.consensus.operation can break simulator.client, while a change to simulator.client can't break iggy_binary_protocol.consensus.operation.
Position
Below the diagonal: simulator.client uses a module listed above it, which is the healthy direction.
simulator.client uses server_common.sharding.namespace, so a change to server_common.sharding.namespace can break simulator.client, while a change to simulator.client can't break server_common.sharding.namespace.
Position
Below the diagonal: simulator.client uses a module listed above it, which is the healthy direction.
simulator.client uses iggy_binary_protocol.consensus.header, so a change to iggy_binary_protocol.consensus.header can break simulator.client, while a change to simulator.client can't break iggy_binary_protocol.consensus.header.
Position
Below the diagonal: simulator.client uses a module listed above it, which is the healthy direction.
simulator.client uses server_common.consensus_message, so a change to server_common.consensus_message can break simulator.client, while a change to simulator.client can't break server_common.consensus_message.
Position
Below the diagonal: simulator.client uses a module listed above it, which is the healthy direction.
simulator.client uses iggy_binary_protocol.primitives.partition_history, so a change to iggy_binary_protocol.primitives.partition_history can break simulator.client, while a change to simulator.client can't break iggy_binary_protocol.primitives.partition_history.
Position
Below the diagonal: simulator.client uses a module listed above it, which is the healthy direction.
simulator.client uses iggy_common.types.options, so a change to iggy_common.types.options can break simulator.client, while a change to simulator.client can't break iggy_common.types.options.
Position
Below the diagonal: simulator.client uses a module listed above it, which is the healthy direction.
simulator.workload.shadow uses server_common.sharding.namespace, so a change to server_common.sharding.namespace can break simulator.workload.shadow, while a change to simulator.workload.shadow can't break server_common.sharding.namespace.
Position
Below the diagonal: simulator.workload.shadow uses a module listed above it, which is the healthy direction.
simulator.workload.shadow uses simulator.workload.effect, so a change to simulator.workload.effect can break simulator.workload.shadow, while a change to simulator.workload.shadow can't break simulator.workload.effect.
Position
Below the diagonal: simulator.workload.shadow uses a module listed above it, which is the healthy direction.
simulator.workload.shadow uses iggy_binary_protocol.primitives.partition_history, so a change to iggy_binary_protocol.primitives.partition_history can break simulator.workload.shadow, while a change to simulator.workload.shadow can't break iggy_binary_protocol.primitives.partition_history.
Position
Below the diagonal: simulator.workload.shadow uses a module listed above it, which is the healthy direction.
iggy.client_wrappers.client_wrapper uses iggy_common.utils.duration, so a change to iggy_common.utils.duration can break iggy.client_wrappers.client_wrapper, while a change to iggy.client_wrappers.client_wrapper can't break iggy_common.utils.duration.
Position
Below the diagonal: iggy.client_wrappers.client_wrapper uses a module listed above it, which is the healthy direction.
iggy.client_wrappers.client_wrapper uses iggy_common.types.identifier, so a change to iggy_common.types.identifier can break iggy.client_wrappers.client_wrapper, while a change to iggy.client_wrappers.client_wrapper can't break iggy_common.types.identifier.
Position
Below the diagonal: iggy.client_wrappers.client_wrapper uses a module listed above it, which is the healthy direction.
iggy.client_wrappers.client_wrapper uses iggy_common.types.options, so a change to iggy_common.types.options can break iggy.client_wrappers.client_wrapper, while a change to iggy.client_wrappers.client_wrapper can't break iggy_common.types.options.
Position
Below the diagonal: iggy.client_wrappers.client_wrapper uses a module listed above it, which is the healthy direction.
iggy.client_wrappers.client_wrapper uses iggy_common.types.consumer.consumer_kind, so a change to iggy_common.types.consumer.consumer_kind can break iggy.client_wrappers.client_wrapper, while a change to iggy.client_wrappers.client_wrapper can't break iggy_common.types.consumer.consumer_kind.
Position
Below the diagonal: iggy.client_wrappers.client_wrapper uses a module listed above it, which is the healthy direction.
iggy.client_wrappers.client_wrapper uses iggy_common.types.message.polling_strategy, so a change to iggy_common.types.message.polling_strategy can break iggy.client_wrappers.client_wrapper, while a change to iggy.client_wrappers.client_wrapper can't break iggy_common.types.message.polling_strategy.
Position
Below the diagonal: iggy.client_wrappers.client_wrapper uses a module listed above it, which is the healthy direction.
iggy.clients.consumer uses iggy_common.utils.duration, so a change to iggy_common.utils.duration can break iggy.clients.consumer, while a change to iggy.clients.consumer can't break iggy_common.utils.duration.
Position
Below the diagonal: iggy.clients.consumer uses a module listed above it, which is the healthy direction.
iggy.clients.consumer uses iggy_binary_protocol.primitives.partition_history, so a change to iggy_binary_protocol.primitives.partition_history can break iggy.clients.consumer, while a change to iggy.clients.consumer can't break iggy_binary_protocol.primitives.partition_history.
Position
Below the diagonal: iggy.clients.consumer uses a module listed above it, which is the healthy direction.
iggy.clients.consumer uses iggy_common.types.identifier, so a change to iggy_common.types.identifier can break iggy.clients.consumer, while a change to iggy.clients.consumer can't break iggy_common.types.identifier.
Position
Below the diagonal: iggy.clients.consumer uses a module listed above it, which is the healthy direction.
iggy.clients.consumer uses iggy_common.types.consumer.consumer_kind, so a change to iggy_common.types.consumer.consumer_kind can break iggy.clients.consumer, while a change to iggy.clients.consumer can't break iggy_common.types.consumer.consumer_kind.
Position
Below the diagonal: iggy.clients.consumer uses a module listed above it, which is the healthy direction.
iggy.clients.consumer uses iggy_common.types.message.polling_strategy, so a change to iggy_common.types.message.polling_strategy can break iggy.clients.consumer, while a change to iggy.clients.consumer can't break iggy_common.types.message.polling_strategy.
Position
Below the diagonal: iggy.clients.consumer uses a module listed above it, which is the healthy direction.
iggy.http.http_client uses iggy_common.error.iggy_error, so a change to iggy_common.error.iggy_error can break iggy.http.http_client, while a change to iggy.http.http_client can't break iggy_common.error.iggy_error.
Position
Below the diagonal: iggy.http.http_client uses a module listed above it, which is the healthy direction.
iggy.http.http_client uses iggy_common.utils.duration, so a change to iggy_common.utils.duration can break iggy.http.http_client, while a change to iggy.http.http_client can't break iggy_common.utils.duration.
Position
Below the diagonal: iggy.http.http_client uses a module listed above it, which is the healthy direction.
iggy.http.http_client uses iggy_binary_protocol.primitives.partition_history, so a change to iggy_binary_protocol.primitives.partition_history can break iggy.http.http_client, while a change to iggy.http.http_client can't break iggy_binary_protocol.primitives.partition_history.
Position
Below the diagonal: iggy.http.http_client uses a module listed above it, which is the healthy direction.
iggy.http.http_client uses iggy_common.types.identifier, so a change to iggy_common.types.identifier can break iggy.http.http_client, while a change to iggy.http.http_client can't break iggy_common.types.identifier.
Position
Below the diagonal: iggy.http.http_client uses a module listed above it, which is the healthy direction.
iggy.http.http_client uses iggy_common.types.options, so a change to iggy_common.types.options can break iggy.http.http_client, while a change to iggy.http.http_client can't break iggy_common.types.options.
Position
Below the diagonal: iggy.http.http_client uses a module listed above it, which is the healthy direction.
iggy.http.http_client uses iggy_common.types.consumer.consumer_kind, so a change to iggy_common.types.consumer.consumer_kind can break iggy.http.http_client, while a change to iggy.http.http_client can't break iggy_common.types.consumer.consumer_kind.
Position
Below the diagonal: iggy.http.http_client uses a module listed above it, which is the healthy direction.
iggy.http.http_client uses iggy_common.types.message.polling_strategy, so a change to iggy_common.types.message.polling_strategy can break iggy.http.http_client, while a change to iggy.http.http_client can't break iggy_common.types.message.polling_strategy.
Position
Below the diagonal: iggy.http.http_client uses a module listed above it, which is the healthy direction.
metadata.impls.metadata uses iggy_binary_protocol.consensus.operation, so a change to iggy_binary_protocol.consensus.operation can break metadata.impls.metadata, while a change to metadata.impls.metadata can't break iggy_binary_protocol.consensus.operation.
Position
Below the diagonal: metadata.impls.metadata uses a module listed above it, which is the healthy direction.
metadata.impls.metadata uses iggy_common.error.iggy_error, so a change to iggy_common.error.iggy_error can break metadata.impls.metadata, while a change to metadata.impls.metadata can't break iggy_common.error.iggy_error.
Position
Below the diagonal: metadata.impls.metadata uses a module listed above it, which is the healthy direction.
metadata.impls.metadata uses server_common.iobuf, so a change to server_common.iobuf can break metadata.impls.metadata, while a change to metadata.impls.metadata can't break server_common.iobuf.
Position
Below the diagonal: metadata.impls.metadata uses a module listed above it, which is the healthy direction.
metadata.impls.metadata uses server_common.sharding.namespace, so a change to server_common.sharding.namespace can break metadata.impls.metadata, while a change to metadata.impls.metadata can't break server_common.sharding.namespace.
Position
Below the diagonal: metadata.impls.metadata uses a module listed above it, which is the healthy direction.
metadata.impls.metadata uses iggy_binary_protocol.consensus.header, so a change to iggy_binary_protocol.consensus.header can break metadata.impls.metadata, while a change to metadata.impls.metadata can't break iggy_binary_protocol.consensus.header.
Position
Below the diagonal: metadata.impls.metadata uses a module listed above it, which is the healthy direction.
metadata.impls.metadata uses iggy_binary_protocol.primitives.identifier, so a change to iggy_binary_protocol.primitives.identifier can break metadata.impls.metadata, while a change to metadata.impls.metadata can't break iggy_binary_protocol.primitives.identifier.
Position
Below the diagonal: metadata.impls.metadata uses a module listed above it, which is the healthy direction.
metadata.impls.metadata uses server_common.consensus_message, so a change to server_common.consensus_message can break metadata.impls.metadata, while a change to metadata.impls.metadata can't break server_common.consensus_message.
Position
Below the diagonal: metadata.impls.metadata uses a module listed above it, which is the healthy direction.
metadata.impls.metadata uses consensus.client_table, so a change to consensus.client_table can break metadata.impls.metadata, while a change to metadata.impls.metadata can't break consensus.client_table.
Position
Below the diagonal: metadata.impls.metadata uses a module listed above it, which is the healthy direction.
metadata.impls.metadata uses consensus.impls, so a change to consensus.impls can break metadata.impls.metadata, while a change to metadata.impls.metadata can't break consensus.impls.
Position
Below the diagonal: metadata.impls.metadata uses a module listed above it, which is the healthy direction.
metadata.impls.metadata uses metadata.stm.stream, so a change to metadata.stm.stream can break metadata.impls.metadata, while a change to metadata.impls.metadata can't break metadata.stm.stream.
Position
Below the diagonal: metadata.impls.metadata uses a module listed above it, which is the healthy direction.
partitions.iggy_partition uses consensus.oneshot, so a change to consensus.oneshot can break partitions.iggy_partition, while a change to partitions.iggy_partition can't break consensus.oneshot.
Position
Below the diagonal: partitions.iggy_partition uses a module listed above it, which is the healthy direction.
partitions.iggy_partition uses iggy_binary_protocol.consensus.operation, so a change to iggy_binary_protocol.consensus.operation can break partitions.iggy_partition, while a change to partitions.iggy_partition can't break iggy_binary_protocol.consensus.operation.
Position
Below the diagonal: partitions.iggy_partition uses a module listed above it, which is the healthy direction.
partitions.iggy_partition uses iggy_common.error.iggy_error, so a change to iggy_common.error.iggy_error can break partitions.iggy_partition, while a change to partitions.iggy_partition can't break iggy_common.error.iggy_error.
Position
Below the diagonal: partitions.iggy_partition uses a module listed above it, which is the healthy direction.
partitions.iggy_partition uses server_common.iobuf, so a change to server_common.iobuf can break partitions.iggy_partition, while a change to partitions.iggy_partition can't break server_common.iobuf.
Position
Below the diagonal: partitions.iggy_partition uses a module listed above it, which is the healthy direction.
partitions.iggy_partition uses server_common.sharding.namespace, so a change to server_common.sharding.namespace can break partitions.iggy_partition, while a change to partitions.iggy_partition can't break server_common.sharding.namespace.
Position
Below the diagonal: partitions.iggy_partition uses a module listed above it, which is the healthy direction.
partitions.iggy_partition uses iggy_binary_protocol.consensus.header, so a change to iggy_binary_protocol.consensus.header can break partitions.iggy_partition, while a change to partitions.iggy_partition can't break iggy_binary_protocol.consensus.header.
Position
Below the diagonal: partitions.iggy_partition uses a module listed above it, which is the healthy direction.
partitions.iggy_partition uses iggy_common.utils.byte_size, so a change to iggy_common.utils.byte_size can break partitions.iggy_partition, while a change to partitions.iggy_partition can't break iggy_common.utils.byte_size.
Position
Below the diagonal: partitions.iggy_partition uses a module listed above it, which is the healthy direction.
partitions.iggy_partition uses iggy_common.utils.timestamp, so a change to iggy_common.utils.timestamp can break partitions.iggy_partition, while a change to partitions.iggy_partition can't break iggy_common.utils.timestamp.
Position
Below the diagonal: partitions.iggy_partition uses a module listed above it, which is the healthy direction.
partitions.iggy_partition uses server_common.consensus_message, so a change to server_common.consensus_message can break partitions.iggy_partition, while a change to partitions.iggy_partition can't break server_common.consensus_message.
Position
Below the diagonal: partitions.iggy_partition uses a module listed above it, which is the healthy direction.
partitions.iggy_partition uses consensus.client_table, so a change to consensus.client_table can break partitions.iggy_partition, while a change to partitions.iggy_partition can't break consensus.client_table.
Position
Below the diagonal: partitions.iggy_partition uses a module listed above it, which is the healthy direction.
partitions.iggy_partition uses iggy_binary_protocol.primitives.partition_history, so a change to iggy_binary_protocol.primitives.partition_history can break partitions.iggy_partition, while a change to partitions.iggy_partition can't break iggy_binary_protocol.primitives.partition_history.
Position
Below the diagonal: partitions.iggy_partition uses a module listed above it, which is the healthy direction.
partitions.iggy_partition uses iggy_common.types.options, so a change to iggy_common.types.options can break partitions.iggy_partition, while a change to partitions.iggy_partition can't break iggy_common.types.options.
Position
Below the diagonal: partitions.iggy_partition uses a module listed above it, which is the healthy direction.
partitions.iggy_partition uses consensus.impls, so a change to consensus.impls can break partitions.iggy_partition, while a change to partitions.iggy_partition can't break consensus.impls.
Position
Below the diagonal: partitions.iggy_partition uses a module listed above it, which is the healthy direction.
partitions.iggy_partition uses iggy_common.types.consumer.consumer_kind, so a change to iggy_common.types.consumer.consumer_kind can break partitions.iggy_partition, while a change to partitions.iggy_partition can't break iggy_common.types.consumer.consumer_kind.
Position
Below the diagonal: partitions.iggy_partition uses a module listed above it, which is the healthy direction.
simulator uses iggy_binary_protocol.consensus.operation, so a change to iggy_binary_protocol.consensus.operation can break simulator, while a change to simulator can't break iggy_binary_protocol.consensus.operation.
Position
Below the diagonal: simulator uses a module listed above it, which is the healthy direction.
simulator uses server_common.sharding.namespace, so a change to server_common.sharding.namespace can break simulator, while a change to simulator can't break server_common.sharding.namespace.
Position
Below the diagonal: simulator uses a module listed above it, which is the healthy direction.
simulator uses iggy_binary_protocol.consensus.header, so a change to iggy_binary_protocol.consensus.header can break simulator, while a change to simulator can't break iggy_binary_protocol.consensus.header.
Position
Below the diagonal: simulator uses a module listed above it, which is the healthy direction.
simulator uses server_common.consensus_message, so a change to server_common.consensus_message can break simulator, while a change to simulator can't break server_common.consensus_message.
Position
Below the diagonal: simulator uses a module listed above it, which is the healthy direction.
simulator uses iggy_binary_protocol.primitives.partition_history, so a change to iggy_binary_protocol.primitives.partition_history can break simulator, while a change to simulator can't break iggy_binary_protocol.primitives.partition_history.
Position
Below the diagonal: simulator uses a module listed above it, which is the healthy direction.
simulator uses iggy_common.types.consumer.consumer_kind, so a change to iggy_common.types.consumer.consumer_kind can break simulator, while a change to simulator can't break iggy_common.types.consumer.consumer_kind.
Position
Below the diagonal: simulator uses a module listed above it, which is the healthy direction.
simulator.workload.ops.delete_consumer_offset uses server_common.sharding.namespace, so a change to server_common.sharding.namespace can break simulator.workload.ops.delete_consumer_offset, while a change to simulator.workload.ops.delete_consumer_offset can't break server_common.sharding.namespace.
Position
Below the diagonal: simulator.workload.ops.delete_consumer_offset uses a module listed above it, which is the healthy direction.
simulator.workload.ops.delete_consumer_offset uses simulator.workload.effect, so a change to simulator.workload.effect can break simulator.workload.ops.delete_consumer_offset, while a change to simulator.workload.ops.delete_consumer_offset can't break simulator.workload.effect.
Position
Below the diagonal: simulator.workload.ops.delete_consumer_offset uses a module listed above it, which is the healthy direction.
simulator.workload.ops.delete_consumer_offset uses server_common.consensus_message, so a change to server_common.consensus_message can break simulator.workload.ops.delete_consumer_offset, while a change to simulator.workload.ops.delete_consumer_offset can't break server_common.consensus_message.
Position
Below the diagonal: simulator.workload.ops.delete_consumer_offset uses a module listed above it, which is the healthy direction.
simulator.workload.ops.delete_consumer_offset uses simulator.workload.options, so a change to simulator.workload.options can break simulator.workload.ops.delete_consumer_offset, while a change to simulator.workload.ops.delete_consumer_offset can't break simulator.workload.options.
Position
Below the diagonal: simulator.workload.ops.delete_consumer_offset uses a module listed above it, which is the healthy direction.
simulator.workload.ops.delete_consumer_offset uses simulator.client, so a change to simulator.client can break simulator.workload.ops.delete_consumer_offset, while a change to simulator.workload.ops.delete_consumer_offset can't break simulator.client.
Position
Below the diagonal: simulator.workload.ops.delete_consumer_offset uses a module listed above it, which is the healthy direction.
simulator.workload.ops.delete_consumer_offset uses simulator.workload.shadow, so a change to simulator.workload.shadow can break simulator.workload.ops.delete_consumer_offset, while a change to simulator.workload.ops.delete_consumer_offset can't break simulator.workload.shadow.
Position
Below the diagonal: simulator.workload.ops.delete_consumer_offset uses a module listed above it, which is the healthy direction.
34→37 simulator.workload.ops.delete_consumer_offset uses simulator.workload.ops.change_passwordpart of a loop✕
Connections
1 pair of types, where a type in simulator.workload.ops.delete_consumer_offset uses a type in simulator.workload.ops.change_password.
simulator.workload.ops.delete_consumer_offset uses simulator.workload.ops.change_password, so a change to simulator.workload.ops.change_password can break simulator.workload.ops.delete_consumer_offset, while a change to simulator.workload.ops.delete_consumer_offset can't break simulator.workload.ops.change_password.
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.
iggy.clients.client uses iggy_common.utils.duration, so a change to iggy_common.utils.duration can break iggy.clients.client, while a change to iggy.clients.client can't break iggy_common.utils.duration.
Position
Below the diagonal: iggy.clients.client uses a module listed above it, which is the healthy direction.
iggy.clients.client uses iggy_common.types.identifier, so a change to iggy_common.types.identifier can break iggy.clients.client, while a change to iggy.clients.client can't break iggy_common.types.identifier.
Position
Below the diagonal: iggy.clients.client uses a module listed above it, which is the healthy direction.
iggy.clients.client uses iggy_common.types.options, so a change to iggy_common.types.options can break iggy.clients.client, while a change to iggy.clients.client can't break iggy_common.types.options.
Position
Below the diagonal: iggy.clients.client uses a module listed above it, which is the healthy direction.
iggy.clients.client uses iggy_common.types.consumer.consumer_kind, so a change to iggy_common.types.consumer.consumer_kind can break iggy.clients.client, while a change to iggy.clients.client can't break iggy_common.types.consumer.consumer_kind.
Position
Below the diagonal: iggy.clients.client uses a module listed above it, which is the healthy direction.
iggy.clients.client uses iggy_common.types.message.polling_strategy, so a change to iggy_common.types.message.polling_strategy can break iggy.clients.client, while a change to iggy.clients.client can't break iggy_common.types.message.polling_strategy.
Position
Below the diagonal: iggy.clients.client uses a module listed above it, which is the healthy direction.
iggy.clients.client uses iggy.client_wrappers.client_wrapper, so a change to iggy.client_wrappers.client_wrapper can break iggy.clients.client, while a change to iggy.clients.client can't break iggy.client_wrappers.client_wrapper.
Position
Below the diagonal: iggy.clients.client uses a module listed above it, which is the healthy direction.
shard uses iggy_binary_protocol.consensus.operation, so a change to iggy_binary_protocol.consensus.operation can break shard, while a change to shard can't break iggy_binary_protocol.consensus.operation.
Position
Below the diagonal: shard uses a module listed above it, which is the healthy direction.
shard uses iggy_common.error.iggy_error, so a change to iggy_common.error.iggy_error can break shard, while a change to shard can't break iggy_common.error.iggy_error.
Position
Below the diagonal: shard uses a module listed above it, which is the healthy direction.
shard uses server_common.sharding.namespace, so a change to server_common.sharding.namespace can break shard, while a change to shard can't break server_common.sharding.namespace.
Position
Below the diagonal: shard uses a module listed above it, which is the healthy direction.
shard uses iggy_binary_protocol.consensus.header, so a change to iggy_binary_protocol.consensus.header can break shard, while a change to shard can't break iggy_binary_protocol.consensus.header.
Position
Below the diagonal: shard uses a module listed above it, which is the healthy direction.
shard uses iggy_common.utils.timestamp, so a change to iggy_common.utils.timestamp can break shard, while a change to shard can't break iggy_common.utils.timestamp.
Position
Below the diagonal: shard uses a module listed above it, which is the healthy direction.
shard uses server_common.consensus_message, so a change to server_common.consensus_message can break shard, while a change to shard can't break server_common.consensus_message.
Position
Below the diagonal: shard uses a module listed above it, which is the healthy direction.
shard uses iggy_common.types.options, so a change to iggy_common.types.options can break shard, while a change to shard can't break iggy_common.types.options.
Position
Below the diagonal: shard uses a module listed above it, which is the healthy direction.
shard uses metadata.impls.metadata, so a change to metadata.impls.metadata can break shard, while a change to shard can't break metadata.impls.metadata.
Position
Below the diagonal: shard uses a module listed above it, which is the healthy direction.
shard uses partitions.iggy_partition, so a change to partitions.iggy_partition can break shard, while a change to shard can't break partitions.iggy_partition.
Position
Below the diagonal: shard uses a module listed above it, which is the healthy direction.
simulator.workload.ops.change_password uses simulator.workload.effect, so a change to simulator.workload.effect can break simulator.workload.ops.change_password, while a change to simulator.workload.ops.change_password can't break simulator.workload.effect.
Position
Below the diagonal: simulator.workload.ops.change_password uses a module listed above it, which is the healthy direction.
simulator.workload.ops.change_password uses server_common.consensus_message, so a change to server_common.consensus_message can break simulator.workload.ops.change_password, while a change to simulator.workload.ops.change_password can't break server_common.consensus_message.
Position
Below the diagonal: simulator.workload.ops.change_password uses a module listed above it, which is the healthy direction.
simulator.workload.ops.change_password uses simulator.workload.options, so a change to simulator.workload.options can break simulator.workload.ops.change_password, while a change to simulator.workload.ops.change_password can't break simulator.workload.options.
Position
Below the diagonal: simulator.workload.ops.change_password uses a module listed above it, which is the healthy direction.
simulator.workload.ops.change_password uses simulator.client, so a change to simulator.client can break simulator.workload.ops.change_password, while a change to simulator.workload.ops.change_password can't break simulator.client.
Position
Below the diagonal: simulator.workload.ops.change_password uses a module listed above it, which is the healthy direction.
simulator.workload.ops.change_password uses simulator.workload.shadow, so a change to simulator.workload.shadow can break simulator.workload.ops.change_password, while a change to simulator.workload.ops.change_password can't break simulator.workload.shadow.
Position
Below the diagonal: simulator.workload.ops.change_password uses a module listed above it, which is the healthy direction.
simulator.workload.ops.change_password uses simulator.workload.ops.delete_consumer_offset, so a change to simulator.workload.ops.delete_consumer_offset can break simulator.workload.ops.change_password, while a change to simulator.workload.ops.change_password can't break simulator.workload.ops.delete_consumer_offset.
Position
Below the diagonal: simulator.workload.ops.change_password uses a module listed above it, which is the healthy direction.
iggy_cli.commands.cli_command uses iggy.clients.client, so a change to iggy.clients.client can break iggy_cli.commands.cli_command, while a change to iggy_cli.commands.cli_command can't break iggy.clients.client.
Position
Below the diagonal: iggy_cli.commands.cli_command uses a module listed above it, which is the healthy direction.
iggy_gateway_kafka.bridge.iggy_bridge uses iggy_common.types.identifier, so a change to iggy_common.types.identifier can break iggy_gateway_kafka.bridge.iggy_bridge, while a change to iggy_gateway_kafka.bridge.iggy_bridge can't break iggy_common.types.identifier.
Position
Below the diagonal: iggy_gateway_kafka.bridge.iggy_bridge uses a module listed above it, which is the healthy direction.
iggy_gateway_kafka.bridge.iggy_bridge uses iggy_common.types.message.polling_strategy, so a change to iggy_common.types.message.polling_strategy can break iggy_gateway_kafka.bridge.iggy_bridge, while a change to iggy_gateway_kafka.bridge.iggy_bridge can't break iggy_common.types.message.polling_strategy.
Position
Below the diagonal: iggy_gateway_kafka.bridge.iggy_bridge uses a module listed above it, which is the healthy direction.
iggy_gateway_kafka.bridge.iggy_bridge uses iggy.clients.client, so a change to iggy.clients.client can break iggy_gateway_kafka.bridge.iggy_bridge, while a change to iggy_gateway_kafka.bridge.iggy_bridge can't break iggy.clients.client.
Position
Below the diagonal: iggy_gateway_kafka.bridge.iggy_bridge uses a module listed above it, which is the healthy direction.
iggy_gateway_kafka.protocol.api uses iggy_gateway_kafka.bridge.iggy_bridge, so a change to iggy_gateway_kafka.bridge.iggy_bridge can break iggy_gateway_kafka.protocol.api, while a change to iggy_gateway_kafka.protocol.api can't break iggy_gateway_kafka.bridge.iggy_bridge.
Position
Below the diagonal: iggy_gateway_kafka.protocol.api uses a module listed above it, which is the healthy direction.
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
A05:2025 — Injection
242
High / Critical
A02:2025 — Security Misconfiguration
100
High / Critical
A03:2025 — Software Supply Chain Failures
38
High / Critical
A07:2025 — Authentication Failures
32
High / Critical
Roadmap
Top priorities: 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; Resolve the 17 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED (7), REDACTED (3), REDACTED; Resolve the 9 REDACTED finding(s) in Secrets (history) — start with REDACTED (6), REDACTED (3).
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Resolve the 9 REDACTED finding(s) in Secrets (history) — start with REDACTED (6), REDACTED (3).
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.
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 — 311
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 — 2368
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 — 165
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 22
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 63 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 — 63 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, 2765 of 2844 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 — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT MEASURED: the .NET half could not be measured — no coverage produced (collector absent, or test run exceeded the inline budget); the JavaScript/TypeScript half measured 97.7% (node:test via `npm ci --ignore-scripts` in foreign/node/; node:test via `npm ci --ignore-scripts` in web/). This repository's production source spans both ecosystems, and no partial figure is published as if it were the whole: coverage is excluded from the score rather than counted as a near-zero. This is OUR limitation, not a defect in the repo — a Codecov configuration (codecov.yml, target 50%) and a coverage step in CI (`cargo llvm-cov`) shows coverage is measured in your own CI.
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 1,277 test(s) behind this row are the ones the C# collector could read, and this repository also carries at least 970 test source file(s) (.rs, .java, .swift, .py, .php, .ts, .go, .mjs) 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 — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability NOT SCORED: this repository's production source spans .cs, .rs, and the rust executor ran against the .rs half and never executed — so reliability was not measured for the repository as a whole. The .NET suite did build and re-run, and came back with 0 flaky across 2 measured tier(s) (integration: not included — too large to re-run within its budget; BDD: measured (0 flaky); JavaScript/TypeScript (node:test via `npm ci --ignore-scripts` in foreign/node/ (1161 tests); node:test via `npm ci --ignore-scripts` in web/ (27 tests)): measured (0 flaky)) — but that is a figure for one half of the product, and we do not publish a partial one as if it were complete. This is OUR limitation, not a defect in the repo — test reliability is excluded from the score rather than counted. The half was driven by a runner we ship, so this is not a missing-runner gap.
D14 License Compliance — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository declares a Cargo manifest, but the licence verdict published here was taken over its NuGet package dependencies. Nothing was read about its Cargo dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
D14 License Compliance — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository declares a Swift Package.swift/Package.resolved, but the licence verdict published here was taken over its NuGet package dependencies. Nothing was read about its SwiftPM dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
D14 License Compliance — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository declares 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.
D17 Explicit Debt — 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 11 deducted marker(s) and the 0.6/KLoC density on this row were taken over this repository's .NET projects ALONE: .rs (607,553 lines, 80% of production source) went unread, because every marker collector on this path is reached through a C# workspace. A read-only sweep of that source finds at least 40 task marker(s) (TODO/FIXME/HACK/XXX) across 29 file(s) that this score does not count — a floor, since only line comments are read there and D17's other eight marker kinds (suppressions, NoWarn, editorconfig severities, empty catches, commented-out code, Obsolete, dead code, preprocessor branches) need a compiler we do not have for that language. The debt in that source is UNMEASURED — its absence from the score above is a gap in this analyzer's language coverage, not a finding that the code carries none.
D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each ecosystem's manifests (what makes a folder runnable or a published package) need their own proof before D19 judges its units. Until then those folders' READMEs are judged only as documents (boilerplate, structure), never counted as complete.
D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This kind did not reach the 95 % precision gate in three adjudicated runs (docs/plans/deterministic-engine/adjudication/D19-sample3-v3.md), so by the pre-registered fallback it publishes no row until a re-measurement shows it does. The candidates are counted here, not reported as findings, and the score does not include them.
D21 Naming Consistency — not measured this 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. D21's naming rules read C# through Roslyn and every other language through its sidecar model; these languages are left out (PHP's reading is its own change, a Roslyn-loaded VB or F# project has no population builder yet). Their declarations carry no naming verdict this run — this says nothing about whether their names are consistent.
D21 Naming Consistency — 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. 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 — 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. 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.
D23 Boundary Type-Coupling — 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. 2 bounded context(s) were resolved, but of the 2833 public type(s) this run scanned, none could be attributed to any of them — so no cross-boundary leak was reachable and an empty result was guaranteed regardless of the code. This happens when the scored code model is a non-.NET (sidecar) primary while the contexts were resolved from .NET project directories, which key on assembly name. Not scored: this is a gap in the analyzer, not a verdict about this repository. You can widen what we reach: declare this codebase's bounded contexts by module-path or namespace prefix so they resolve against the languages actually scanned. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
D24 Comment Value — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each source language's comment syntax, and the code a comment annotates in it, needs its own proof before D24 judges it. Until then those comments are left unread, not counted as clean.
D27 Navigability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Navigability is taken over call sites whose callee resolved. For C# that population includes calls into referenced assemblies; for this language only calls declared inside the repository count, so the abstention threshold reads the repository's use of its standard library as a resolution failure. That is a limit of this analyzer, not a build problem in this repository.
D31 IaC & Container Security — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Gateways/kafka/REDACTED.dockerignore carries no `FROM` instruction, so it declares no build stage and every REDACTED rule this engine owns — the runtime-hardening, key-material, mutable-clone, no-op-shim, build-context, trust-anchor, install-guard, setuid and world-writable-path rules — is outside its own premise there and returned nothing. That silence is deliberate and correct: with no base image there is no image to reason about. It is reported here because it is NOT the same fact as a clean file, and coverage is stated as 55 of 56 Infrastructure-as-Code manifest(s) fully judged rather than as 100%. The vendor scanners (trivy, checkov) do read these files and their findings above stand; only this engine's own stage-keyed rules are absent. No owner action: a build file with no FROM is a legitimate include fragment.
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. `foreign/csharp/Iggy_SDK/Consumers/PartitionReader.cs`, `foreign/csharp/Iggy_SDK/Consumers/ReadException.cs`, `foreign/csharp/Iggy_SDK/Contracts/FetchedMessages.cs`, `foreign/csharp/Iggy_SDK/Exceptions/VsrFetchProgressUncertainException.cs`, `foreign/csharp/Iggy_SDK/Exceptions/VsrOperationNotRetainedException.cs`, … (+23 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.
D41 Kernel & Syscall Confinement — 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. Helm/charts/iggy-kafka-gateway/templates/statefulset.yaml:20, REDACTED:32, REDACTED:220 did not read as a pod spec (a templated manifest such as Helm's that is not YAML until rendered, or a workload whose pod spec this check does not locate), so the seccomp/AppArmor profile in force there was not judged and no row about them can appear on this card.
AX6 Interface segregation — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
AXR1 Runtime accessibility — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Render strategy: boot via DockerCompose (REDACTED). compose up failed (exit 15 — the compose project is invalid) — error while interpolating services.iggy-server.environment.[]: required variable IGGY_ROOT_PASSWORD is missing a value: set IGGY_ROOT_PASSWORD; runtime evidence skipped.
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 — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
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.
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. 396 further occurrence(s) are not listed individually; the score already reflects all 436.
R10 Code Duplication — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 12 further occurrence(s) are not listed individually; the score already reflects all 52.
R2 Cyclomatic Complexity — 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. 18 further occurrence(s) are not listed individually; the score already reflects all 58.
R4 Test Coverage — 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. 90 further occurrence(s) are not listed individually; the score already reflects all 130.
X1 Async correctness — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X10 Duplicated predicate — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 4 further occurrence(s) are not listed individually; the score already reflects all 44.
X12 Unreachable branch — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X14 Bypassable address classification — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X16 Unfloored truncation loop — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X18 Disposal-pattern correctness — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X2 Cancellation propagation — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X21 Side-effecting pattern guard — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X22 Contradicted release guard — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X24 Document value interpolated into markup unescaped — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X27 Collection changed while being enumerated — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X28 Index access outside its own emptiness guard — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X29 Per-element action decided by a fixed element — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X3 Exception handling — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X4 Structured logging — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
Repo exclusion declarations: 14 pattern(s) declared (.gitattributes linguist-generated/vendored, .editorconfig generated_code) excluded 0 source file(s) from code-quality scoring. Declarations are the repo's own visible statement that a tree is machine-written or vendored — auditable in any diff, honored by GitHub the same way.
Limitations & what we did not check
We assess the repository exactly as committed, and only the repository. By design we do not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.
Per-dimension blind spots
For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.
D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
D13 REDACTED Scanning: REDACTED detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
D22 Internal API Consistency: API consistency compares the call shapes of members that play the same role on the exposed C# surface: whether the API suits its callers is not measured, and surfaces in other languages are not measured.
D24 Comment Value: Comment value is measured as redundancy only: a comment that repeats its code's words is found, but a paraphrase in other words, a vague comment, or one the code contradicts is not, and whether a comment is valuable is not claimed. Comments in other scripts or languages, and outside C#, are not judged.
D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules — it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
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 (REDACTED, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
AX9 CQS / query purity: Handlers are found by interface/name convention — a query handler using neither is not seen. Mutation is a resolved write/publish invocation (SaveChanges/repository/bus), so a write hidden behind a hand-rolled wrapper, reflection, or a string-keyed service locator resolves to a non-persistence type and isn't flagged; it detects that a query writes state, not whether the write is a legitimate read-side cache update. Clean means "no resolved write/publish in a query body", not a proof of CQS purity.
M4 Documentation accuracy: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
P5 DR & Backup: Backup/restore and disaster-recovery readiness is judged from in-repo evidence — a config that exists is not a tested restore, so the absence of positive evidence is reported as "not evidenced", never scored as present.
P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.
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.
261 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was CommandResponseStream.drive at 210. A further 80 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 IggyErrorCode.name at 269 — they are counted neither in the figure above nor in this dimension's score. 41 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: foreign/swift/Sources/Iggy/Errors/IggyErrorCode.swift (IggyErrorCode.name at 269), foreign/node/src/wire/error.code.ts (error.code.translateErrorCode at 261), foreign/swift/Sources/Iggy/Protocol/CommandCode.swift (CommandCode.name at 53), core/binary_protocol/src/dispatch.rs (iggy_binary_protocol::dispatch::command_index at 53), core/consensus/src/observability.rs (consensus::observability::operation_as_str at 41), and 36 more not listed here. They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.
+ 169 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 CommandResponseStream.drive (cyclomatic 210), TcpMessageStream.RunClientOperationAsync (cyclomatic 178), IggyTcpClient.driveOperation (cyclomatic 156). — 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.
+ 264 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 5 bodies over 120 down to 120 or less in Cognitive Complexity — start with IggyTcpClient.driveOperation (cognitive 320), CommandResponseStream.drive (cognitive 315), TcpMessageStream.RunClientOperationAsync (cognitive 306). — 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 5 together lifts Cognitive Complexity from 4.8 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: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 · God Classes8.9 / 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.
+ 1 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 122 FileTooLong finding(s) in God Classes — start with mod.rs (7), lib.rs (4), client.rs (4). — One of this dimension's main actionable groups (122 warning-level).
Resolve the 63 TooManyMethods finding(s) in God Classes — start with mod.rs (5), client.rs (4), lib.rs (3). — One of this dimension's main actionable groups (63 warning-level).
Resolve the 44 ClassTooLong finding(s) in God Classes — start with client.rs (4), lib.rs (3), mod.rs (3). — One of this dimension's main actionable groups (44 warning-level).
Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
377 duplicated block group(s) detected. 3.1 % of the production lines (23,524 of 758,741) are in a reported copy. A further 500 rows report members as variants of one another; the share counts each copied line once, however many rows cite it. 114 of the 877 are in trees this repository does not ship — vendored, example/demo, project-template, fixture and benchmark code — and are ranked below the shipped groups rather than excluded from them: the duplication there is real and is still counted in this dimension's score. The dimensions that publish a production-file census leave those trees out of theirs, so this count is deliberately drawn over the wider population.
+ 216 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 33 Duplicated block (8 lines × 2) finding(s) in Code Duplication — start with client.rs (3), config.rs (2), group_metrics.rs (2). — One of this dimension's main actionable groups (33 warning-level).
Resolve the 27 Duplicated block (7 lines × 2) finding(s) in Code Duplication — start with client.rs (3), log.rs (2), metadata.rs (2). — One of this dimension's main actionable groups (27 warning-level).
Resolve the 26 Edited copy of a member (11 corresponding lines) finding(s) in Code Duplication — start with client.rs (2), MetadataChangesJson.java (2), BytesDeserializer.java (2). — One of this dimension's main actionable groups (26 warning-level).
Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D5 · Coupling8.6 / 10Strong✓ 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.
44 production modules (Gradle+Cargo+npm+Go+SwiftPM+Bazel), 0 dependency cycle(s), 2 unstable depended-on module(s). Read from the build's own module declarations; edges a convention plugin adds from buildSrc or build-logic are not visible there; 6 module(s) off the main sequence, with abstractness counted on 36 of the 44 (the rest declare no modelled class or interface, export only macros, declare types in source no model reads, or have no source directory of their own).
Off the main sequence: cpu_allocation · ×5
Unstable project server
Unstable project shard
Off the main sequence: iggy_common
What to do
Resolve the 5 Off the main sequence finding(s) in Coupling. — One of this dimension's main actionable groups (5 warning-level).
Resolve the 1 Unstable project server finding(s) in Coupling. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 Unstable project shard finding(s) in Coupling. — 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 2 Low cohesion finding(s) in Cohesion (LCOM4) — start with change_log.rs, api.rs. — One of this dimension's main actionable groups (2 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 8 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.
0 skipped, 8 zero-assertion, 1 mock references across 1277 tests. Measured on the C# suite only — at least 970 test source file(s) (.rs, .java, .swift, .py, .php, .ts, .go, .mjs) went unread, so its test quality is unmeasured and is not in these counts.
No assertions: CreateClient_TcpClientDisposesTwice · ×8foreign/csharp/Iggy_SDK_Tests/ClientTests/IggyClientFactoryTests.cs:129
Mock framework: Moq
What to do
Resolve the 8 No assertions finding(s) in Test Quality — start with CredentialBoundsTests.cs (2), IggyClientFactoryTests.cs, DeferredPollContractsTests.cs. — One of this dimension's main actionable groups (8 warning-level).
Detailed fixes: d10_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
12 outdated, 0 vulnerable, 0 deprecated packages. Those are the NuGet packages; this repository's npm dependencies were read too — 43 outdated of 113 package(s) across 4 lockfile(s).
Resolve the 1 Outdated (npm) finding(s) in Dependency Hygiene. — One of this dimension's main actionable groups (1 recommendation-level).
Resolve the 1 Outdated finding(s) in Dependency Hygiene — start with Directory.Packages.props. — One of this dimension's main actionable groups (1 recommendation-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.
12 secret(s) detected. 7 detection(s) were excluded as holding no minted credential in material that runs: a name, reference or comparison rather than a value, a readable phrase or pattern, a value that declares itself fake, or development, test, example, mock or demo material.
REDACTED
What to do
Resolve the 17 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED (7), REDACTED (3), REDACTED. — One of this dimension's main actionable groups (17 issue-level).
Detailed fixes: d13_recommendation.md · top locations in Appendix A, every location in findings.md.
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 138 packages use a banned license. ★ DEPTH: this repository's MSBuild projects declare 18 direct `PackageReference`(s), and 96 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 a Cargo manifest, a Swift Package.swift/Package.resolved and package.json, and the licences of those dependency graphs were NOT read by this pass — a gap in this engine's coverage, not a statement about them. So this result says the graded closure carries no banned licence; it does NOT say this repository's licensing is clear.
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.
Top hotspots: core/shard/src/lib.rs (77×111=8547); core/partitions/src/iggy_partition.rs (73×90=6570); foreign/node/src/client/client.socket.ts (16×210=3360) Repeated repair below the complexity floor: core/sdk/src/websocket/websocket_client.rs (9 of 16 changes were fixes); core/configs/src/configs_impl/typed_env_provider.rs (4 of 7 changes were fixes); core/common/src/traits/client.rs (4 of 7 changes were fixes)
Resolve the 99 Hotspot finding(s) in Churn × Complexity Hotspots — start with mod.rs (4), replica.rs (2), main.rs (2). — One of this dimension's main actionable groups (99 warning-level).
Resolve the 6 Repeated repair finding(s) in Churn × Complexity Hotspots — start with websocket_client.rs, typed_env_provider.rs, client.rs. — One of this dimension's main actionable groups (6 warning-level).
Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D16 · Bus Factor9.5 / 10Exemplary✓ Tool-verified
What it measures: Whether knowledge is concentrated in too few people (the "bus factor").
Method: Living knowledge per author via time-decayed commit attribution (6-month half-life, focus weighting) across largest source files. Deterministic, avoids blame's mechanical-refactor false positives.
7 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is foreign/csharp/Iggy_SDK/Utils/IggyDurationParser.cs. Counted over 124 of the 233 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
Off-boarding risk: anonymized user #1
✓ On the Gold path — maintain.
Detailed fixes: d16_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Acknowledged debt left in the code — TODOs, dead code, suppressed warnings.
Method: Roslyn syntactic debt markers (suppressions/TODO/FIXME/HACK/empty-catch/commented-code/Obsolete) plus SymbolFinder dead-code analysis; weighted-debt-per-KLoC density deducted 2.0x per unit. Deterministic, exhaustive.
11 deducted debt markers + 62 dead symbols across 34788 LoC in the .NET projects (0.6/KLoC) → score 8.9. Measured on the .NET source only: .rs (80% of production source) was not read, and carries at least 40 uncounted task marker(s) in 29 file(s).
Resolve the 4 EmptyCatchBlock finding(s) in Explicit Debt — start with PartitionReader.cs (2), IggyConsumer.cs, TcpMessageStream.Vsr.cs. — One of this dimension's main actionable groups (4 issue-level).
Resolve the 1 WriteOnlyPrivateField finding(s) in Explicit Debt — start with PrimaryPollingTests.cs. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 62 Dead code finding(s) in Explicit Debt — start with ErrorFactory.cs (50), DummyObjFactory.cs (2), PermissionsFactory.cs (2). — One of this dimension's main actionable groups (62 warning-level).
Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the project's documentation is clear, complete, and useful.
Method: Every README, docs/ document and root guide parsed by its markup and measured in Unicode letters. Published: a runnable or packaged .NET project whose README (or a document it links, or a root guide) shows no example, and a root README naming none of three or more projects. Overview, licence, boilerplate, wall-of-text, empty-section and XML-doc rows are measured and withheld (counted in gaps) after adjudication. Deterministic, exhaustive, advisory.
2 of 2 documentation facets pass in full. 47 document(s) read across 6 unit(s).
✓ On the Gold path — maintain.
Detailed fixes: d19_recommendation.md.
Do you agree with this assessment?
D22 · Internal API Consistency9.5 / 10Stronggated by 1 serious finding✓ Tool-verified
What it measures: Whether the internal API surface is consistent and coherent.
Method: Call-shape rules (A1-A9) over the structured code model of the intentionally exposed C# surface: members of one type, overloads of one name and the same slot across sibling types are compared, and a member that makes a caller use a different convention for the same kind of operation is flagged. Deterministic, no model. Advisory.
1 API inconsistencies among 212 exposed members measured against a convention their peers follow.
`IIggyClient.AbandonOperationAsync` has no CancellationToken; its 3 sibling async members take oneforeign/csharp/Iggy_SDK/IggyClient/IIggyClient.cs:125
What to do
Resolve the 1 `IIggyClient.AbandonOperationAsync` has no CancellationToken; its 3… finding(s) in Internal API Consistency — start with IIggyClient.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 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 19 projects flagged as possibly oversized/incoherent.
Projects may be oversized for their cohesionforeign/csharp/Iggy_SDK/Iggy_SDK.csproj:1
What to do
Resolve the 1 Projects may be oversized for their cohesion finding(s) in Project Cohesion — start with Iggy_SDK.csproj. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d26_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
14 finding(s): 0 critical, 14 high, 0 medium, 0 low. Remediation for historically-committed secrets is credential rotation — they remain in history regardless of later deletion.
REDACTED
REDACTED
REDACTED
What to do
Resolve the 9 REDACTED finding(s) in Secrets (history) — start with REDACTED (6), REDACTED (3). — One of this dimension's main actionable groups (9 issue-level).
Resolve the 5 High secret finding(s) in Secrets (history) — start with REDACTED (2), REDACTED, REDACTED. — One of this dimension's main actionable groups (5 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).
242 finding(s): 0 critical, 233 high, 8 medium, 1 low. 129 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 75 file(s) — `bdd/java/gradlew` (line 74, line 250), `core/sdk/src/driver.rs` (line 3749), `core/server/src/http/forward.rs` (line 2905), `core/server/src/http/handlers.rs` (line 1388, line 1569, line 1720, …), `core/shard/src/lib.rs` (line 15017, line 19003), … (+70 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 29 of those file(s) — `foreign/csharp/Iggy_SDK.Tests.Integration/Attributes/SkipHttpAttribute.cs`, `foreign/csharp/Iggy_SDK.Tests.Integration/Attributes/SkipTcpAttribute.cs`, `foreign/csharp/Iggy_SDK.Tests.Integration/PartitionReaderStartTests.cs`, `foreign/csharp/Iggy_SDK/Consumers/PartitionReader.cs`, `foreign/csharp/Iggy_SDK/Consumers/ReadException.cs`, … (+24 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 2 of those file(s) — `foreign/csharp/Iggy_SDK/Consumers/ReadException.cs`, `foreign/csharp/Iggy_SDK_Tests/ClientTests/HttpPartitionContextTests.cs` — 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. Separately, one or more rules could not re-parse an embedded snippet in 31 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
+ 7 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 41 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (33), REDACTED (5), REDACTED (3). — One of this dimension's main actionable groups (41 issue-level).
Resolve the 35 REDACTED finding(s) charged to Static Analysis (SAST) — the other 129 are reported here at file:line but scored by D36 (supply-chain provenance), which charges them once. — One of this dimension's main actionable groups (164 issue-level, 35 of them charged here).
Resolve the 17 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (7), REDACTED (7), REDACTED. — One of this dimension's main actionable groups (17 issue-level).
Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares — Dart pub, Elixir and Erlang via Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.
Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle (and Scala, whose sbt build's pinned direct declarations are written into a CycloneDX SBOM the scanner reads, with rows attributed back to the build file), npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05. Advisory since rubric-2026.11.2 (CAI decision 0006): every row is a match against a vulnerability database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
+ 2 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 1 Critical CVE finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 1 Critical vulnerability finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 1 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Detailed fixes: d30_recommendation.md · top locations in Appendix A, every location in findings.md.
Resolve the 46 Medium IaC finding(s) in IaC & Container Security — start with REDACTED (30), REDACTED (7), REDACTED (6). — One of this dimension's main actionable groups (46 warning-level).
Resolve the 37 High IaC finding(s) in IaC & Container Security — start with REDACTED (25), REDACTED (5), REDACTED.test (5). — One of this dimension's main actionable groups (37 issue-level).
Resolve the 17 Low IaC finding(s) in IaC & Container Security — start with REDACTED (11), REDACTED (6). — One of this dimension's main actionable groups (17 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.
Every significant source file has living knowledge — recently and meaningfully worked. Counted over 124 of the 233 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
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 6 Change coupling finding(s) in Change Coupling — start with bounds_guard.rs, quic_client.rs, benchmark_producer.rs. — One of this dimension's main actionable groups (6 warning-level).
Detailed fixes: d35_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the build pipeline provides supply-chain integrity — generated provenance/attestation, signed artifacts (cosign/sigstore), an SBOM, and pinned build actions. Presence of the configuration, not a runtime guarantee.
Method: Supply-chain provenance/signing read deterministically from CI/build config (.github/workflows, .gitlab-ci.yml, azure-pipelines, Jenkinsfile, .circleci) + the release surface: four signals — generated provenance/attestation (SLSA/in-toto/actions-attest), artifact signing (cosign/sigstore/gitsign), an SBOM (syft/sbom-action/*.spdx.json/*.cdx.json), and SHA-pinned build actions — scored 10·present/denom. NotApplicable without a build pipeline. Detects configuration presence, not runtime enforcement.
Resolve the 2 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED (2). — One of this dimension's main actionable groups (2 warning-level).
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d36_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the repository publishes a coordinated-vulnerability-disclosure policy (SECURITY.md or security.txt) with a reporting contact, so finders know how to report a vulnerability. Presence of a policy file with a contact, not whether the policy is adequate or honoured.
Method: Vulnerability-disclosure policy read deterministically from the repo: a SECURITY.md (root/.github/docs) or .well-known/security.txt / security.txt, regex-checked for a reporting contact (email / URL / mailto). Present + contact → 10; present without a contact → 4; NotApplicable when no policy file exists (it may live off-repo). Detects the policy file's presence + contact, not its adequacy.
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.
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 25 platform declaration(s) and 45 dependency declaration(s). This dimension reads what the repository says about ITSELF — a pinned target framework, a version file, a capped requires-python, a Rust toolchain pin, a framework major a constraint cannot move off. A FLOOR is deliberately never charged: `requires-python = ">=3.8"` states what the package SUPPORTS, not what it runs on, and a well-maintained library declares exactly that while running its own CI on a current release. The end-of-life facts are FROZEN and dated, so this dimension needs no network and answers identically inside a closed scan fence; as the table ages it loses recall and never precision, because a statement about support that ended in the past cannot become false. The OS layer of a container image is D31's question and the toolchain a CI workflow installs is D29's; this row is neither.
Other · Architecture — How the codebase splits by code ROLE — domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified. How each file's role is decided, because the split is only as good as that: a generated name or a build-output tree makes it Generated, a test project makes it Test, and otherwise the file's NAMESPACE and PATH words are matched against fixed vocabularies in a fixed ORDER — domain, then infrastructure, then application — so a file whose words hit two layers is counted under the earlier one. A production file matching none of them counts as application, so that share reads 'application or unclassified' rather than a measured application layer. Roles come from naming convention, never from what the code does.
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 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 Apache.Iggy.Contracts ↔ Apache.Iggy.Contracts.Auth ↔ Apache.Iggy.Contracts.Http ↔ Apache.Iggy.Exceptions ↔ Apache.Iggy.JsonConverters ↔ Apache.Iggy.Kinds ↔ Apache.Iggy.Vsr depend on each other. The lightest dependency in the cycle is Apache.Iggy.Contracts.Auth → Apache.Iggy.Contracts (Apache.Iggy.Contracts.Auth.Permissions → Apache.Iggy.Contracts.StreamPermissions, 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. — foreign/csharp/Iggy_SDK/Contracts/Auth/Permissions.cs:23
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 dependencies point inward (Domain ← Application ← Infrastructure/Web) — the clean-architecture dependency rule, checked across the project graph.
Method: Layer violations by name-segment inference (Domain/Core to Application to Infrastructure/Web) over the project-reference graph. Exhaustive over all projects, deterministic.
Other · Architecture — Whether 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.
Do you agree with this assessment?
AX8 · Test isolation10.0 / 10Exemplary✓ Tool-verified
Other · Architecture — Whether production projects stay free of references to test projects — tests may depend on production, never the reverse.
Method: Csproj graph: each production project checked for references to test projects (identified by test-framework presence, not name). Zero violations is clean. Deterministic.
Other · Architecture — Whether read (query) handlers stay side-effect-free — a query that writes persistent state or raises events breaks CQS and makes reads unsafe to retry, cache, or route to a read replica.
Method: Roslyn scan: CQRS handlers classified query-vs-command by interface (IQueryHandler/ICommandHandler/IRequestHandler<TQuery,TResult>) and name convention (*Query/Get*/Find* vs *Command); each query handler's body checked for persistent-state writes (SaveChanges/repository Add-Update) or event publishes by resolved invocation. Deterministic, type-level, exhaustive over the detected handlers.
Coverage: Population: CQRS handlers identified by IQueryHandler/ICommandHandler/IRequestHandler interface + *Query/Get*/Find*/*Command NAME convention; query purity then checked exhaustively within that set — a query handler using neither convention is invisible, and mutation is a resolved persistence/publish CALL, not full dataflow.
`BenchmarkCache.load` is a read-named query yet it performs a durable write on the read path (a persist to a store/repository). A query must stay side-effect-free so reads are safe to retry, cache, and route to a read replica; move the write into a command. — core/bench/dashboard/server/src/cache/mod.rs:28
What to do
Keep query handlers read-only — move the writes/event-publishes into a command handler so reads stay safe to retry, cache, and route to a read replica.
Other · Event Sourcing — Whether the recovery-replay fold is deterministic — state derived purely from each event's own fields, no clock/random/IO on the replay path.
Method: Roslyn syntax scan (event-sourcing gated): Apply/When folds checked for forbidden tokens (DateTime.Now, Guid.NewGuid, Random, IO), stripped of comments/strings. Deterministic, hard fact per fold.
Other · Event Sourcing — Whether domain events stay immutable (private fields, set once) rather than carrying mutable state.
Method: Roslyn scan (event-sourcing gated): persisted events checked for public setters; immutability verified per property/field. Deterministic, hard fact.
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. (×5) — foreign/csharp/Iggy_SDK/JsonConverters/ConsumerConverter.cs:27, foreign/csharp/Iggy_SDK/JsonConverters/ExpiryConverter.cs:37, foreign/csharp/Iggy_SDK/JsonConverters/MessageConverter.cs:27, …
What to do
Finish or delete NotImplementedException stubs and replace placeholder literals before shipping.
Maturity · Maturity — Whether the repository and its projects have a README, and whether it is substantive.
Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.
What to do
Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
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.
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 & versioning9.8 / 10Exemplary✓ 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.
4 public types in `Apache.Iggy.IggyClient.Implementations` are marked as implementation by their own namespace, folder or name: `HttpMessageStream` (foreign/csharp/Iggy_SDK/IggyClient/Implementations/HttpMessageStream.cs:51, `Implementations`), `HttpMessageStream` (foreign/csharp/Iggy_SDK/IggyClient/Implementations/HttpMessageStream.cs:51, `Implementations`), `TcpMessageStream` (foreign/csharp/Iggy_SDK/IggyClient/Implementations/TcpMessageStream.cs:47, `Implementations`), `TcpMessageStream` (foreign/csharp/Iggy_SDK/IggyClient/Implementations/TcpMessageStream.cs:47, `Implementations`). While they are public, every consumer of the library can bind to them, so changing them is a breaking change for those consumers. — foreign/csharp/Iggy_SDK/IggyClient/Implementations/HttpMessageStream.cs:51
`Apache.Iggy.Contracts.Http.ErrorResponse` (foreign/csharp/Iggy_SDK/Contracts/Http/ErrorResponse.cs:24) is public, and the library's own code uses it, but no other project in this repository uses it (read: `Benchmarks(net8.0)`, `Iggy_SDK.Tests.Integration(net8.0)`, `Iggy_SDK_Tests(net8.0)`, `Shared(net8.0)`) 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. — foreign/csharp/Iggy_SDK/Contracts/Http/ErrorResponse.cs:24
`Apache.Iggy.Contracts.Http.ErrorResponse` (foreign/csharp/Iggy_SDK/Contracts/Http/ErrorResponse.cs:24) is public, and the library's own code uses it, but no other project in this repository uses it (read: `Benchmarks(net10.0)`, `Iggy_SDK.Examples.Basic.Consumer`, `Iggy_SDK.Examples.Basic.Producer`, `Iggy_SDK.Examples.GettingStarted.Consumer`, `Iggy_SDK.Examples.GettingStarted.Producer`, `Iggy_SDK.Examples.MessageEnvelope.Consumer`, `Iggy_SDK.Examples.MessageEnvelope.Producer`, `Iggy_SDK.Examples.MessageHeaders.Consumer`, `Iggy_SDK.Examples.MessageHeaders.Producer`, `Iggy_SDK.Examples.NewSdk.Consumer`, `Iggy_SDK.Examples.NewSdk.Producer`, `Iggy_SDK.Examples.Shared`, `Iggy_SDK.Examples.TcpTls.Consumer`, `Iggy_SDK.Examples.TcpTls.Producer`, `Iggy_SDK.Tests.BDD`, `Iggy_SDK.Tests.Integration(net10.0)`, `Iggy_SDK_Tests(net10.0)`, `Shared(net10.0)`) 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. — foreign/csharp/Iggy_SDK/Contracts/Http/ErrorResponse.cs:24
`Apache.Iggy.Errors.ErrorModel` (foreign/csharp/Iggy_SDK/Errors/ErrorModel.cs:23) is public, and the library's own code uses it, but no other project in this repository uses it (read: `Benchmarks(net8.0)`, `Iggy_SDK.Tests.Integration(net8.0)`, `Iggy_SDK_Tests(net8.0)`, `Shared(net8.0)`) 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. — foreign/csharp/Iggy_SDK/Errors/ErrorModel.cs:23
`Apache.Iggy.Errors.ErrorModel` (foreign/csharp/Iggy_SDK/Errors/ErrorModel.cs:23) is public, and the library's own code uses it, but no other project in this repository uses it (read: `Benchmarks(net10.0)`, `Iggy_SDK.Examples.Basic.Consumer`, `Iggy_SDK.Examples.Basic.Producer`, `Iggy_SDK.Examples.GettingStarted.Consumer`, `Iggy_SDK.Examples.GettingStarted.Producer`, `Iggy_SDK.Examples.MessageEnvelope.Consumer`, `Iggy_SDK.Examples.MessageEnvelope.Producer`, `Iggy_SDK.Examples.MessageHeaders.Consumer`, `Iggy_SDK.Examples.MessageHeaders.Producer`, `Iggy_SDK.Examples.NewSdk.Consumer`, `Iggy_SDK.Examples.NewSdk.Producer`, `Iggy_SDK.Examples.Shared`, `Iggy_SDK.Examples.TcpTls.Consumer`, `Iggy_SDK.Examples.TcpTls.Producer`, `Iggy_SDK.Tests.BDD`, `Iggy_SDK.Tests.Integration(net10.0)`, `Iggy_SDK_Tests(net10.0)`, `Shared(net10.0)`) 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. — foreign/csharp/Iggy_SDK/Errors/ErrorModel.cs:23
What to do
Hide `Apache.Iggy.IggyClient.Implementations` (`HttpMessageStream`, `HttpMessageStream`, `TcpMessageStream`, `TcpMessageStream`) (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 `Apache.Iggy.Contracts.Http.ErrorResponse` 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 `Apache.Iggy.Contracts.Http.ErrorResponse` 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 `Apache.Iggy.Errors.ErrorModel` 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 `Apache.Iggy.Errors.ErrorModel` 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.
Readiness · Readiness — Whether behaviour is captured as executable Gherkin specifications (a plus for shared understanding) — only assessed when a BDD framework is present.
Method: Filesystem scan: BDD framework presence (SpecFlow, Gherkin files) when a project references a BDD tool. Exhaustive, deterministic.
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.
`.github/dependabot.yml` schedules updates, but no `package-ecosystem` entry covers `composer`, `bundler`, which this tree depends on — so those dependencies get no update pull requests and no advisory pressure, however complete the dep-scan credit looks. Add the missing entries to the `updates:` list. — .github/dependabot.yml:23
What to do
Dependabot is configured but does not watch `composer`, `bundler` — add those `package-ecosystem` entries to .github/dependabot.yml so those dependencies get the same automatic update and advisory pressure as the ones it already covers.
Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
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.
Do you agree with this assessment?
P5 · DR & Backup6.0 / 10Adequate✓ 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.
Readiness · Readiness — Whether releases are traceable — a maintained changelog and explicit version stamping.
Method: Filesystem scan: changelog file presence and version tags in csproj or git tags. Exhaustive, deterministic.
No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)
What to do
Keep a changelog (e.g. Keep-a-Changelog) recording what shipped in each release.
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 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.
Only 0/435 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 ShutdownAsync()` 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)`. — foreign/csharp/Iggy_SDK/Consumers/IggyConsumer.cs:113
`await _initialization.WaitAsync(ct)` 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)`. — foreign/csharp/Iggy_SDK/Consumers/IggyConsumer.cs:135
`await _client.ConnectAsync(ct)` 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)`. — foreign/csharp/Iggy_SDK/Consumers/IggyConsumer.cs:144
`await _client.LoginUserAsync(_config.Login, _config.Password, ct)` 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)`. — foreign/csharp/Iggy_SDK/Consumers/IggyConsumer.cs:147
`await PrepareGroupAsync(ct)` 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)`. — foreign/csharp/Iggy_SDK/Consumers/IggyConsumer.cs:153
`await builder.BuildAsync(ct)` 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)`. — foreign/csharp/Iggy_SDK/Consumers/IggyConsumer.cs:171
`await NextBatchAsync(ct)` 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)`. (×3) — foreign/csharp/Iggy_SDK/Consumers/IggyConsumer.cs:189, foreign/csharp/Iggy_SDK/Consumers/IggyConsumer.cs:226, foreign/csharp/Iggy_SDK/Consumers/IggyConsumer.Rented.cs:38
`await handler(new ReceivedMessage { Message = message, CurrentOffset = message.Head...` 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)`. — foreign/csharp/Iggy_SDK/Consumers/IggyConsumer.cs:244
`await running.Task` 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)`. — foreign/csharp/Iggy_SDK/Consumers/IggyConsumer.cs:319
`await ShutdownOnceAsync(token)` 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)`. — foreign/csharp/Iggy_SDK/Consumers/IggyConsumer.cs:328
`await shutdown.Task` 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)`. — foreign/csharp/Iggy_SDK/Consumers/IggyConsumer.cs:336
`await _lifetime.CancelAsync()` 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) — foreign/csharp/Iggy_SDK/Consumers/IggyConsumer.cs:349, foreign/csharp/Iggy_SDK/Consumers/PartitionReader.cs:730
`await handling.Task` 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)`. — foreign/csharp/Iggy_SDK/Consumers/IggyConsumer.cs:353
`await reader.CloseAsync(token)` 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)`. — foreign/csharp/Iggy_SDK/Consumers/IggyConsumer.cs:362
`await _client.LogoutUserAsync()` 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)`. — foreign/csharp/Iggy_SDK/Consumers/IggyConsumer.cs:376
`await Reader.NextAsync(cancellation.Token)` 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)`. — foreign/csharp/Iggy_SDK/Consumers/IggyConsumer.cs:430
`await _client.GetConsumerGroupByIdAsync(_config.StreamId, _config.TopicId, group, ct)` 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)`. — foreign/csharp/Iggy_SDK/Consumers/IggyConsumer.cs:497
`await _client.CreateConsumerGroupAsync(_config.StreamId, _config.TopicId, name, ct)` 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)`. — foreign/csharp/Iggy_SDK/Consumers/IggyConsumer.cs:506
`await PartitionReader.AbandonLostAsync(_client, _logger, error)` 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)`. — foreign/csharp/Iggy_SDK/Consumers/IggyConsumer.cs:515
`await foreach (… in ReceiveAsync(ct))` 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)`. — foreign/csharp/Iggy_SDK/Consumers/IggyConsumerOfT.cs:59
`await CloseAsync()` 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)`. — foreign/csharp/Iggy_SDK/Consumers/PartitionReader.cs:278
`await arrival.WaitAsync(token)` 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)`. — foreign/csharp/Iggy_SDK/Consumers/PartitionReader.cs:325
`await NextAsync(token)` 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)`. — foreign/csharp/Iggy_SDK/Consumers/PartitionReader.cs:335
`await StoreAsync(owned, token, retry.Token)` 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)`. — foreign/csharp/Iggy_SDK/Consumers/PartitionReader.cs:399
`await AbandonLostAsync(error)` 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) — foreign/csharp/Iggy_SDK/Consumers/PartitionReader.cs:404, foreign/csharp/Iggy_SDK/Consumers/PartitionReader.cs:565
`await seek.WaitAsync(token)` 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)`. — foreign/csharp/Iggy_SDK/Consumers/PartitionReader.cs:454
`await Task.WhenAll(earlier).WaitAsync(token)` 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)`. — foreign/csharp/Iggy_SDK/Consumers/PartitionReader.cs:475
`await SeekOnceAsync(partitionId, start, token)` 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)`. — foreign/csharp/Iggy_SDK/Consumers/PartitionReader.cs:476
`await _client.PollMessagesAsync(_settings.StreamId, _settings.TopicId, partitionId,...` 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)`. — foreign/csharp/Iggy_SDK/Consumers/PartitionReader.cs:502
`await reading.WaitAsync(token)` 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)`. — foreign/csharp/Iggy_SDK/Consumers/PartitionReader.cs:526
`await _client.GetOffsetAsync(_settings.Consumer, _settings.StreamId, _settings.Topi...` 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)`. — foreign/csharp/Iggy_SDK/Consumers/PartitionReader.cs:546
`await StoreAsync(partitionId, start.Value - 1, history, _lifetime.Token)` 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)`. — foreign/csharp/Iggy_SDK/Consumers/PartitionReader.cs:554
`await DeleteStoredAsync(partitionId, history, _lifetime.Token)` 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)`. — foreign/csharp/Iggy_SDK/Consumers/PartitionReader.cs:559
`await CloseOnceAsync(token)` 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)`. — foreign/csharp/Iggy_SDK/Consumers/PartitionReader.cs:707
`await closed` 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)`. — foreign/csharp/Iggy_SDK/Consumers/PartitionReader.cs:716
What to do
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.
Do you agree with this assessment?
R1 · Type Safety9.7 / 10Exemplary✓ Tool-verified
React / JS · Code Health — How much of the frontend is typed TypeScript vs untyped JavaScript.
Method: Frontend file inventory: the share of typed TypeScript vs untyped JavaScript across the source tree. Deterministic, exhaustive over frontend files.
React / JS · Code Health — The share of the scored frontend lines inside a near-exact copy-pasted block of substantial extent (the D4 clone algorithm over JS/TS tokens, D-386; each line once, 10 at none and 0 at a quarter of the lines, as D4): a block is reported only where its copies still agree on most of their own identifiers and literals, or were renamed as they were pasted but kept most of their constants, and where the copies carry enough code to stand on their own or the copied extent reaches 30 lines — so a re-implementation sharing neither names nor values, and a small pasted declaration, are both found and deliberately not reported, and a clean R10 is not a claim that nothing was copied.
Method: Near-exact copy-pasted blocks of substantial extent across the frontend (the D4 clone algorithm run over JS/TS tokens). Masking finds the candidates; a block is reported when its copies still agree on most of their own identifiers and literals, or when a renamed copy still agrees on most of its constants, AND the copies carry enough code to stand on their own — or when the copied extent reaches 30 lines. So a re-implementation sharing neither names nor values, and a small pasted declaration, are deliberately not counted. Scored on the share of the scored frontend lines inside a reported copy, on the same curve as D4. Deterministic.
19 duplicated blocks under foreign/node/src/wire/ have copies in at least two of the sibling directories client, cluster, consumer-group, message, partition, session (+5 more sibling(s) not listed) — 12 of them are reported below, and 7 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 19 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 19 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 19 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — foreign/node/src/wire/client/get-clients.command.ts:23
web/src/lib/components/Modals/AddPartitionsModal.svelte:49 · web/src/lib/components/Modals/DeletePartitionsModal.svelte:65 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — web/src/lib/components/Modals/AddPartitionsModal.svelte:49
web/src/lib/components/Modals/AddTopicModal.svelte:72 · web/src/lib/components/Modals/AddUserModal.svelte:67 · web/src/lib/components/Modals/StreamSettingsModal.svelte:73 — the 3 copies are spread across 3 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — web/src/lib/components/Modals/AddTopicModal.svelte:72
web/src/lib/components/Modals/EditUserModal.svelte:50 · web/src/lib/components/Modals/StreamSettingsModal.svelte:58 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — web/src/lib/components/Modals/EditUserModal.svelte:50
web/src/lib/components/Modals/AddStreamModal.svelte:74 · web/src/lib/components/Modals/EditUserModal.svelte:65 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — web/src/lib/components/Modals/AddStreamModal.svelte:74
web/src/lib/components/Modals/AddTopicModal.svelte:72 · web/src/lib/components/Modals/StreamSettingsModal.svelte:73 · web/src/lib/components/Modals/TopicSettingsModal.svelte:98 — the 3 copies are spread across 3 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — web/src/lib/components/Modals/AddTopicModal.svelte:72
web/src/lib/components/RouteComponents/Settings/UsersTab.svelte:46 · web/src/routes/dashboard/settings/users/+page.svelte:49 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — web/src/lib/components/RouteComponents/Settings/UsersTab.svelte:46
web/src/lib/components/SlimSortableList.svelte:24 · web/src/lib/components/SortableList.svelte:28 — the two spans are one implementation copied and then locally edited — 213 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — web/src/lib/components/SlimSortableList.svelte:24
foreign/node/src/debug-send.ts:93 · foreign/node/src/debug.ts:91 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — foreign/node/src/debug-send.ts:93
foreign/node/src/wire/topic/create-topic.command.ts:221 · foreign/node/src/wire/topic/update-topic.command.ts:114 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — foreign/node/src/wire/topic/create-topic.command.ts:221
foreign/node/src/wire/message/header.utils.ts:330 · foreign/node/src/wire/message/header.utils.ts:349 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — foreign/node/src/wire/message/header.utils.ts:330
foreign/node/src/wire/client/get-clients.command.ts:23 · foreign/node/src/wire/stream/get-streams.command.ts:27 — the 2 copies are spread across 2 files, and the CITED SPAN is a run of MODULE-LEVEL DECLARATIONS — bindings the module declares and exports — rather than statements with a call site. Do not read this as an extract-a-helper row: a call expression cannot stand where a declaration was, and putting one there would delete the names themselves, which are what the rest of the codebase imports. What actually repeats here is the INITIALISER — the same expression shape written once per binding. So give that expression one name (a small helper the initialisers call, or a shared base value they are each derived from) and keep every binding under the name it already has. Where the run is an enumeration — one binding per distinct thing, differing precisely in the thing each one names — the repetition IS the enumeration and collapsing it would delete entries; consider instead whether the set belongs in one exported table the individual names are read out of. Reported because the copies drift apart the first time only one of them is edited. — foreign/node/src/wire/client/get-clients.command.ts:23
foreign/node/src/duration.utils.ts:175 · foreign/node/src/duration.utils.ts:258 — the two spans are one implementation copied and then locally edited — 81 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — foreign/node/src/duration.utils.ts:175
foreign/node/src/debug-send.ts:52 · foreign/node/src/debug.ts:49 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — foreign/node/src/debug-send.ts:52
foreign/node/src/wire/stream/get-stream.command.ts:27 · foreign/node/src/wire/user/get-user.command.ts:28 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — foreign/node/src/wire/stream/get-stream.command.ts:27
foreign/node/src/wire/topic/create-topic.command.ts:178 · foreign/node/src/wire/topic/create-topic.command.ts:225 · foreign/node/src/wire/topic/update-topic.command.ts:109 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — foreign/node/src/wire/topic/create-topic.command.ts:178
foreign/node/src/wire/user/permissions.utils.ts:291 · foreign/node/src/wire/user/permissions.utils.ts:349 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — foreign/node/src/wire/user/permissions.utils.ts:291
foreign/node/src/wire/vsr/register.ts:61 · foreign/node/src/wire/vsr/register.ts:81 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — foreign/node/src/wire/vsr/register.ts:61
web/src/lib/components/Modals/InspectMessage.svelte:52 · web/src/lib/components/Modals/InspectMessage.svelte:65 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — web/src/lib/components/Modals/InspectMessage.svelte:52
foreign/node/src/client/client.frame.ts:140 · foreign/node/src/client/client.frame.ts:158 — the two spans are one implementation copied and then locally edited — 78 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — foreign/node/src/client/client.frame.ts:140
foreign/node/src/wire/session/login-with-token.command.ts:37 · foreign/node/src/wire/session/login.command.ts:34 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — foreign/node/src/wire/session/login-with-token.command.ts:37
foreign/node/src/wire/stream/get-stream.command.ts:21 · foreign/node/src/wire/topic/get-topics.command.ts:21 · foreign/node/src/wire/user/get-user.command.ts:21 — the 3 copies are spread across 3 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — foreign/node/src/wire/stream/get-stream.command.ts:21
web/src/lib/api/clientApi.ts:35 · web/src/lib/api/fetchRouteApi.ts:28 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — web/src/lib/api/clientApi.ts:35
web/src/lib/auth/authStore.svelte.ts:58 · web/src/lib/auth/authStore.svelte.ts:75 — the two spans are one implementation copied and then locally edited — 65 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — web/src/lib/auth/authStore.svelte.ts:58
foreign/node/src/wire/number.utils.ts:26 · foreign/node/src/wire/number.utils.ts:50 · foreign/node/src/wire/number.utils.ts:74 · foreign/node/src/wire/number.utils.ts:98 · +1 more site(s) not listed — all 5 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — foreign/node/src/wire/number.utils.ts:26
foreign/node/src/wire/session/login.utils.ts:90 · foreign/node/src/wire/token/delete-token.command.ts:38 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — foreign/node/src/wire/session/login.utils.ts:90
foreign/node/src/wire/token/token.utils.ts:100 · foreign/node/src/wire/user/user.utils.ts:142 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — foreign/node/src/wire/token/token.utils.ts:100
foreign/node/src/debug-send.ts:68 · foreign/node/src/debug.ts:67 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — foreign/node/src/debug-send.ts:68
foreign/node/src/wire/client/client.utils.ts:31 · foreign/node/src/wire/user/user.utils.ts:69 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — foreign/node/src/wire/client/client.utils.ts:31
foreign/node/src/wire/consumer-group/get-group.command.ts:37 · foreign/node/src/wire/topic/get-topic.command.ts:45 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — foreign/node/src/wire/consumer-group/get-group.command.ts:37
web/src/lib/api/clientApi.ts:47 · web/src/lib/api/fetchApi.ts:37 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — web/src/lib/api/clientApi.ts:47
REDACTED:255 · REDACTED:263 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — REDACTED:255
foreign/node/src/stream/iggy-consumer.ts:97 · foreign/node/src/stream/iggy-consumer.ts:117 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — foreign/node/src/stream/iggy-consumer.ts:97
foreign/node/src/wire/cluster/cluster.utils.ts:56 · foreign/node/src/wire/cluster/cluster.utils.ts:131 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — foreign/node/src/wire/cluster/cluster.utils.ts:56
foreign/node/src/wire/session/login.utils.ts:54 · foreign/node/src/wire/user/create-user.command.ts:60 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — foreign/node/src/wire/session/login.utils.ts:54
foreign/node/src/wire/stream/stream.utils.ts:70 · foreign/node/src/wire/topic/topic.utils.ts:171 · foreign/node/src/wire/topic/topic.utils.ts:240 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — foreign/node/src/wire/stream/stream.utils.ts:70
foreign/node/src/wire/user/permissions.utils.ts:251 · foreign/node/src/wire/user/permissions.utils.ts:318 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — foreign/node/src/wire/user/permissions.utils.ts:251
foreign/node/src/bdd/metadata-changes.ts:169 · foreign/node/src/bdd/resource-options.ts:148 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — foreign/node/src/bdd/metadata-changes.ts:169
foreign/node/src/wire/cluster/cluster.utils.ts:72 · foreign/node/src/wire/cluster/cluster.utils.ts:137 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — foreign/node/src/wire/cluster/cluster.utils.ts:72
foreign/node/src/wire/message/iggy-header.utils.ts:87 · foreign/node/src/wire/message/iggy-header.utils.ts:157 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — foreign/node/src/wire/message/iggy-header.utils.ts:87
What to do
Act on each finding's own remediation rather than one rule: the move depends on what recurs. Where the copies are executable blocks, give the shared part one home and call it from each site; where they are declarations, a listing, a specialisation already delegating to its base, or one shape repeated per entity, there is no call site and the move is a shared type, a generated set or a factory — sometimes there is nothing to extract.
React / JS · Code Health — Per-function cyclomatic/cognitive complexity from the token-level function scanner (D-386) — real branching, not a regex heuristic.
Method: Per-function cyclomatic/cognitive complexity from a token-level function scanner (real branching, not a regex heuristic), computed over every frontend function. Deterministic.
drive has cyclomatic complexity 212 and cognitive complexity 338; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — foreign/node/src/client/client.socket.ts:371
(anonymous) has cyclomatic complexity 54 and cognitive complexity 60; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — foreign/node/src/stream/partition-reader.test.ts:764
answer has cyclomatic complexity 38 and cognitive complexity 61; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — foreign/node/src/stream/partition-reader.test.ts:326
(anonymous) has cyclomatic complexity 37 and cognitive complexity 63; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — foreign/node/src/client/client.socket.test.ts:3114
enter has cyclomatic complexity 31 and cognitive complexity 50; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — foreign/node/src/client/client.operation.ts:273
(anonymous) has cyclomatic complexity 29 and cognitive complexity 34; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — foreign/node/src/wire/system/update-resource.command.ts:123
fetch has cyclomatic complexity 28 and cognitive complexity 33; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — foreign/node/src/stream/partition-reader.test.ts:513
(anonymous) has cyclomatic complexity 27 and cognitive complexity 25; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — foreign/node/src/client/client.config.ts:38
(anonymous) has cyclomatic complexity 26 and cognitive complexity 26; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — foreign/node/src/wire/system/get-metadata-changes.command.ts:212
serialize has cyclomatic complexity 25 and cognitive complexity 29; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — foreign/node/src/wire/topic/create-topic.command.ts:135
(anonymous) has cyclomatic complexity 25 and cognitive complexity 24; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:59
routeFor has cyclomatic complexity 24 and cognitive complexity 41; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — foreign/node/src/client/client.socket.ts:921
(anonymous) has cyclomatic complexity 23 and cognitive complexity 32; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — foreign/node/src/wire/message/poll-messages.command.ts:220
exchange has cyclomatic complexity 23 and cognitive complexity 31; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — foreign/node/src/client/client.connection.ts:187
runReplica has cyclomatic complexity 21 and cognitive complexity 41; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — foreign/node/src/client/client.socket.ts:1171
(anonymous) has cyclomatic complexity 19 and cognitive complexity 21; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:158
readyLink has cyclomatic complexity 18 and cognitive complexity 26; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — foreign/node/src/client/client.socket.ts:1092
exchange has cyclomatic complexity 18 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — foreign/node/src/client/client.socket.ts:869
sendCommand has cyclomatic complexity 18 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — foreign/node/src/client/client.socket.ts:241
(anonymous) has cyclomatic complexity 17 and cognitive complexity 23; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — foreign/node/src/client/client.socket.test.ts:4590
(anonymous) has cyclomatic complexity 17 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — foreign/node/src/client/client.socket.test.ts:3642
(anonymous) has cyclomatic complexity 17 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — foreign/node/src/client/client.socket.ts:1693
(anonymous) has cyclomatic complexity 16 and cognitive complexity 36; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — foreign/node/src/client/client.socket.ts:1269
installRoster has cyclomatic complexity 16 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — foreign/node/src/client/client.socket.ts:1127
(anonymous) has cyclomatic complexity 16 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — foreign/node/src/client/client.socket.test.ts:3601
parse has cyclomatic complexity 15 and cognitive complexity 29; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — foreign/node/src/duration.utils.ts:159
rememberRoute has cyclomatic complexity 15 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — foreign/node/src/client/client.socket.ts:1008
scanRecentMetadataChanges has cyclomatic complexity 14 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — web/src/lib/api/metadataChanges.ts:177
onUpdate has cyclomatic complexity 14 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. (×2) — web/src/lib/components/Modals/AddPartitionsModal.svelte:49, web/src/lib/components/Modals/DeletePartitionsModal.svelte:65
(anonymous) has cyclomatic complexity 14 and cognitive complexity 18; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — foreign/node/src/client/client.socket.test.ts:6758
_rememberCredentials has cyclomatic complexity 14 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — foreign/node/src/client/client.socket.ts:1463
encode has cyclomatic complexity 14 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — foreign/node/src/wire/vsr/index.ts:90
onUpdate has cyclomatic complexity 14 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — web/src/lib/components/Modals/TopicSettingsModal.svelte:75
(anonymous) has cyclomatic complexity 14 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — foreign/node/src/client/client.socket.test.ts:1475
(anonymous) has cyclomatic complexity 13 and cognitive complexity 18; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. (×2) — foreign/node/src/client/client.socket.test.ts:750, foreign/node/src/client/client.socket.test.ts:5912
onUpdate has cyclomatic complexity 13 and cognitive complexity 18; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — web/src/lib/components/Modals/StreamSettingsModal.svelte:63
followStream has cyclomatic complexity 12 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — foreign/node/src/e2e/metadata-changes.suite.ts:73
onData has cyclomatic complexity 12 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — foreign/node/src/client/client.connection.ts:280
Do you agree with this assessment?
R3 · Large Files8.9 / 10Exemplary✓ Tool-verified
React / JS · Code Health — How many source files exceed the large-file threshold.
Method: Components/modules exceeding the large-file threshold, counted exhaustively across the frontend source tree. Deterministic.
foreign/node/src/client/client.socket.ts has 1820 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — foreign/node/src/client/client.socket.ts:1
foreign/node/src/stream/partition-reader.ts has 1809 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — foreign/node/src/stream/partition-reader.ts:1
foreign/node/src/wire/system/metadata-changes.utils.ts has 1041 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — foreign/node/src/wire/system/metadata-changes.utils.ts:1
web/src/routes/dashboard/changes/+page.svelte has 537 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — web/src/routes/dashboard/changes/+page.svelte:1
foreign/node/src/wire/message/header.utils.ts has 530 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — foreign/node/src/wire/message/header.utils.ts:1
foreign/node/src/client/client.operation.ts has 526 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — foreign/node/src/client/client.operation.ts:1
foreign/node/src/wire/message/poll-messages.command.ts has 438 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — foreign/node/src/wire/message/poll-messages.command.ts:1
web/src/lib/components/PermissionsManager.svelte has 428 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — web/src/lib/components/PermissionsManager.svelte:1
What to do
Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
Do you agree with this assessment?
R4 · Test Coverage4.7 / 10Adequate✓ Tool-verified
React / JS · Readiness — Static test reachability (D-386): the share of production files reachable from any test via the import graph — measured without running anything.
Method: Static test reachability: the share of production files reachable from any test via the import graph — measured without running anything. Deterministic.
No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one. (×40) — web/src/lib/components/PermissionsManager.svelte:1, REDACTED:1, web/src/routes/dashboard/changes/+page.svelte:1, …
What to do
Add tests that import the unreached modules (directly or through their public entry).
React / JS · Readiness — How outdated the npm dependencies are (a maturity signal). JS/npm CVEs are scored separately in D30 (JS/npm Dependency Vulnerabilities).
Method: npm dependency staleness from manifest/registry metadata (a maturity signal; JS/npm CVEs are scored separately in D30, which answers dependency vulnerabilities for every ecosystem). Deterministic.
Do you agree with this assessment?
R6 · Tooling10.0 / 10Exemplary✓ Tool-verified
React / JS · Readiness — Whether the project wires up test, lint and typecheck — detected from each package.json script's COMMAND (eslint / tsc / vitest / jest / playwright), not just its name, and corroborated against CI-workflow invocations so a tool run only in CI still counts.
Method: package.json scanned for test/lint/typecheck script wiring. Deterministic presence check.
Do you agree with this assessment?
R7 · Dead Code8.4 / 10Strong✓ Tool-verified
React / JS · Code Health — Files unreachable from every application/tooling/test entry point, and exports nothing imports (module-graph reachability, D-386).
Method: Dead code: files unreachable from every application/tooling/test entry point plus exports nothing imports, via module-graph reachability. Deterministic, exhaustive over the import graph.
Unreachable from the 40 application, 10 tooling and 91 test entry point(s) detected in this repo. Gate removals on `npm run build` — an undetected custom entry would make these reachable.
no import path from any entry point (40 application, 10 tooling, 91 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make (×19) — web/src/lib/utils/addOnKeyDownListener.ts, foreign/node/src/debug-send.ts, foreign/node/src/debug.ts, …
no import path from any entry point (40 application, 10 tooling, 91 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (web/src/lib/components/RouteComponents/Settings/UsersTabActions.svelte) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — web/src/lib/components/RouteComponents/Settings/UsersTab.svelte
Nothing imports this binding — it is safe to review for removal. (×12) — foreign/node/src/client/client.ts:72, foreign/node/src/tcp.sm.utils.ts:80, foreign/node/src/wire/message/iggy-header.utils.ts:198, …
Nothing ultimately consumes this binding: its only referrer is the re-export in foreign/node/src/wire/cluster/index.ts, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in foreign/node/src/wire/cluster/index.ts in the same commit, or the barrel will import a name that no longer exists. — foreign/node/src/wire/cluster/cluster.type.ts:84
Nothing ultimately consumes this binding: its only referrer is the re-export in foreign/node/src/wire/message/index.ts, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in foreign/node/src/wire/message/index.ts in the same commit, or the barrel will import a name that no longer exists. (×4) — foreign/node/src/wire/message/poll-messages.command.ts:319, foreign/node/src/wire/message/poll.utils.ts:53, foreign/node/src/wire/message/poll.utils.ts:211, …
Nothing ultimately consumes this binding: its only referrer is the re-export in foreign/node/src/wire/system/index.ts, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in foreign/node/src/wire/system/index.ts in the same commit, or the barrel will import a name that no longer exists. — foreign/node/src/wire/system/snapshot.command.ts:55
What to do
Delete the dead files and unused exports — every line is maintenance cost and rebuild-estimate inflation with zero runtime value.
React / JS · Readiness — npm dependency truthfulness (D-386): unused dependencies, imports not declared anywhere, and type-/test-only packages shipped as production deps.
Method: npm dependency truthfulness: unused dependencies, imports declared nowhere, and type-/test-only packages shipped as production deps — from the manifest + import graph. Deterministic.
Declared in the root package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Declared in foreign/node/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Declared in web/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it. (×4)
What to do
Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.
React / JS · Architecture — Import cycles in the module graph (D-386) — files that can only be understood and changed together.
Method: Import cycles in the module graph, detected exhaustively over JS/TS imports (the same cycle detection as the .NET coupling dimension). Deterministic.
Other · Code Health — Whether 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 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.
~0.5 `!` suppressions per 1k syntax nodes — 64 suppression(s) across the 128619 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
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 — 3 check(s) recorded observations but carry no score
These checks ran and found something, but they do not carry a score — either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.
P12 CI test-gate honesty — 1 observation(s) recorded · 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.
X10 Duplicated predicate — 40 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X7 Silent fallback defaults — 11 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not included — 66 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 user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
AC2 Forms & labels — No user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
AC3 Page structure — No user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
AC4 Keyboard semantics — No user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
AC5 ARIA correctness — No user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
AC6 Visual & motion safety — No user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
AX1 Captive dependencies — no DI registrations detected
AX2 Stateful singletons — no singleton implementations detected
AX6 Interface segregation — AX6 reached only 14% of this repository's production lines — rust (611,058 lines), go (21,092 lines), swift (18,843 lines), cpp (8,751 lines), python (2,780 lines), php (335 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
AX7 Slice cohesion — not applicable — not a vertical-slice architecture
AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
AXR1 Runtime accessibility — compose up failed (exit 15 — the compose project is invalid) — error while interpolating services.iggy-server.environment.[]: required variable IGGY_ROOT_PASSWORD is missing a value: set IGGY_ROOT_PASSWORD; runtime evidence skipped This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
C1 Data Protection — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
C2 Access Controls — No access-control surface detected in the analyzed source — no web/app surface to authorize (no HTTP API or web-UI project) and no authorization code at all (no [Authorize]/policies, no imperative guard methods). Access control is therefore N/A here — this is a library/CLI, which is authorized by its CALLER, not by itself. If this codebase grows request handlers, the dimension reactivates and a default-deny posture is expected then.
C3 Audit Trail — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
C4 Data Retention — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
C5 Data-Subject Rights — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
D11 Test Reliability — Test reliability not scored — polyglot repository, one half's runner produced no measurement
D18 Solution Shape — D18 scores the shape of a C#/VB .NET solution, but this repository's production source is mostly .cpp, .go, .java, .php, .py, .rs, .swift, .ts, which the C#/VB workspace does not load — the projects that loaded are an immaterial minority, so solution shape was not assessed for this repository. Not scored — this is a gap in the analyzer's reach, not a verdict about this repository.
D20 ADR Quality — N/A — ADRs are expected on deployable products with a user-facing host, not consumed libraries; no ADR log is required here.
D21 Naming Consistency — Naming consistency does not read PHP yet; not measured.
D23 Boundary Type-Coupling — Cross-context type coupling was not assessed: no type reached this dimension's context map.
D25 ADR Conformance — no ADRs to check
D27 Navigability — D27 counts a call into the standard library or a dependency as unresolved for this repository's language (.rs), so too few call sites counted as resolved to assess navigability. Not scored: this is a gap in the analyzer, not a verdict about this repository.
D32 Data Compliance (PII/GDPR) — 28 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
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 — .NET suite
DM1 Domain Modelling — applicable but not scored (4 signals for this style, 2 needed — the count is met but a required primary signal is absent): 5 aggregate root(s) (types guarding their own state behind command methods — this language has no AggregateRoot base to inherit); 501 value object(s); 3 domain event(s); its domain events are published by services or handlers — no domain entity raises one; a Domain/Aggregates/ValueObjects layer; a top-level examples/ tree: a library or framework whose examples are its consumers — these types are building blocks, not a domain
ED2 Event/command shape — not scored — deciding whether a command has more than one competing handler requires resolving the call graph, and this analysis resolves a call's owner only where the receiver's type is written down in the source. Reported as guidance rather than measured
ED2 Event/command shape — not scored — deciding whether a command has more than one competing handler requires resolving the call graph, and a call made through an inferred or generic receiver has no resolvable owner in the source. Reported as guidance rather than measured
ED5 Idempotency — not scored — 2 of 2 retry-prone mutations could not be classified (no visible guard and no positive evidence of a double-applied effect)
IC1 Incompleteness & stubs — IC1 reached only 4% of this repository's production lines — rust (611,058 lines), java (44,410 lines), typescript (32,329 lines), go (21,092 lines), swift (18,843 lines), cpp (8,751 lines), python (2,780 lines), javascript (678 lines), php (335 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
P2 Observability — This repo is a library, not a deployed service — it has no process to operate, so production observability (structured logging, tracing/metrics, health checks) is N/A. A library may log via an injected ILogger, but the absence of operational telemetry is not a defect here. If it grows a host (web API, worker), the dimension reactivates.
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
PF1 Benchmark discipline — Not applicable: no benchmark suite was found by the two searches this check runs — a BenchmarkDotNet package reference in any project file (loaded, or on disk), and a script whose name contains `benchmark` that this repository's CI runs. Neither can see a suite in another ecosystem's idiom, so this is not a verdict that the repository has none. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted, and nothing is asked of a repository that has none.
PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
R11 Import Boundaries — No recognizable feature-sliced/layered src layout — boundary rules not applicable.
S1 Web-Security Posture — No web surface detected in the analyzed source — no HTTP API or web-UI project (no controllers/minimal-API endpoints, no Razor/Blazor views) and no web middleware (HTTPS redirection, HSTS, security headers, cookies). Transport security, security headers, secure cookies, CSRF/input-validation and middleware-order controls are therefore N/A here — this is a library/CLI/worker, not a web app. Crypto hygiene was still checked and found nothing to flag. If this codebase becomes web-facing, the dimension reactivates automatically.
SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X1 Async correctness — X1 reached only 4% of this repository's production lines — rust (611,058 lines), java (44,410 lines), typescript (32,329 lines), go (21,092 lines), swift (18,843 lines), cpp (8,751 lines), python (2,780 lines), javascript (678 lines), php (335 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X12 Unreachable branch — X12 reached only 4% of this repository's production lines — rust (611,058 lines), java (44,410 lines), typescript (32,329 lines), go (21,092 lines), swift (18,843 lines), cpp (8,751 lines), python (2,780 lines), javascript (678 lines), php (335 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X13 Undrained process stream — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X14 Bypassable address classification — X14 reached only 4% of this repository's production lines — rust (611,058 lines), java (44,410 lines), typescript (32,329 lines), go (21,092 lines), swift (18,843 lines), cpp (8,751 lines), python (2,780 lines), javascript (678 lines), php (335 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X15 Unvalidated length from an untrusted reader — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X16 Unfloored truncation loop — X16 reached only 4% of this repository's production lines — rust (611,058 lines), java (44,410 lines), typescript (32,329 lines), go (21,092 lines), swift (18,843 lines), cpp (8,751 lines), python (2,780 lines), javascript (678 lines), php (335 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X17 Uncapped recursion over a caller-supplied document — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X18 Disposal-pattern correctness — X18 reached only 4% of this repository's production lines — rust (611,058 lines), java (44,410 lines), typescript (32,329 lines), go (21,092 lines), swift (18,843 lines), cpp (8,751 lines), python (2,780 lines), javascript (678 lines), php (335 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X19 Unrestored process-global state — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X2 Cancellation propagation — X2 reached only 4% of this repository's production lines — rust (611,058 lines), java (44,410 lines), typescript (32,329 lines), go (21,092 lines), swift (18,843 lines), cpp (8,751 lines), python (2,780 lines), javascript (678 lines), php (335 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X21 Side-effecting pattern guard — X21 reached only 4% of this repository's production lines — rust (611,058 lines), java (44,410 lines), typescript (32,329 lines), go (21,092 lines), swift (18,843 lines), cpp (8,751 lines), python (2,780 lines), javascript (678 lines), php (335 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X22 Contradicted release guard — X22 reached only 4% of this repository's production lines — rust (611,058 lines), java (44,410 lines), typescript (32,329 lines), go (21,092 lines), swift (18,843 lines), cpp (8,751 lines), python (2,780 lines), javascript (678 lines), php (335 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
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 — X24 reached only 9% of this repository's production lines — rust (611,058 lines), java (44,410 lines), go (21,092 lines), swift (18,843 lines), cpp (8,751 lines), python (2,780 lines), php (335 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X25 Inert configuration knob — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X26 Unsynchronised callback handoff — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X27 Collection changed while being enumerated — X27 reached only 4% of this repository's production lines — rust (611,058 lines), java (44,410 lines), typescript (32,329 lines), go (21,092 lines), swift (18,843 lines), cpp (8,751 lines), python (2,780 lines), javascript (678 lines), php (335 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X28 Index access outside its own emptiness guard — X28 reached only 4% of this repository's production lines — rust (611,058 lines), java (44,410 lines), typescript (32,329 lines), go (21,092 lines), swift (18,843 lines), cpp (8,751 lines), python (2,780 lines), javascript (678 lines), php (335 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X29 Per-element action decided by a fixed element — X29 reached only 4% of this repository's production lines — rust (611,058 lines), java (44,410 lines), typescript (32,329 lines), go (21,092 lines), swift (18,843 lines), cpp (8,751 lines), python (2,780 lines), javascript (678 lines), php (335 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X3 Exception handling — X3 reached only 4% of this repository's production lines — rust (611,058 lines), java (44,410 lines), typescript (32,329 lines), go (21,092 lines), swift (18,843 lines), cpp (8,751 lines), python (2,780 lines), javascript (678 lines), php (335 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X30 Support guard that admits what it rejects — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X32 Type resolved by simple name across every loaded assembly — 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 — X4 reached only 4% of this repository's production lines — rust (611,058 lines), java (44,410 lines), typescript (32,329 lines), go (21,092 lines), swift (18,843 lines), cpp (8,751 lines), python (2,780 lines), javascript (678 lines), php (335 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
Appendix A — Findings (grouped)
The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.
EmptyCatchBlock foreign/csharp/Iggy_SDK/Consumers/IggyConsumer.cs:508— 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 foreign/csharp/Iggy_SDK/Consumers/PartitionReader.cs:1090— 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 foreign/csharp/Iggy_SDK/Consumers/PartitionReader.cs:2740— 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 foreign/csharp/Iggy_SDK/IggyClient/Implementations/TcpMessageStream.Vsr.cs:222— 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.
Namespace dependency cycle foreign/csharp/Iggy_SDK/Contracts/Auth/Permissions.cs:23— The namespaces Apache.Iggy.Contracts ↔ Apache.Iggy.Contracts.Auth ↔ Apache.Iggy.Contracts.Http ↔ Apache.Iggy.Exceptions ↔ Apache.Iggy.JsonConverters ↔ Apache.Iggy.Kinds ↔ Apache.Iggy.Vsr depend on each other. The lightest dependency in the cycle is Apache.Iggy.Contracts.Auth → Apache.Iggy.Contracts (Apache.Iggy.Contracts.Auth.Permissions → Apache.Iggy.Contracts.StreamPermissions, 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.
AX9 · CQS / query purity· Query writes persistent state on the read path · ×1
Query writes persistent state on the read path: BenchmarkCache.load core/bench/dashboard/server/src/cache/mod.rs:28— `BenchmarkCache.load` is a read-named query yet it performs a durable write on the read path (a persist to a store/repository). A query must stay side-effect-free so reads are safe to retry, cache, and route to a read replica; move the write into a command.
WriteOnlyPrivateField foreign/csharp/Iggy_SDK_Tests/VsrTests/PrimaryPollingTests.cs:50— private TimeSpan PromptLimit — 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.
FileTooLong: src/iggy_partition.rs core/partitions/src/iggy_partition.rs— FileTooLong — 10105 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 9605 over it, 20.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: src/lib.rs core/shard/src/lib.rs— FileTooLong — 8571 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 76% of them inside a single declaration: IggyShard (3 blocks, 1863-13374), declaring 69 free functions. The bar is 500 significant lines; this is 8071 over it, 17.14× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: src/state_transfer.rs core/partitions/src/state_transfer.rs— FileTooLong — 3680 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 35 free functions. The bar is 500 significant lines; this is 3180 over it, 7.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: impls/metadata.rs core/metadata/src/impls/metadata.rs— FileTooLong — 3296 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 2796 over it, 6.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: src/impls.rs core/consensus/src/impls.rs— FileTooLong — 3075 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 76% of them inside a single declaration: VsrConsensus (5 blocks, 464-6318). The bar is 500 significant lines; this is 2575 over it, 6.15× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: stm/stream.rs core/metadata/src/stm/stream.rs— FileTooLong — 2694 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 2194 over it, 5.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: src/segment_recovery.rs core/partitions/src/segment_recovery.rs— FileTooLong — 1955 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 34 free functions. The bar is 500 significant lines; this is 1455 over it, 3.91× 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: reader/worker.rs core/sdk/src/clients/reader/worker.rs— FileTooLong — 1936 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 90% of them inside a single declaration: Worker (3 blocks, 185-2804). The bar is 500 significant lines; this is 1436 over it, 3.87× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: consensus/header.rs core/binary_protocol/src/consensus/header.rs— FileTooLong — 1825 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 1325 over it, 3.65× 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: poll/deferred.rs core/shard/src/poll/deferred.rs— FileTooLong — 1693 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 61% of them inside a single declaration: IggyShard (2 blocks, 1121-2622). The bar is 500 significant lines; this is 1193 over it, 3.39× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: http/handlers.rs core/server/src/http/handlers.rs— FileTooLong — 1595 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 59 free functions. The bar is 500 significant lines; this is 1095 over it, 3.19× 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: handlers/fetch.rs gateways/kafka/src/protocol/handlers/fetch.rs— FileTooLong — 1555 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 53 free functions. The bar is 500 significant lines; this is 1055 over it, 3.11× 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: Consumer/PartitionReader.swift foreign/swift/Sources/Iggy/Consumer/PartitionReader.swift— FileTooLong — 1545 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1045 over it, 3.09× 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: src/persistence.rs core/partitions/src/persistence.rs— FileTooLong — 1520 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 1020 over it, 3.04× 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: group/state.rs gateways/kafka/src/group/state.rs— FileTooLong — 1510 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 51 free functions. The bar is 500 significant lines; this is 1010 over it, 3.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: src/client.rs foreign/cpp/src/client.rs— FileTooLong — 1444 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 82% of them inside a single declaration: Client (2 blocks, 139-1730). The bar is 500 significant lines; this is 944 over it, 2.89× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: src/type_conversion.rs foreign/cpp/src/type_conversion.rs— FileTooLong — 1419 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 919 over it, 2.84× 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: reader/reader.go foreign/go/client/reader/reader.go— FileTooLong — 1406 significant lines (blank, comment-only and punctuation-only lines excluded), about 85% of them inside a single declaration: PartitionReader (66 blocks, 265-2354). The bar is 500 significant lines; this is 906 over it, 2.81× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: client/client.socket.ts foreign/node/src/client/client.socket.ts— FileTooLong — 1402 significant lines (blank, comment-only and punctuation-only lines excluded), about 77% of them inside a single declaration: CommandResponseStream (183-1632). The bar is 500 significant lines; this is 902 over it, 2.80× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: tcp/AsyncTcpConnection.java foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/tcp/AsyncTcpConnection.java— FileTooLong — 1391 significant lines (blank, comment-only and punctuation-only lines excluded), about 95% of them inside a single declaration: AsyncTcpConnection (93-2000). The bar is 500 significant lines; this is 891 over it, 2.78× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: src/partition_reconciler.rs core/server/src/partition_reconciler.rs— FileTooLong — 1374 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 41 free functions. The bar is 500 significant lines; this is 874 over it, 2.75× 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: tcp/PollRouter.java foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/tcp/PollRouter.java— FileTooLong — 1367 significant lines (blank, comment-only and punctuation-only lines excluded), about 96% of them inside a single declaration: PollRouter (81-1968). The bar is 500 significant lines; this is 867 over it, 2.73× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: src/client.rs foreign/python/src/client.rs— FileTooLong — 1360 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 81% of them inside a single declaration: IggyClient (2 blocks, 76-2412). The bar is 500 significant lines; this is 860 over it, 2.72× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: src/server.rs gateways/kafka/src/server.rs— FileTooLong — 1350 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 31 free functions. The bar is 500 significant lines; this is 850 over it, 2.70× 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: src/driver.rs core/sdk/src/driver.rs— FileTooLong — 1337 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 68% of them inside a single declaration: OperationDriver (2 blocks, 149-1495). The bar is 500 significant lines; this is 837 over it, 2.67× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
Hotspot: core/shard/src/lib.rs core/shard/src/lib.rs:9701— core/shard/src/lib.rs changed 77 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 111 in IggyShard::tick_partitions at line 9701. 35 of those changes were fix/bug commits, and the other 42 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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:06:10 +01:00' --until='2026-11-14 14:06:10 +01:00' --full-history --no-merges -- core/shard/src/lib.rs`: 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: core/partitions/src/iggy_partition.rs core/partitions/src/iggy_partition.rs:7778— core/partitions/src/iggy_partition.rs changed 73 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 90 in IggyPartition::admit_request at line 7778. 27 of those changes were fix/bug commits, and the other 46 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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:06:10 +01:00' --until='2026-11-14 14:06:10 +01:00' --full-history --no-merges -- core/partitions/src/iggy_partition.rs`: 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: foreign/node/src/client/client.socket.ts foreign/node/src/client/client.socket.ts:371— foreign/node/src/client/client.socket.ts changed 16 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 210 in CommandResponseStream.drive at line 371. 3 of those changes were fix/bug commits, and the other 13 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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:06:10 +01:00' --until='2026-11-14 14:06:10 +01:00' --full-history --no-merges -- foreign/node/src/client/client.socket.ts`: 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: core/metadata/src/impls/metadata.rs core/metadata/src/impls/metadata.rs:2589— core/metadata/src/impls/metadata.rs changed 45 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 43 in IggyMetadata::install_state_transfer at line 2589. 18 of those changes were fix/bug commits, and the other 27 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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:06:10 +01:00' --until='2026-11-14 14:06:10 +01:00' --full-history --no-merges -- core/metadata/src/impls/metadata.rs`: 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: foreign/csharp/Iggy_SDK/IggyClient/Implementations/TcpMessageStream.PollRouting.cs foreign/csharp/Iggy_SDK/IggyClient/Implementations/TcpMessageStream.PollRouting.cs:267— foreign/csharp/Iggy_SDK/IggyClient/Implementations/TcpMessageStream.PollRouting.cs changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 178 in TcpMessageStream.RunClientOperationAsync at line 267. 2 of those changes were fix/bug commits, and the other 8 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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:06:10 +01:00' --until='2026-11-14 14:06:10 +01:00' --full-history --no-merges -- foreign/csharp/Iggy_SDK/IggyClient/Implementations/TcpMessageStream.PollRouting.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: core/shard/src/router.rs core/shard/src/router.rs:875— core/shard/src/router.rs changed 34 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 45 in IggyShard::process_lifecycle at line 875. 9 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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:06:10 +01:00' --until='2026-11-14 14:06:10 +01:00' --full-history --no-merges -- core/shard/src/router.rs`: 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: core/partitions/src/state_transfer.rs core/partitions/src/state_transfer.rs:3689— core/partitions/src/state_transfer.rs changed 35 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 43 in IggyPartition::drive_install_io at line 3689. 10 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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:06:10 +01:00' --until='2026-11-14 14:06:10 +01:00' --full-history --no-merges -- core/partitions/src/state_transfer.rs`: 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: core/server/src/boot/mod.rs core/server/src/boot/mod.rs:537— core/server/src/boot/mod.rs changed 33 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 37 in server::boot::shard_main at line 537. 10 of those changes were fix/bug commits, and the other 23 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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:06:10 +01:00' --until='2026-11-14 14:06:10 +01:00' --full-history --no-merges -- core/server/src/boot/mod.rs`: 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: core/server/src/partition_helpers.rs core/server/src/partition_helpers.rs:183— core/server/src/partition_helpers.rs changed 34 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 31 in server::partition_helpers::load_partition_or_fence at line 183. 10 of those changes were fix/bug commits, and the other 24 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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:06:10 +01:00' --until='2026-11-14 14:06:10 +01:00' --full-history --no-merges -- core/server/src/partition_helpers.rs`: 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: core/server/src/partition_reconciler.rs core/server/src/partition_reconciler.rs:926— core/server/src/partition_reconciler.rs changed 43 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in server::partition_reconciler::reconcile_target at line 926. 15 of those changes were fix/bug commits, and the other 28 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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:06:10 +01:00' --until='2026-11-14 14:06:10 +01:00' --full-history --no-merges -- core/server/src/partition_reconciler.rs`: 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: core/configs/src/server_config/cluster.rs core/configs/src/server_config/cluster.rs:1049— core/configs/src/server_config/cluster.rs changed 16 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 53 in ClusterConfig::validate at line 1049. 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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:06:10 +01:00' --until='2026-11-14 14:06:10 +01:00' --full-history --no-merges -- core/configs/src/server_config/cluster.rs`: 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: core/consensus/src/impls.rs core/consensus/src/impls.rs:3369— core/consensus/src/impls.rs changed 35 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in VsrConsensus::tick_with_history_fence at line 3369. 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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:06:10 +01:00' --until='2026-11-14 14:06:10 +01:00' --full-history --no-merges -- core/consensus/src/impls.rs`: 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: foreign/go/client/tcp/tcp_driver.go foreign/go/client/tcp/tcp_driver.go:251— foreign/go/client/tcp/tcp_driver.go changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 156 in IggyTcpClient.driveOperation at line 251. 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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:06:10 +01:00' --until='2026-11-14 14:06:10 +01:00' --full-history --no-merges -- foreign/go/client/tcp/tcp_driver.go`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: core/server/src/dispatch/mod.rs core/server/src/dispatch/mod.rs:893— core/server/src/dispatch/mod.rs changed 26 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in server::dispatch::handle_client_request at line 893. 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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:06:10 +01:00' --until='2026-11-14 14:06:10 +01:00' --full-history --no-merges -- core/server/src/dispatch/mod.rs`: 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: core/simulator/src/replica.rs core/simulator/src/replica.rs:152— core/simulator/src/replica.rs changed 23 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in simulator::replica::new_shard at line 152. 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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:06:10 +01:00' --until='2026-11-14 14:06:10 +01:00' --full-history --no-merges -- core/simulator/src/replica.rs`: 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: core/metadata/src/stm/stream.rs core/metadata/src/stm/stream.rs:3845— core/metadata/src/stm/stream.rs changed 31 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in CreatePartitionsWithAssignmentsRequest::apply at line 3845. 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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:06:10 +01:00' --until='2026-11-14 14:06:10 +01:00' --full-history --no-merges -- core/metadata/src/stm/stream.rs`: 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: core/partitions/src/segment_recovery.rs core/partitions/src/segment_recovery.rs:722— core/partitions/src/segment_recovery.rs changed 21 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in partitions::segment_recovery::load_persisted_segments_with_checkpoint at line 722. 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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:06:10 +01:00' --until='2026-11-14 14:06:10 +01:00' --full-history --no-merges -- core/partitions/src/segment_recovery.rs`: 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: core/metadata/src/stm/authz.rs core/metadata/src/stm/authz.rs:249— core/metadata/src/stm/authz.rs changed 15 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 35 in metadata::stm::authz::authorize 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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:06:10 +01:00' --until='2026-11-14 14:06:10 +01:00' --full-history --no-merges -- core/metadata/src/stm/authz.rs`: 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: core/configs/src/server_config/validators.rs core/configs/src/server_config/validators.rs:51— core/configs/src/server_config/validators.rs changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 36 in ServerConfig::validate 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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:06:10 +01:00' --until='2026-11-14 14:06:10 +01:00' --full-history --no-merges -- core/configs/src/server_config/validators.rs`: 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: foreign/csharp/Iggy_SDK/IggyClient/Implementations/TcpMessageStream.Vsr.cs foreign/csharp/Iggy_SDK/IggyClient/Implementations/TcpMessageStream.Vsr.cs:179— foreign/csharp/Iggy_SDK/IggyClient/Implementations/TcpMessageStream.Vsr.cs changed 16 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 29 in TcpMessageStream.LoginRegisterCoreAsync at line 179. 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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:06:10 +01:00' --until='2026-11-14 14:06:10 +01:00' --full-history --no-merges -- foreign/csharp/Iggy_SDK/IggyClient/Implementations/TcpMessageStream.Vsr.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: core/server/src/dispatch/reads.rs core/server/src/dispatch/reads.rs:372— core/server/src/dispatch/reads.rs changed 17 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in server::dispatch::reads::handle_non_replicated_request at line 372. 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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:06:10 +01:00' --until='2026-11-14 14:06:10 +01:00' --full-history --no-merges -- core/server/src/dispatch/reads.rs`: 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: gateways/kafka/tools/kafka-tool/src/main.rs gateways/kafka/tools/kafka-tool/src/main.rs:256— gateways/kafka/tools/kafka-tool/src/main.rs changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 45 in kafka_message_gen::build_payload at line 256. 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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:06:10 +01:00' --until='2026-11-14 14:06:10 +01:00' --full-history --no-merges -- gateways/kafka/tools/kafka-tool/src/main.rs`: 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: core/server/src/dispatch/submit.rs core/server/src/dispatch/submit.rs:76— core/server/src/dispatch/submit.rs changed 15 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 29 in server::dispatch::submit::handle_metadata_submit at line 76. 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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:06:10 +01:00' --until='2026-11-14 14:06:10 +01:00' --full-history --no-merges -- core/server/src/dispatch/submit.rs`: 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: foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/tcp/AsyncTcpConnection.java foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/tcp/AsyncTcpConnection.java:1303— foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/tcp/AsyncTcpConnection.java changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 31 in AsyncTcpConnection.completeAttempt at line 1303. 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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:06:10 +01:00' --until='2026-11-14 14:06:10 +01:00' --full-history --no-merges -- foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/tcp/AsyncTcpConnection.java`: 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: core/shard/src/partition_io.rs core/shard/src/partition_io.rs:643— core/shard/src/partition_io.rs changed 16 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in IggyShard::service_partition_io at line 643. 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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:06:10 +01:00' --until='2026-11-14 14:06:10 +01:00' --full-history --no-merges -- core/shard/src/partition_io.rs`: 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: IggyPartition core/partitions/src/iggy_partition.rs:134— TooManyMethods — 548 methods, declared across 5 files: src/iggy_partition.rs (463), src/state_transfer.rs (57), state_machine/partition.rs (16), src/segment_chain.rs (10), +1 more file(s). The bar is 30 methods; this is 518 over it, 18.27× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: IggyShard core/shard/src/lib.rs:1863— TooManyMethods — 277 methods, declared across 8 files: src/lib.rs (172), poll/deferred.rs (47), src/primary_rebalance.rs (16), src/segment_uploads.rs (15), +4 more file(s). The bar is 30 methods; this is 247 over it, 9.23× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: VsrConsensus core/consensus/src/impls.rs:1380— TooManyMethods — 215 methods, declared across 2 files: src/impls.rs (205), src/replication.rs (10). The bar is 30 methods; this is 185 over it, 7.17× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: TcpMessageStream foreign/csharp/Iggy_SDK/IggyClient/Implementations/TcpMessageStream.cs— TooManyMethods — 2168 significant lines (blank, comment-only and punctuation-only lines excluded), 175 methods, declared across 4 files: Implementations/TcpMessageStream.cs (101), Implementations/TcpMessageStream.PollRouting.cs (32), Implementations/TcpMessageStream.ReplicaLinks.cs (22), Implementations/TcpMessageStream.Vsr.cs (20). The bar is 30 methods; this is 145 over it, 5.83× 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: IggyTcpClient REDACTED:46— TooManyMethods — 123 methods, declared across 18 files: REDACTED (21), tcp/tcp_session_management.go (19), tcp/tcp_driver.go (13), tcp/tcp_consumer_group_management.go (9), +14 more file(s). The bar is 30 methods; this is 93 over it, 4.10× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: AsyncTcpConnection foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/tcp/AsyncTcpConnection.java:93— TooManyMethods — 98 methods. The bar is 30 methods; this is 68 over it, 3.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.
TooManyMethods: PartitionReader foreign/swift/Sources/Iggy/Consumer/PartitionReader.swift:186— TooManyMethods — 97 methods. The bar is 30 methods; this is 67 over it, 3.23× 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: IggyClient foreign/swift/Sources/Iggy/Client/IggyClient.swift:67— TooManyMethods — 95 methods, declared across 6 files: Client/IggyClient+Resources.swift (33), Client/IggyClient+Messages.swift (31), Client/IggyClient.swift (27), Consumer/IggyConsumer.swift (2), +2 more file(s). The bar is 30 methods; this is 65 over it, 3.17× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: PartitionReader foreign/csharp/Iggy_SDK/Consumers/PartitionReader.cs— TooManyMethods — 1255 significant lines (blank, comment-only and punctuation-only lines excluded), 91 methods. The bar is 30 methods; this is 61 over it, 3.03× 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: PartitionReader foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/reader/PartitionReader.java:133— TooManyMethods — 90 methods. The bar is 30 methods; this is 60 over it, 3.00× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: IggyBridge gateways/kafka/src/bridge/iggy_bridge/mod.rs:177— TooManyMethods — 84 methods, declared across 10 files: iggy_bridge/mod.rs (20), iggy_bridge/group_offsets.rs (18), iggy_bridge/topics.rs (16), iggy_bridge/produce.rs (7), +6 more file(s). The bar is 30 methods; this is 54 over it, 2.80× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: HttpMessageStream foreign/csharp/Iggy_SDK/IggyClient/Implementations/HttpMessageStream.cs— TooManyMethods — 687 significant lines (blank, comment-only and punctuation-only lines excluded), 83 methods. The bar is 30 methods; this is 53 over it, 2.77× 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: PollRouter foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/tcp/PollRouter.java:81— TooManyMethods — 83 methods. The bar is 30 methods; this is 53 over it, 2.77× 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: Worker core/sdk/src/clients/reader/worker.rs:185— TooManyMethods — 82 methods. The bar is 30 methods; this is 52 over it, 2.73× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: BinaryMapper foreign/csharp/Iggy_SDK/Mappers/BinaryMapper.cs— TooManyMethods — 1319 significant lines (blank, comment-only and punctuation-only lines excluded), 81 methods, declared across 2 files: Mappers/BinaryMapper.cs (51), Mappers/BinaryMapper.MetadataChanges.cs (30). The bar is 30 methods; this is 51 over it, 2.70× 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: Progress core/sdk/src/clients/reader/progress.rs:68— TooManyMethods — 79 methods. The bar is 30 methods; this is 49 over it, 2.63× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: PartitionPersistence core/partitions/src/persistence.rs:295— TooManyMethods — 78 methods. The bar is 30 methods; this is 48 over it, 2.60× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: IggyMetadata core/metadata/src/impls/metadata.rs:1174— TooManyMethods — 77 methods. The bar is 30 methods; this is 47 over it, 2.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: PartitionReader foreign/node/src/stream/partition-reader.ts:286— TooManyMethods — 77 methods. The bar is 30 methods; this is 47 over it, 2.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: AsyncIggyTcpClient foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/tcp/AsyncIggyTcpClient.java:150— TooManyMethods — 75 methods. The bar is 30 methods; this is 45 over it, 2.50× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: PartitionPrepareJournal core/journal/src/partition_journal.rs:155— TooManyMethods — 75 methods, declared across 2 files: src/partition_journal.rs (54), partition_journal/segments.rs (21). The bar is 30 methods; this is 45 over it, 2.50× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: ClientCore foreign/swift/Sources/Iggy/Client/ClientCore.swift:38— TooManyMethods — 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: PartitionReader foreign/go/client/reader/reader.go:315— TooManyMethods — 65 methods. The bar is 30 methods; this is 35 over it, 2.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.
TooManyMethods: TestHarness core/integration/src/harness/orchestrator/harness.rs:51— TooManyMethods — 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: ConsensusSession foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/tcp/vsr/ConsensusSession.java:55— TooManyMethods — 62 methods. The bar is 30 methods; this is 32 over it, 2.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
Dead code: MaxStackAllocBytes foreign/csharp/Iggy_SDK/Contracts/Tcp/TcpContracts.cs:40— Field MaxStackAllocBytes — Roslyn's SymbolFinder walked every project the solution loads, including Iggy_SDK(net8.0), 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: IoError foreign/csharp/Iggy_SDK/Errors/ErrorFactory.cs:98— Method IoError — Roslyn's SymbolFinder walked every project the solution loads, including Iggy_SDK(net8.0), 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: CannotCreateStreamDirectory foreign/csharp/Iggy_SDK/Errors/ErrorFactory.cs:103— Method CannotCreateStreamDirectory — Roslyn's SymbolFinder walked every project the solution loads, including Iggy_SDK(net8.0), 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: CannotCreateStreamInfo foreign/csharp/Iggy_SDK/Errors/ErrorFactory.cs:109— Method CannotCreateStreamInfo — Roslyn's SymbolFinder walked every project the solution loads, including Iggy_SDK(net8.0), 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: CannotUpdateStreamInfo foreign/csharp/Iggy_SDK/Errors/ErrorFactory.cs:115— Method CannotUpdateStreamInfo — Roslyn's SymbolFinder walked every project the solution loads, including Iggy_SDK(net8.0), 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: CannotOpenStreamInfo foreign/csharp/Iggy_SDK/Errors/ErrorFactory.cs:121— Method CannotOpenStreamInfo — Roslyn's SymbolFinder walked every project the solution loads, including Iggy_SDK(net8.0), 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: CannotReadStreamInfo foreign/csharp/Iggy_SDK/Errors/ErrorFactory.cs:127— Method CannotReadStreamInfo — Roslyn's SymbolFinder walked every project the solution loads, including Iggy_SDK(net8.0), 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: CannotCreateStream foreign/csharp/Iggy_SDK/Errors/ErrorFactory.cs:133— Method CannotCreateStream — Roslyn's SymbolFinder walked every project the solution loads, including Iggy_SDK(net8.0), 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: CannotDeleteStream foreign/csharp/Iggy_SDK/Errors/ErrorFactory.cs:138— Method CannotDeleteStream — Roslyn's SymbolFinder walked every project the solution loads, including Iggy_SDK(net8.0), 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: CannotDeleteStreamDirectory foreign/csharp/Iggy_SDK/Errors/ErrorFactory.cs:143— Method CannotDeleteStreamDirectory — Roslyn's SymbolFinder walked every project the solution loads, including Iggy_SDK(net8.0), 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: StreamNotFound foreign/csharp/Iggy_SDK/Errors/ErrorFactory.cs:149— Method StreamNotFound — Roslyn's SymbolFinder walked every project the solution loads, including Iggy_SDK(net8.0), 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: StreamAlreadyExists foreign/csharp/Iggy_SDK/Errors/ErrorFactory.cs:154— Method StreamAlreadyExists — Roslyn's SymbolFinder walked every project the solution loads, including Iggy_SDK(net8.0), 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: CannotCreateTopicsDirectory foreign/csharp/Iggy_SDK/Errors/ErrorFactory.cs:159— Method CannotCreateTopicsDirectory — Roslyn's SymbolFinder walked every project the solution loads, including Iggy_SDK(net8.0), 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: CannotCreateTopicDirectory foreign/csharp/Iggy_SDK/Errors/ErrorFactory.cs:165— Method CannotCreateTopicDirectory — Roslyn's SymbolFinder walked every project the solution loads, including Iggy_SDK(net8.0), 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: CannotCreateTopicInfo foreign/csharp/Iggy_SDK/Errors/ErrorFactory.cs:171— Method CannotCreateTopicInfo — Roslyn's SymbolFinder walked every project the solution loads, including Iggy_SDK(net8.0), 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: CannotUpdateTopicInfo foreign/csharp/Iggy_SDK/Errors/ErrorFactory.cs:177— Method CannotUpdateTopicInfo — Roslyn's SymbolFinder walked every project the solution loads, including Iggy_SDK(net8.0), 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: CannotOpenTopicInfo foreign/csharp/Iggy_SDK/Errors/ErrorFactory.cs:183— Method CannotOpenTopicInfo — Roslyn's SymbolFinder walked every project the solution loads, including Iggy_SDK(net8.0), 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: CannotReadTopicInfo foreign/csharp/Iggy_SDK/Errors/ErrorFactory.cs:189— Method CannotReadTopicInfo — Roslyn's SymbolFinder walked every project the solution loads, including Iggy_SDK(net8.0), 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: CannotCreateTopic foreign/csharp/Iggy_SDK/Errors/ErrorFactory.cs:195— Method CannotCreateTopic — Roslyn's SymbolFinder walked every project the solution loads, including Iggy_SDK(net8.0), 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: CannotDeleteTopic foreign/csharp/Iggy_SDK/Errors/ErrorFactory.cs:201— Method CannotDeleteTopic — Roslyn's SymbolFinder walked every project the solution loads, including Iggy_SDK(net8.0), 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: CannotDeleteTopicDirectory foreign/csharp/Iggy_SDK/Errors/ErrorFactory.cs:207— Method CannotDeleteTopicDirectory — Roslyn's SymbolFinder walked every project the solution loads, including Iggy_SDK(net8.0), 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: TopicNotFound foreign/csharp/Iggy_SDK/Errors/ErrorFactory.cs:213— Method TopicNotFound — Roslyn's SymbolFinder walked every project the solution loads, including Iggy_SDK(net8.0), 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: TopicAlreadyExists foreign/csharp/Iggy_SDK/Errors/ErrorFactory.cs:219— Method TopicAlreadyExists — Roslyn's SymbolFinder walked every project the solution loads, including Iggy_SDK(net8.0), 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: CannotCreatePartition foreign/csharp/Iggy_SDK/Errors/ErrorFactory.cs:225— Method CannotCreatePartition — Roslyn's SymbolFinder walked every project the solution loads, including Iggy_SDK(net8.0), 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: CannotCreatePartitionDirectory foreign/csharp/Iggy_SDK/Errors/ErrorFactory.cs:231— Method CannotCreatePartitionDirectory — Roslyn's SymbolFinder walked every project the solution loads, including Iggy_SDK(net8.0), 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.
ClassTooLong: IggyShard core/shard/src/lib.rs:1863— ClassTooLong — 6505 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 277 methods, 3 blocks, lines 1863-13374. The bar is 400 significant lines; this is 6105 over it, 16.26× 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: VsrConsensus core/consensus/src/impls.rs:1380— ClassTooLong — 2322 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 215 methods, 5 blocks, lines 464-6318. The bar is 400 significant lines; this is 1922 over it, 5.81× 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: Worker core/sdk/src/clients/reader/worker.rs:185— ClassTooLong — 1743 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 82 methods, 3 blocks, lines 185-2804. The bar is 400 significant lines; this is 1343 over it, 4.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: AsyncTcpConnection foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/tcp/AsyncTcpConnection.java:93— ClassTooLong — 1325 significant lines (blank, comment-only and punctuation-only lines excluded), 98 methods. The bar is 400 significant lines; this is 925 over it, 3.31× 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: PollRouter foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/tcp/PollRouter.java:81— ClassTooLong — 1314 significant lines (blank, comment-only and punctuation-only lines excluded), 83 methods. The bar is 400 significant lines; this is 914 over it, 3.29× 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: PartitionReader foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/reader/PartitionReader.java:133— ClassTooLong — 1214 significant lines (blank, comment-only and punctuation-only lines excluded), 90 methods. The bar is 400 significant lines; this is 814 over it, 3.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.
ClassTooLong: PartitionReader foreign/go/client/reader/reader.go:315— ClassTooLong — 1189 significant lines (blank, comment-only and punctuation-only lines excluded), 65 methods, 66 blocks, lines 265-2354. The bar is 400 significant lines; this is 789 over it, 2.97× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: Client foreign/cpp/src/client.rs:139— ClassTooLong — 1186 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 60 methods, 2 blocks, lines 139-1730. The bar is 400 significant lines; this is 786 over it, 2.97× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: IggyClient foreign/python/src/client.rs:76— ClassTooLong — 1096 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 54 methods, 2 blocks, lines 76-2412. The bar is 400 significant lines; this is 696 over it, 2.74× 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: Streams core/metadata/src/stm/stream.rs:984— ClassTooLong — 1089 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 62 methods, 2 blocks, lines 1531-4178. The bar is 400 significant lines; this is 689 over it, 2.72× 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: CommandResponseStream foreign/node/src/client/client.socket.ts:183— ClassTooLong — 1079 significant lines (blank, comment-only and punctuation-only lines excluded), 48 methods. The bar is 400 significant lines; this is 679 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.
ClassTooLong: Simulator core/simulator/src/lib.rs:221— ClassTooLong — 1065 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 59 methods, 2 blocks, lines 221-2114. The bar is 400 significant lines; this is 665 over it, 2.66× 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: PartitionPrepareJournal core/journal/src/partition_journal.rs:155— ClassTooLong — 1009 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 75 methods, 4 blocks, lines 155-1712. The bar is 400 significant lines; this is 609 over it, 2.52× 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: PartitionReader foreign/node/src/stream/partition-reader.ts:286— ClassTooLong — 957 significant lines (blank, comment-only and punctuation-only lines excluded), 77 methods. The bar is 400 significant lines; this is 557 over it, 2.39× 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: AsyncIggyTcpClient foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/tcp/AsyncIggyTcpClient.java:150— ClassTooLong — 948 significant lines (blank, comment-only and punctuation-only lines excluded), 75 methods. The bar is 400 significant lines; this is 548 over it, 2.37× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: OperationDriver core/sdk/src/driver.rs:149— ClassTooLong — 905 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 47 methods, 2 blocks, lines 149-1495. The bar is 400 significant lines; this is 505 over it, 2.26× 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: Coordination gateways/kafka/src/coordinator/mod.rs:238— ClassTooLong — 856 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 60 methods, 4 blocks, lines 238-1677. The bar is 400 significant lines; this is 456 over it, 2.14× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: ConsensusSession foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/tcp/vsr/ConsensusSession.java:55— ClassTooLong — 799 significant lines (blank, comment-only and punctuation-only lines excluded), 62 methods. The bar is 400 significant lines; this is 399 over it, 2.00× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: Progress core/sdk/src/clients/reader/progress.rs:68— ClassTooLong — 790 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 79 methods, 2 blocks, lines 68-1482. The bar is 400 significant lines; this is 390 over it, 1.98× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: PartitionJournal core/partitions/src/journal.rs:600— ClassTooLong — 790 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 62 methods, 6 blocks, lines 600-2075. The bar is 400 significant lines; this is 390 over it, 1.98× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: PollRouter foreign/swift/Sources/Iggy/Client/PollRouter.swift:40— ClassTooLong — 776 significant lines (blank, comment-only and punctuation-only lines excluded), 49 methods. The bar is 400 significant lines; this is 376 over it, 1.94× 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: ServerHandle core/integration/src/harness/handle/server.rs:87— ClassTooLong — 754 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 62 methods, 8 blocks, lines 87-1382. The bar is 400 significant lines; this is 354 over it, 1.89× 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: ClientTable core/consensus/src/client_table.rs:553— ClassTooLong — 735 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 38 methods, 3 blocks, lines 553-1822. The bar is 400 significant lines; this is 335 over it, 1.84× 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: SimClient core/simulator/src/client.rs:102— ClassTooLong — 678 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 56 methods, 2 blocks, lines 102-1221. The bar is 400 significant lines; this is 278 over it, 1.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.
ClassTooLong: ShardMetrics core/shard/src/metrics.rs:335— ClassTooLong — 671 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 47 methods, 2 blocks, lines 335-1511. The bar is 400 significant lines; this is 271 over it, 1.68× 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.
MethodTooLong: TcpMessageStream.RunClientOperationAsync foreign/csharp/Iggy_SDK/IggyClient/Implementations/TcpMessageStream.PollRouting.cs:267— MethodTooLong — RunClientOperationAsync runs 334 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 234 over it, 3.34× 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: CommandResponseStream.drive foreign/node/src/client/client.socket.ts:371— MethodTooLong — drive runs 287 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 187 over it, 2.87× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: IggyErrorCode.name foreign/swift/Sources/Iggy/Errors/IggyErrorCode.swift:299— MethodTooLong — name runs 270 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 170 over it, 2.70× 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: ClusterConfig.validate core/configs/src/server_config/cluster.rs:1049— MethodTooLong — validate runs 264 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 164 over it, 2.64× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: IggyTcpClient.driveOperation foreign/go/client/tcp/tcp_driver.go:251— MethodTooLong — driveOperation runs 259 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 159 over it, 2.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: ServerConfig.validate core/configs/src/server_config/validators.rs:51— MethodTooLong — validate runs 223 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 123 over it, 2.23× 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: IggyMetadata.install_state_transfer core/metadata/src/impls/metadata.rs:2589— MethodTooLong — install_state_transfer runs 222 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 122 over it, 2.22× 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: ShardMetrics.register core/shard/src/metrics.rs:1235— MethodTooLong — register runs 213 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 113 over it, 2.13× 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: IggyShard.tick_primary_rebalance core/shard/src/primary_rebalance.rs:436— MethodTooLong — tick_primary_rebalance runs 200 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 100 over it, 2.00× 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: IggyShard.serve_partition_chunk core/shard/src/lib.rs:11022— MethodTooLong — serve_partition_chunk runs 196 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 96 over it, 1.96× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: IggyShard.on_partition_transfer_progress core/shard/src/lib.rs:12268— MethodTooLong — on_partition_transfer_progress runs 182 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 82 over it, 1.82× 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: IggyShard.on_partition_read core/shard/src/poll.rs:165— MethodTooLong — on_partition_read runs 182 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 82 over it, 1.82× 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: Worker.complete_fetch core/sdk/src/clients/reader/worker.rs:1626— MethodTooLong — complete_fetch runs 174 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 74 over it, 1.74× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Projection.project core/metadata/src/change_log/current.rs:179— MethodTooLong — project runs 172 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 72 over it, 1.72× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Simulator.build_inner core/simulator/src/lib.rs:399— MethodTooLong — build_inner runs 166 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 66 over it, 1.66× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: IggyMetadata.prepare_request core/metadata/src/impls/metadata.rs:5075— MethodTooLong — prepare_request runs 165 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 65 over it, 1.65× 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: PartitionRecoveryRefusal.fmt core/partitions/src/segment_recovery.rs:320— MethodTooLong — fmt runs 159 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) 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: IggyShard.serve_partition_transfer_request core/shard/src/lib.rs:10770— MethodTooLong — serve_partition_transfer_request runs 156 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 56 over it, 1.56× 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: PartitionPrepareJournal.rewrite core/journal/src/partition_journal.rs:1517— MethodTooLong — rewrite runs 155 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 55 over it, 1.55× 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: IggyShard.on_primary_rebalance core/shard/src/primary_rebalance.rs:805— MethodTooLong — on_primary_rebalance runs 146 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) 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: IggyTcpClient.drive foreign/go/client/tcp/tcp_driver.go:37— MethodTooLong — drive 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.
MethodTooLong: IggyShard.on_partition_state_transfer_target core/shard/src/lib.rs:11973— MethodTooLong — on_partition_state_transfer_target runs 141 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 41 over it, 1.41× 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: GetStatsCmd.execute_cmd core/cli/src/commands/binary_system/stats.rs:63— MethodTooLong — execute_cmd runs 140 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 40 over it, 1.40× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Workload.on_reply core/simulator/src/workload/mod.rs:662— MethodTooLong — on_reply runs 140 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 40 over it, 1.40× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: StreamsSnapshot.validate_ownership_history core/metadata/src/stm/lifecycle.rs:631— MethodTooLong — validate_ownership_history runs 139 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 39 over it, 1.39× 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.
Awaits without ConfigureAwait(false) — Only 0/435 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) foreign/csharp/Iggy_SDK/Consumers/IggyConsumer.cs:113— `await ShutdownAsync()` 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) foreign/csharp/Iggy_SDK/Consumers/IggyConsumer.cs:135— `await _initialization.WaitAsync(ct)` 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) foreign/csharp/Iggy_SDK/Consumers/IggyConsumer.cs:144— `await _client.ConnectAsync(ct)` 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) foreign/csharp/Iggy_SDK/Consumers/IggyConsumer.cs:147— `await _client.LoginUserAsync(_config.Login, _config.Password, ct)` 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) foreign/csharp/Iggy_SDK/Consumers/IggyConsumer.cs:153— `await PrepareGroupAsync(ct)` 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) foreign/csharp/Iggy_SDK/Consumers/IggyConsumer.cs:171— `await builder.BuildAsync(ct)` 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) foreign/csharp/Iggy_SDK/Consumers/IggyConsumer.cs:189— `await NextBatchAsync(ct)` 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) foreign/csharp/Iggy_SDK/Consumers/IggyConsumer.cs:226— `await NextBatchAsync(ct)` 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) foreign/csharp/Iggy_SDK/Consumers/IggyConsumer.cs:244— `await handler(new ReceivedMessage { Message = message, CurrentOffset = message.Head...` 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) foreign/csharp/Iggy_SDK/Consumers/IggyConsumer.cs:319— `await running.Task` 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) foreign/csharp/Iggy_SDK/Consumers/IggyConsumer.cs:328— `await ShutdownOnceAsync(token)` 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) foreign/csharp/Iggy_SDK/Consumers/IggyConsumer.cs:336— `await shutdown.Task` 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) foreign/csharp/Iggy_SDK/Consumers/IggyConsumer.cs:349— `await _lifetime.CancelAsync()` 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) foreign/csharp/Iggy_SDK/Consumers/IggyConsumer.cs:353— `await handling.Task` 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) foreign/csharp/Iggy_SDK/Consumers/IggyConsumer.cs:362— `await reader.CloseAsync(token)` 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) foreign/csharp/Iggy_SDK/Consumers/IggyConsumer.cs:376— `await _client.LogoutUserAsync()` 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) foreign/csharp/Iggy_SDK/Consumers/IggyConsumer.cs:430— `await Reader.NextAsync(cancellation.Token)` 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) foreign/csharp/Iggy_SDK/Consumers/IggyConsumer.cs:497— `await _client.GetConsumerGroupByIdAsync(_config.StreamId, _config.TopicId, group, ct)` 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) foreign/csharp/Iggy_SDK/Consumers/IggyConsumer.cs:506— `await _client.CreateConsumerGroupAsync(_config.StreamId, _config.TopicId, name, ct)` 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) foreign/csharp/Iggy_SDK/Consumers/IggyConsumer.cs:515— `await PartitionReader.AbandonLostAsync(_client, _logger, error)` 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) foreign/csharp/Iggy_SDK/Consumers/IggyConsumer.Rented.cs:38— `await NextBatchAsync(ct)` 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) foreign/csharp/Iggy_SDK/Consumers/IggyConsumerOfT.cs:59— `await foreach (… in ReceiveAsync(ct))` 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) foreign/csharp/Iggy_SDK/Consumers/PartitionReader.cs:278— `await CloseAsync()` 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) foreign/csharp/Iggy_SDK/Consumers/PartitionReader.cs:325— `await arrival.WaitAsync(token)` 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)`.
+ 15 more in this group — see findings.md.
R4 · Test Coverage· No test reaches this file · ×40
No test reaches this file web/src/lib/components/PermissionsManager.svelte:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file REDACTED:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file web/src/routes/dashboard/changes/+page.svelte:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file web/src/lib/actions/tooltip.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file web/src/lib/components/Modals/TopicSettingsModal.svelte:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file web/src/lib/domain/Stats.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file web/src/lib/components/Modals/StreamSettingsModal.svelte:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file web/src/lib/components/DurationInput.svelte:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file web/src/lib/utils/addOnKeyDownListener.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file web/src/lib/components/Modals/DeletePartitionsModal.svelte:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file foreign/node/src/debug-send.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file web/src/lib/components/Modals/AddTopicModal.svelte:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file web/src/lib/auth/authStore.svelte.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file foreign/node/src/debug.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file web/src/lib/components/Modals/AddUserModal.svelte:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file web/src/lib/components/Modals/AddStreamModal.svelte:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file web/src/lib/components/Modals/InspectMessage.svelte:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file web/src/lib/components/Modals/AddPartitionsModal.svelte:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file web/src/lib/components/SortableList.svelte:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file web/src/lib/components/Modals/EditUserModal.svelte:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file web/src/lib/api/clientApi.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file web/src/routes/auth/sign-in/+page.svelte:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file web/src/lib/domain/Permissions.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file web/src/lib/domain/Message.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file web/src/lib/components/Icon.svelte:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
IggyPartition::admit_request (cognitive 130) core/partitions/src/iggy_partition.rs:7778— IggyPartition::admit_request has cognitive complexity 130 (threshold 15). Drivers by points: if/else 57 (83 pts), boolean chains 27, match/switch 11 (20 pts) (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IggyPartition::resume_io_inner (cognitive 116) core/partitions/src/iggy_partition.rs:6596— IggyPartition::resume_io_inner has cognitive complexity 116 (threshold 15). Drivers by points: if/else 52 (81 pts), boolean chains 25, match/switch 5 (10 pts) (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IggyPartition::drain_request_queue_into_prepares (cognitive 94) core/partitions/src/iggy_partition.rs:8648— IggyPartition::drain_request_queue_into_prepares has cognitive complexity 94 (threshold 15). Drivers by points: if/else 33 (82 pts), boolean chains 8, match/switch 1 (3 pts), loops 1 (nesting depth added 51). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IggyPartition::on_replicate (cognitive 77) core/partitions/src/iggy_partition.rs:9059— IggyPartition::on_replicate has cognitive complexity 77 (threshold 15). Drivers by points: if/else 39 (64 pts), boolean chains 11, match/switch 2 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IggyPartition::drive_install_io (cognitive 46) core/partitions/src/state_transfer.rs:3689— IggyPartition::drive_install_io has cognitive complexity 46 (threshold 15). Drivers by points: if/else 17 (34 pts), match/switch 5 (10 pts), boolean chains 2 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IggyPartition::prepare_state_transfer_install (cognitive 35) core/partitions/src/state_transfer.rs:4674— IggyPartition::prepare_state_transfer_install has cognitive complexity 35 (threshold 15). Drivers by points: if/else 18 (21 pts), boolean chains 13, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
IggyPartition::resynchronize_consumer_offset_reservations_inner (cognitive 31) core/partitions/src/iggy_partition.rs:5841— IggyPartition::resynchronize_consumer_offset_reservations_inner has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 10, loops 3 (5 pts), match/switch 1 (2 pts) (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
IggyPartition::open_persistence_with_recovered (cognitive 30) core/partitions/src/iggy_partition.rs:1820— IggyPartition::open_persistence_with_recovered has cognitive complexity 30 (threshold 15). Drivers by points: if/else 17 (23 pts), loops 4 (5 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IggyPartition::reanchor_to_offset_frontier (cognitive 29) core/partitions/src/iggy_partition.rs:14433— IggyPartition::reanchor_to_offset_frontier has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 5, loops 3 (5 pts), match/switch 2 (4 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IggyPartition::apply_repaired_prepare (cognitive 29) core/partitions/src/iggy_partition.rs:14782— IggyPartition::apply_repaired_prepare has cognitive complexity 29 (threshold 15). Drivers by points: if/else 19 (20 pts), boolean chains 9 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
IggyPartition::publish_pending_commit (cognitive 28) core/partitions/src/iggy_partition.rs:11981— IggyPartition::publish_pending_commit has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (15 pts), loops 6 (9 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IggyPartition::drive_committed_offsets (cognitive 25) core/partitions/src/iggy_partition.rs:11467— IggyPartition::drive_committed_offsets has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (15 pts), match/switch 1 (4 pts), boolean chains 3, loops 1 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IggyPartition::complete_repair (cognitive 24) core/partitions/src/iggy_partition.rs:14926— IggyPartition::complete_repair has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 5, match/switch 1 (2 pts) (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
IggyPartition::accept_install_io (cognitive 24) core/partitions/src/state_transfer.rs:4226— IggyPartition::accept_install_io has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 4 (9 pts), match/switch 4 (6 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IggyPartition::accept_commit_phase (cognitive 23) core/partitions/src/iggy_partition.rs:11695— IggyPartition::accept_commit_phase has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (19 pts), loops 1 (3 pts), match/switch 1 (nesting depth added 12). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
IggyPartition::drive_quarantine_io (cognitive 22) core/partitions/src/iggy_partition.rs:1711— IggyPartition::drive_quarantine_io has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (13 pts), match/switch 4 (9 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IggyPartition::build_poll_plan_within (cognitive 22) core/partitions/src/iggy_partition.rs:6064— IggyPartition::build_poll_plan_within has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (10 pts), match/switch 7 (9 pts), boolean chains 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IggyPartition::drive_no_ack (cognitive 21) core/partitions/src/iggy_partition.rs:5481— IggyPartition::drive_no_ack has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (18 pts), match/switch 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IggyPartition::complete_poll (cognitive 20) core/partitions/src/iggy_partition.rs:4550— IggyPartition::complete_poll has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IggyPartition::handle_committed_entries (cognitive 20) core/partitions/src/iggy_partition.rs:11293— IggyPartition::handle_committed_entries has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (10 pts), match/switch 3 (7 pts), boolean chains 2, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IggyPartition::build_state_transfer_offer (cognitive 20) core/partitions/src/state_transfer.rs:2662— IggyPartition::build_state_transfer_offer has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 4, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
IggyPartition::plan_materialization_chunk (cognitive 19) core/partitions/src/iggy_partition.rs:10972— IggyPartition::plan_materialization_chunk has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IggyPartition::persistence_checkpoint_files (cognitive 18) core/partitions/src/iggy_partition.rs:2198— IggyPartition::persistence_checkpoint_files has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 4 (5 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IggyPartition::ensure_wal_view (cognitive 18) core/partitions/src/iggy_partition.rs:2588— IggyPartition::ensure_wal_view has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 4 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IggyPartition::persist_repaired_prefix_through (cognitive 18) core/partitions/src/iggy_partition.rs:2711— IggyPartition::persist_repaired_prefix_through has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IggyShard::tick_partitions (cognitive 228) core/shard/src/lib.rs:9701— IggyShard::tick_partitions has cognitive complexity 228 (threshold 15). Drivers by points: if/else 80 (189 pts), boolean chains 24, loops 7 (9 pts), match/switch 3 (6 pts) (nesting depth added 114). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
IggyShard::serve_prepares (cognitive 102) core/shard/src/lib.rs:6751— IggyShard::serve_prepares has cognitive complexity 102 (threshold 15). Drivers by points: if/else 47 (83 pts), boolean chains 8, loops 4 (6 pts), match/switch 2 (5 pts) (nesting depth added 41). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IggyShard::on_repair_range_reply (cognitive 74) core/shard/src/lib.rs:7428— IggyShard::on_repair_range_reply has cognitive complexity 74 (threshold 15). Drivers by points: if/else 29 (65 pts), boolean chains 6, match/switch 2 (3 pts) (nesting depth added 37). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
IggyShard::tick_primary_rebalance (cognitive 66) core/shard/src/primary_rebalance.rs:436— IggyShard::tick_primary_rebalance has cognitive complexity 66 (threshold 15). Drivers by points: if/else 29 (41 pts), boolean chains 19, loops 3 (4 pts), match/switch 1 (2 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IggyShard::on_primary_rebalance (cognitive 65) core/shard/src/primary_rebalance.rs:805— IggyShard::on_primary_rebalance has cognitive complexity 65 (threshold 15). Drivers by points: if/else 25 (50 pts), boolean chains 12, match/switch 2 (3 pts) (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IggyShard::wait_for_messages (cognitive 56) core/shard/src/lib.rs:2949— IggyShard::wait_for_messages has cognitive complexity 56 (threshold 15). Drivers by points: if/else 20 (36 pts), match/switch 4 (10 pts), boolean chains 6, loops 4 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IggyShard::serve_partition_chunk (cognitive 55) core/shard/src/lib.rs:11022— IggyShard::serve_partition_chunk has cognitive complexity 55 (threshold 15). Drivers by points: if/else 19 (39 pts), match/switch 5 (11 pts), boolean chains 4, loops 1 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IggyShard::run_message_pump (cognitive 52) core/shard/src/router.rs:313— IggyShard::run_message_pump has cognitive complexity 52 (threshold 15). Drivers by points: if/else 18 (36 pts), match/switch 4 (11 pts), boolean chains 4, loops 1 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IggyShard::on_partition_transfer_progress (cognitive 51) core/shard/src/lib.rs:12268— IggyShard::on_partition_transfer_progress has cognitive complexity 51 (threshold 15). Drivers by points: if/else 27 (37 pts), match/switch 5 (10 pts), boolean chains 3, loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IggyShard::on_start_view (cognitive 49) core/shard/src/lib.rs:5974— IggyShard::on_start_view has cognitive complexity 49 (threshold 15). Drivers by points: if/else 21 (37 pts), boolean chains 11, match/switch 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IggyShard::on_repair_prepare (cognitive 47) core/shard/src/lib.rs:7139— IggyShard::on_repair_prepare has cognitive complexity 47 (threshold 15). Drivers by points: if/else 22 (41 pts), boolean chains 6 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IggyShard::service_deferred_polls (cognitive 44) core/shard/src/poll/deferred.rs:1391— IggyShard::service_deferred_polls has cognitive complexity 44 (threshold 15). Drivers by points: if/else 10 (27 pts), loops 3 (10 pts), boolean chains 4, match/switch 1 (3 pts) (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IggyShard::flush_partitions (cognitive 39) core/shard/src/router.rs:620— IggyShard::flush_partitions has cognitive complexity 39 (threshold 15). Drivers by points: if/else 10 (30 pts), loops 3 (5 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IggyShard::drain_queued_frames_for_shutdown (cognitive 38) core/shard/src/router.rs:723— IggyShard::drain_queued_frames_for_shutdown has cognitive complexity 38 (threshold 15). Drivers by points: if/else 12 (34 pts), loops 3 (4 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IggyShard::tick_metadata (cognitive 33) core/shard/src/lib.rs:13141— IggyShard::tick_metadata has cognitive complexity 33 (threshold 15). Drivers by points: if/else 18 (29 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IggyShard::on_prepare_progress (cognitive 32) core/shard/src/lib.rs:6464— IggyShard::on_prepare_progress has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (23 pts), boolean chains 6, loops 1 (3 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IggyShard::dispatch_message (cognitive 28) core/shard/src/lib.rs:4374— IggyShard::dispatch_message has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (20 pts), match/switch 3 (5 pts), boolean chains 3 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IggyShard::on_transfer_progress (cognitive 28) core/shard/src/lib.rs:9481— IggyShard::on_transfer_progress has cognitive complexity 28 (threshold 15). Drivers by points: if/else 14 (21 pts), match/switch 4 (6 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IggyShard::partition_read_rejection (cognitive 28) core/shard/src/poll.rs:402— IggyShard::partition_read_rejection has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 8, match/switch 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IggyShard::service_partition_io (cognitive 27) core/shard/src/partition_io.rs:643— IggyShard::service_partition_io has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (20 pts), match/switch 3 (5 pts), boolean chains 1, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IggyShard::process_lifecycle (cognitive 27) core/shard/src/router.rs:875— IggyShard::process_lifecycle has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (26 pts), match/switch 1 (nesting depth added 14). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
IggyShard::on_partition_read (cognitive 24) core/shard/src/poll.rs:165— IggyShard::on_partition_read has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (18 pts), match/switch 3 (4 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IggyShard::on_state_transfer_target (cognitive 23) core/shard/src/lib.rs:8892— IggyShard::on_state_transfer_target has cognitive complexity 23 (threshold 15). Drivers by points: if/else 15 (20 pts), boolean chains 2, match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IggyShard::sweep_readiness_watches (cognitive 21) core/shard/src/poll/deferred.rs:2289— IggyShard::sweep_readiness_watches has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 4 (6 pts), boolean chains 4 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IggyShard::on_commit (cognitive 20) core/shard/src/lib.rs:6269— IggyShard::on_commit has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (15 pts), match/switch 2 (3 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Duplicated block (8 lines × 2) core/ai/mcp/src/service/mod.rs:889— core/ai/mcp/src/service/mod.rs:889-896 | core/cli/src/args/common.rs:161-168 — 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 `core/ai/mcp/src/service/mod.rs:889` it does not close everything it opens, so those exact lines 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) core/binary_protocol/src/requests/users/create_user.rs:59— core/binary_protocol/src/requests/users/create_user.rs:59-66 | core/binary_protocol/src/requests/users/login_user.rs:51-58 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (8 lines × 2) core/integration/src/harness/handle/client.rs:116— core/integration/src/harness/handle/client.rs:116-123 | core/integration/src/harness/handle/client.rs:189-196 — both copies are in the same file, so extract the 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) core/metadata/src/impls/metadata.rs:3651— core/metadata/src/impls/metadata.rs:3651-3659 | core/metadata/src/impls/metadata.rs:3705-3712 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/metadata/src/impls/metadata.rs:3651` 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) core/partitions/src/persistence.rs:510— core/partitions/src/persistence.rs:510-517 | core/partitions/src/persistence.rs:550-557 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/partitions/src/persistence.rs:510` 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) core/sdk/src/clients/reader/worker.rs:1380— core/sdk/src/clients/reader/worker.rs:1380-1387 | core/sdk/src/clients/reader/worker.rs:1500-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 `core/sdk/src/clients/reader/worker.rs:1380` it does not close everything it opens, so those exact lines 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) core/server/src/rewrite.rs:155— core/server/src/rewrite.rs:155-163 | core/server/src/rewrite.rs:200-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. Read the line range as the matched WINDOW rather than a finished unit: at `core/server/src/rewrite.rs:200` it does not close everything it opens, so those 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) core/simulator/src/client.rs:1169— core/simulator/src/client.rs:1169-1176 | core/simulator/src/client.rs:1190-1197 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/simulator/src/client.rs:1169` 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) core/simulator/src/lib.rs:673— core/simulator/src/lib.rs:673-680 | core/simulator/src/lib.rs:710-717 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/simulator/src/lib.rs:673` it does not close everything it opens, so those 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, `core/simulator/src/lib.rs:681` calls `metadata`, `streams`, `created_revision_for_namespace` and `core/simulator/src/lib.rs:718` 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 × 2) foreign/php/src/client.rs:686— foreign/php/src/client.rs:686-693 | foreign/php/src/client.rs:715-722 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `foreign/php/src/client.rs:686` it does not close everything it opens, so those exact lines 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) foreign/python/src/resource_options.rs:326— foreign/python/src/resource_options.rs:326-333 | foreign/python/src/resource_options.rs:338-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.
Duplicated block (8 lines × 2) gateways/kafka/src/bridge/iggy_bridge/topics.rs:301— gateways/kafka/src/bridge/iggy_bridge/topics.rs:301-308 | gateways/kafka/src/bridge/iggy_bridge/topics.rs:542-549 — both copies are in the same file, so extract the 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) core/web_ui/src/pages/streams.rs:79— core/web_ui/src/pages/streams.rs:79-86 | core/web_ui/src/pages/topic.rs:29-36 — 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 `core/web_ui/src/pages/streams.rs:79` 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) foreign/python/src/config.rs:1575— foreign/python/src/config.rs:1575-1582 | foreign/python/src/producer.rs:872-879 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (8 lines × 2) core/cli/src/commands/binary_consumer_groups/get_consumer_groups.rs:33— core/cli/src/commands/binary_consumer_groups/get_consumer_groups.rs:33-40 | core/cli/src/commands/binary_topics/get_topics.rs:33-40 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (8 lines × 2) core/simulator/src/workload/ops/delete_personal_access_token.rs:68— core/simulator/src/workload/ops/delete_personal_access_token.rs:68-75 | core/simulator/src/workload/ops/delete_stream.rs:68-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 both call sites, so a change lands once.
Duplicated block (8 lines × 2) core/cli/src/commands/binary_users/change_password.rs:65— core/cli/src/commands/binary_users/change_password.rs:65-72 | core/cli/src/commands/binary_users/change_password.rs:78-85 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/cli/src/commands/binary_users/change_password.rs:65` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) foreign/python/src/config.rs:457— foreign/python/src/config.rs:457-464 | foreign/python/src/config.rs:1496-1503 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `foreign/python/src/config.rs:457` 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, `foreign/python/src/config.rs:1505` calls `framing`, `__repr__` and `foreign/python/src/config.rs:466` 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 × 2) core/cli/src/commands/binary_streams/update_stream.rs:45— core/cli/src/commands/binary_streams/update_stream.rs:45-52 | core/cli/src/commands/binary_topics/update_topic.rs:55-62 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `core/cli/src/commands/binary_streams/update_stream.rs:45` 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) foreign/java/java-sdk/src/main/java/org/apache/iggy/client/blocking/http/MetadataChangesJson.java:117— foreign/java/java-sdk/src/main/java/org/apache/iggy/client/blocking/http/MetadataChangesJson.java:117-124 | foreign/java/java-sdk/src/main/java/org/apache/iggy/serde/MetadataChangesReader.java:131-138 — 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 `foreign/java/java-sdk/src/main/java/org/apache/iggy/client/blocking/http/MetadataChangesJson.java:117` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8 lines × 2) foreign/java/java-sdk/src/main/java/org/apache/iggy/client/blocking/http/MessagesHttpClient.java:134— foreign/java/java-sdk/src/main/java/org/apache/iggy/client/blocking/http/MessagesHttpClient.java:134-141 | foreign/java/java-sdk/src/main/java/org/apache/iggy/client/blocking/http/MessagesHttpClient.java:228-235 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/reader/ReaderSupport.java:446— foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/reader/ReaderSupport.java:446-453 | foreign/java/java-sdk/src/main/java/org/apache/iggy/system/MetadataChangeEncoding.java:80-87 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. 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) foreign/java/java-sdk/src/main/java/org/apache/iggy/cluster/ClusterNodeRole.java:40— foreign/java/java-sdk/src/main/java/org/apache/iggy/cluster/ClusterNodeRole.java:40-47 | foreign/java/java-sdk/src/main/java/org/apache/iggy/cluster/ClusterNodeStatus.java:46-53 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (8 lines × 2) foreign/go/internal/command/user.go:74— foreign/go/internal/command/user.go:74-81 | foreign/go/internal/command/user.go:139-146 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `foreign/go/internal/command/user.go:74` 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) foreign/swift/Sources/Iggy/Protocol/Responses.swift:40— foreign/swift/Sources/Iggy/Protocol/Responses.swift:40-47 | foreign/swift/Sources/Iggy/Protocol/Responses.swift:80-87 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
server::boot::shard_main (cognitive 57) core/server/src/boot/mod.rs:537— server::boot::shard_main has cognitive complexity 57 (threshold 15). Drivers by points: if/else 33 (46 pts), boolean chains 5, loops 2 (3 pts), match/switch 3 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
server::http::forward::serve_partition (cognitive 38) core/server/src/http/forward.rs:551— server::http::forward::serve_partition has cognitive complexity 38 (threshold 15). Drivers by points: if/else 9 (16 pts), match/switch 4 (15 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
server::partition_reconciler::reconcile_group_offsets (cognitive 37) core/server/src/partition_reconciler.rs:1522— server::partition_reconciler::reconcile_group_offsets has cognitive complexity 37 (threshold 15). Drivers by points: if/else 14 (29 pts), match/switch 1 (4 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
server::partition_reconciler::reconcile_retired_lifecycles (cognitive 36) core/server/src/partition_reconciler.rs:2181— server::partition_reconciler::reconcile_retired_lifecycles has cognitive complexity 36 (threshold 15). Drivers by points: if/else 10 (27 pts), match/switch 2 (5 pts), loops 3 (4 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
server::boot::credentials::initialize_root_user (cognitive 34) core/server/src/boot/credentials.rs:76— server::boot::credentials::initialize_root_user has cognitive complexity 34 (threshold 15). Drivers by points: if/else 8 (22 pts), match/switch 2 (7 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
server::consumer_group::liveness::sweep_retirement (cognitive 33) core/server/src/consumer_group/liveness.rs:743— server::consumer_group::liveness::sweep_retirement has cognitive complexity 33 (threshold 15). Drivers by points: if/else 22 (25 pts), boolean chains 5, loops 3 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
server::dispatch::reads::handle_non_replicated_request (cognitive 31) core/server/src/dispatch/reads.rs:372— server::dispatch::reads::handle_non_replicated_request has cognitive complexity 31 (threshold 15). Drivers by points: if/else 12 (24 pts), match/switch 4 (7 pts) (nesting depth added 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.
server::dispatch::submit::handle_metadata_submit (cognitive 29) core/server/src/dispatch/submit.rs:76— server::dispatch::submit::handle_metadata_submit has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (19 pts), match/switch 3 (5 pts), loops 1 (3 pts), boolean chains 2 (nesting depth added 14). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
server::partition_reconciler::reconcile_target (cognitive 29) core/server/src/partition_reconciler.rs:926— server::partition_reconciler::reconcile_target has cognitive complexity 29 (threshold 15). Drivers by points: if/else 16 (24 pts), match/switch 3, boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
server::http::forward::attach_partition_request (cognitive 27) core/server/src/http/forward.rs:979— server::http::forward::attach_partition_request has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (15 pts), match/switch 7 (10 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
server::dispatch::enqueue_client_request (cognitive 26) core/server/src/dispatch/mod.rs:212— server::dispatch::enqueue_client_request has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 5, loops 2 (5 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
server::dispatch::handle_client_request (cognitive 26) core/server/src/dispatch/mod.rs:893— server::dispatch::handle_client_request has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (16 pts), match/switch 6 (10 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
server::partition_reconciler::reconcile_partition_lifecycles (cognitive 26) core/server/src/partition_reconciler.rs:2083— server::partition_reconciler::reconcile_partition_lifecycles has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (16 pts), match/switch 2 (6 pts), loops 3 (4 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
server::dispatch::fetch::read_allotted (cognitive 25) core/server/src/dispatch/fetch.rs:413— server::dispatch::fetch::read_allotted has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (20 pts), match/switch 2 (4 pts), loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
server::boot::recovery::build_shard_for_thread (cognitive 22) core/server/src/boot/recovery.rs:98— server::boot::recovery::build_shard_for_thread has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 4 (7 pts), match/switch 2 (4 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
server::http::submit::submit_gated (cognitive 21) core/server/src/http/submit.rs:191— server::http::submit::submit_gated has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (17 pts), match/switch 2 (3 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
server::segment_cleaner::stage_owned_partitions (cognitive 21) core/server/src/segment_cleaner.rs:84— server::segment_cleaner::stage_owned_partitions has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (17 pts), boolean chains 3, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
server::snapshot::procdump::dump_file (cognitive 21) core/server/src/snapshot/procdump.rs:96— server::snapshot::procdump::dump_file has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (9 pts), match/switch 2 (6 pts), loops 1 (4 pts), boolean chains 2 (nesting depth added 11). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
server::boot::listeners::start_tcp_runtime (cognitive 19) core/server/src/boot/listeners.rs:60— server::boot::listeners::start_tcp_runtime has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
server::consumer_group::liveness::retire_session (cognitive 19) core/server/src/consumer_group/liveness.rs:593— server::consumer_group::liveness::retire_session has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13 (15 pts), boolean chains 4 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
server::dispatch::session_ops::handle_login_register_request (cognitive 19) core/server/src/dispatch/session_ops.rs:1102— server::dispatch::session_ops::handle_login_register_request has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (15 pts), match/switch 2 (4 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
server::dispatch::submit::propose_relayed_completion (cognitive 19) core/server/src/dispatch/submit.rs:683— server::dispatch::submit::propose_relayed_completion has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (19 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
server::partition_helpers::load_partition_or_fence (cognitive 19) core/server/src/partition_helpers.rs:183— server::partition_helpers::load_partition_or_fence has cognitive complexity 19 (threshold 15). Drivers by points: match/switch 6 (8 pts), if/else 4 (7 pts), boolean chains 4 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
server::partition_helpers::build_partition_fresh (cognitive 19) core/server/src/partition_helpers.rs:990— server::partition_helpers::build_partition_fresh has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 7 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
server::partition_reconciler::add_committed_targets (cognitive 19) core/server/src/partition_reconciler.rs:766— server::partition_reconciler::add_committed_targets has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 3 (6 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IggyShard::tick_partitions (cyclomatic 111) core/shard/src/lib.rs:9701— IggyShard::tick_partitions has cyclomatic complexity 111 (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.
IggyShard::serve_prepares (cyclomatic 57) core/shard/src/lib.rs:6751— IggyShard::serve_prepares has cyclomatic complexity 57 (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.
IggyShard::tick_primary_rebalance (cyclomatic 50) core/shard/src/primary_rebalance.rs:436— IggyShard::tick_primary_rebalance has cyclomatic complexity 50 (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.
IggyShard::process_lifecycle (cyclomatic 45) core/shard/src/router.rs:875— IggyShard::process_lifecycle has cyclomatic complexity 45 (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.
IggyShard::on_primary_rebalance (cyclomatic 42) core/shard/src/primary_rebalance.rs:805— IggyShard::on_primary_rebalance has cyclomatic complexity 42 (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.
IggyShard::dispatch_message (cyclomatic 41) core/shard/src/lib.rs:4374— IggyShard::dispatch_message has cyclomatic complexity 41 (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.
IggyShard::on_repair_range_reply (cyclomatic 36) core/shard/src/lib.rs:7428— IggyShard::on_repair_range_reply 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.
IggyShard::on_partition_transfer_progress (cyclomatic 36) core/shard/src/lib.rs:12268— IggyShard::on_partition_transfer_progress 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.
IggyShard::on_start_view (cyclomatic 35) core/shard/src/lib.rs:5974— IggyShard::on_start_view 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.
IggyShard::run_message_pump (cyclomatic 34) core/shard/src/router.rs:313— IggyShard::run_message_pump 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.
IggyShard::wait_for_messages (cyclomatic 33) core/shard/src/lib.rs:2949— IggyShard::wait_for_messages 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.
IggyShard::on_repair_prepare (cyclomatic 29) core/shard/src/lib.rs:7139— IggyShard::on_repair_prepare 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.
IggyShard::serve_partition_chunk (cyclomatic 29) core/shard/src/lib.rs:11022— IggyShard::serve_partition_chunk 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.
IggyShard::on_partition_read (cyclomatic 26) core/shard/src/poll.rs:165— IggyShard::on_partition_read 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.
IggyShard::service_partition_io (cyclomatic 25) core/shard/src/partition_io.rs:643— IggyShard::service_partition_io 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.
IggyShard::partition_read_rejection (cyclomatic 22) core/shard/src/poll.rs:402— IggyShard::partition_read_rejection 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.
IggyShard::on_partition_state_transfer_target (cyclomatic 20) core/shard/src/lib.rs:11973— IggyShard::on_partition_state_transfer_target 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.
IggyShard::tick_metadata (cyclomatic 20) core/shard/src/lib.rs:13141— IggyShard::tick_metadata 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.
IggyShard::advance_pending_partition_view (cyclomatic 19) core/shard/src/lib.rs:7945— IggyShard::advance_pending_partition_view 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.
IggyShard::on_state_transfer_target (cyclomatic 19) core/shard/src/lib.rs:8892— IggyShard::on_state_transfer_target 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.
IggyShard::on_transfer_progress (cyclomatic 19) core/shard/src/lib.rs:9481— IggyShard::on_transfer_progress 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.
IggyShard::service_deferred_polls (cyclomatic 19) core/shard/src/poll/deferred.rs:1391— IggyShard::service_deferred_polls 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.
IggyShard::flush_partitions (cyclomatic 19) core/shard/src/router.rs:620— IggyShard::flush_partitions 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.
IggyShard::on_prepare_progress (cyclomatic 18) core/shard/src/lib.rs:6464— IggyShard::on_prepare_progress 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.
IggyShard::maybe_request_partition_repair (cyclomatic 18) core/shard/src/lib.rs:11639— IggyShard::maybe_request_partition_repair 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.
Duplicated block (7 lines × 2) foreign/csharp/Iggy_SDK/Contracts/Tcp/TcpContracts.cs:95— foreign/csharp/Iggy_SDK/Contracts/Tcp/TcpContracts.cs:95-101 | foreign/csharp/Iggy_SDK/Contracts/Tcp/TcpContracts.cs:104-110 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (7 lines × 2) core/ai/mcp/src/log.rs:162— core/ai/mcp/src/log.rs:162-168 | core/server_common/src/log/logger.rs:374-380 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Note first that the copies are not typed on the same thing: the declarations holding them bind `telemetry_config` to `&TelemetryConfig` in one and `&TelemetrySettings` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (7 lines × 2) core/ai/mcp/src/log.rs:198— core/ai/mcp/src/log.rs:198-204 | core/server_common/src/log/logger.rs:405-411 — 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 first that the copies are not typed on the same thing: the declarations holding them bind `telemetry_config` to `&TelemetryConfig` in one and `&TelemetrySettings` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (7 lines × 2) core/binary_protocol/src/primitives/metadata_changes/body.rs:1071— core/binary_protocol/src/primitives/metadata_changes/body.rs:1071-1077 | core/binary_protocol/src/primitives/metadata_changes/body.rs:1101-1107 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/binary_protocol/src/primitives/metadata_changes/body.rs:1071` it does not close everything it opens, so those exact lines 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) core/message_bus/src/installer/replica.rs:560— core/message_bus/src/installer/replica.rs:560-566 | core/message_bus/src/installer/tcp.rs:162-186 — before extracting anything, compare `core/message_bus/src/installer/replica.rs` and `core/message_bus/src/installer/tcp.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 87 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 `core/message_bus/src/installer/replica.rs:560` it does not close everything it opens, so those 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, `core/message_bus/src/installer/replica.rs:560` calls `guard` and `core/message_bus/src/installer/tcp.rs:162` 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 (7 lines × 2) core/metadata/src/impls/metadata.rs:5560— core/metadata/src/impls/metadata.rs:5560-5566 | core/metadata/src/impls/metadata.rs:5599-5605 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/metadata/src/impls/metadata.rs:5560` it does not close everything it opens, so those 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, `core/metadata/src/impls/metadata.rs:5558` calls `to_bytes` and `core/metadata/src/impls/metadata.rs:5598` 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 × 2) core/object_store/src/contract.rs:395— core/object_store/src/contract.rs:395-401 | core/object_store/src/contract.rs:422-428 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/object_store/src/contract.rs:395` it does not close everything it opens, so those exact lines 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) foreign/cpp/src/consumer.rs:88— foreign/cpp/src/consumer.rs:88-94 | foreign/cpp/src/reader.rs:98-104 — before extracting anything, compare `foreign/cpp/src/consumer.rs` and `foreign/cpp/src/reader.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 30 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 `foreign/cpp/src/consumer.rs: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.
Duplicated block (7 lines × 2) foreign/cpp/src/consumer.rs:141— foreign/cpp/src/consumer.rs:141-147 | foreign/cpp/src/reader.rs:151-157 — before extracting anything, compare `foreign/cpp/src/consumer.rs` and `foreign/cpp/src/reader.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 30 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 `foreign/cpp/src/consumer.rs:141` 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) foreign/php/src/client.rs:1127— foreign/php/src/client.rs:1127-1133 | foreign/python/src/client.rs:2436-2442 — 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 `foreign/php/src/client.rs:1127` it does not close everything it opens, so those exact lines 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) foreign/python/src/client.rs:1977— foreign/python/src/client.rs:1977-1983 | foreign/python/src/client.rs:2090-2096 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `foreign/python/src/client.rs:1977` it does not close everything it opens, so those exact lines 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) gateways/kafka/src/group/state.rs:1521— gateways/kafka/src/group/state.rs:1521-1527 | gateways/kafka/src/group/state.rs:1529-1535 — both copies are in the same file, so extract the 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 (7 lines × 2) gateways/kafka/tools/kafka-tool/src/response.rs:309— gateways/kafka/tools/kafka-tool/src/response.rs:309-315 | gateways/kafka/tools/kafka-tool/src/response.rs:333-339 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `gateways/kafka/tools/kafka-tool/src/response.rs:309` it does not close everything it opens, so those exact lines 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) core/shard/src/lib.rs:6286— core/shard/src/lib.rs:6286-6292 | core/shard/src/lib.rs:6349-6355 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/shard/src/lib.rs:6286` it does not close everything it opens, so those exact lines 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) core/journal/src/prepare_journal.rs:1047— core/journal/src/prepare_journal.rs:1047-1053 | core/journal/src/prepare_journal.rs:1160-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 `core/journal/src/prepare_journal.rs:1047` it does not close everything it opens, so those exact lines 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) core/common/src/http/partitions/create_partitions.rs:52— core/common/src/http/partitions/create_partitions.rs:52-58 | core/common/src/http/partitions/delete_partitions.rs:52-58 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (7 lines × 2) gateways/kafka/src/protocol/handlers/alter_configs.rs:312— gateways/kafka/src/protocol/handlers/alter_configs.rs:312-318 | gateways/kafka/src/protocol/handlers/incremental_alter_configs.rs:327-333 — before extracting anything, compare `gateways/kafka/src/protocol/handlers/alter_configs.rs` and `gateways/kafka/src/protocol/handlers/incremental_alter_configs.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 112 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 `gateways/kafka/src/protocol/handlers/alter_configs.rs:312` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) core/bench/report/src/types/server_stats.rs:121— core/bench/report/src/types/server_stats.rs:121-127 | core/common/src/types/stats/mod.rs:134-140 — before extracting anything, compare `core/bench/report/src/types/server_stats.rs` and `core/common/src/types/stats/mod.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 31 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (7 lines × 2) core/binary_protocol/src/responses/system/describe_options.rs:142— core/binary_protocol/src/responses/system/describe_options.rs:142-148 | core/binary_protocol/src/responses/topics/get_topics.rs:50-56 — 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) core/metadata/src/impls/metadata.rs:2281— core/metadata/src/impls/metadata.rs:2281-2287 | core/partitions/src/iggy_partitions.rs:1013-1019 — 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) foreign/php/src/client.rs:130— foreign/php/src/client.rs:130-137 | foreign/python/src/client.rs:401-407 — 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 `foreign/python/src/client.rs:401` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) gateways/kafka/src/protocol/handlers/alter_configs.rs:95— gateways/kafka/src/protocol/handlers/alter_configs.rs:95-101 | gateways/kafka/src/protocol/handlers/incremental_alter_configs.rs:111-119 — before extracting anything, compare `gateways/kafka/src/protocol/handlers/alter_configs.rs` and `gateways/kafka/src/protocol/handlers/incremental_alter_configs.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 112 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 `gateways/kafka/src/protocol/handlers/alter_configs.rs:95` it does not close everything it opens, so those 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 (7 lines × 2) core/common/src/types/consumer/consumer_kind.rs:187— core/common/src/types/consumer/consumer_kind.rs:187-193 | core/server/src/http/jwt.rs:484-490 — 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 `core/common/src/types/consumer/consumer_kind.rs:187` 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) core/binary_protocol/src/batch.rs:404— core/binary_protocol/src/batch.rs:404-410 | core/binary_protocol/src/batch.rs:441-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.
Duplicated block (7 lines × 2) foreign/swift/Sources/Iggy/Models/IggyMessage.swift:134— foreign/swift/Sources/Iggy/Models/IggyMessage.swift:134-140 | foreign/swift/Sources/Iggy/Models/UserHeaders.swift:310-316 — 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.
+ 2 more in this group — see findings.md.
D4 · Code Duplication· Edited copy of a member (11 corresponding lines) · ×26
Edited copy of a member (11 corresponding lines) core/sdk/src/clients/client.rs:968— core/sdk/src/clients/client.rs:968-978 | core/sdk/src/clients/client.rs:1049-1061 — 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) core/kafka_wire/src/records.rs:472— core/kafka_wire/src/records.rs:472-484 | core/kafka_wire/src/records.rs:1074-1084 — 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) foreign/java/java-sdk/src/main/java/org/apache/iggy/client/blocking/http/MetadataChangesJson.java:114— foreign/java/java-sdk/src/main/java/org/apache/iggy/client/blocking/http/MetadataChangesJson.java:114-124 | foreign/java/java-sdk/src/main/java/org/apache/iggy/serde/MetadataChangesReader.java:128-138 — 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) core/sdk/src/links/mux.rs:388— core/sdk/src/links/mux.rs:388-403 | core/sdk/src/links/mux.rs:406-416 — 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) foreign/java/java-sdk/src/main/java/org/apache/iggy/serde/BytesDeserializer.java:892— foreign/java/java-sdk/src/main/java/org/apache/iggy/serde/BytesDeserializer.java:892-904 | foreign/java/java-sdk/src/main/java/org/apache/iggy/serde/BytesDeserializer.java:906-916 — 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) foreign/cpp/src/consumer.rs:100— foreign/cpp/src/consumer.rs:100-110 | foreign/cpp/src/reader.rs:110-120 — 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) gateways/kafka/src/bridge/iggy_bridge/group_offsets.rs:964— gateways/kafka/src/bridge/iggy_bridge/group_offsets.rs:964-975 | gateways/kafka/src/bridge/iggy_bridge/group_offsets.rs:983-993 — 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) foreign/swift/Sources/Iggy/Protocol/Responses.swift:116— foreign/swift/Sources/Iggy/Protocol/Responses.swift:116-126 | foreign/swift/Sources/Iggy/Protocol/Responses.swift:128-138 — 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) foreign/php/src/client.rs:984— foreign/php/src/client.rs:984-994 | foreign/php/src/client.rs:1006-1020 — 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) foreign/csharp/Iggy_SDK/IggyClient/Implementations/HttpMessageStream.cs:214— foreign/csharp/Iggy_SDK/IggyClient/Implementations/HttpMessageStream.cs:214-224 | foreign/csharp/Iggy_SDK/IggyClient/Implementations/HttpMessageStream.cs:765-777 — 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) core/server/src/responses.rs:118— core/server/src/responses.rs:118-128 | core/server/src/responses.rs:132-142 — 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) foreign/java/java-sdk/src/main/java/org/apache/iggy/serde/BytesDeserializer.java:743— foreign/java/java-sdk/src/main/java/org/apache/iggy/serde/BytesDeserializer.java:743-753 | foreign/java/java-sdk/src/main/java/org/apache/iggy/serde/MetadataChangesReader.java:507-518 — 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) core/journal/src/partition_journal.rs:797— core/journal/src/partition_journal.rs:797-807 | core/journal/src/partition_journal.rs:813-825 — 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) gateways/kafka/src/protocol/handlers/offset_fetch.rs:290— gateways/kafka/src/protocol/handlers/offset_fetch.rs:290-306 | gateways/kafka/src/protocol/handlers/offset_fetch.rs:345-355 — 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) core/journal/src/prepare_journal.rs:1125— core/journal/src/prepare_journal.rs:1125-1135 | core/simulator/src/deps.rs:215-226 — 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) gateways/kafka/src/protocol/handlers/offset_commit.rs:545— gateways/kafka/src/protocol/handlers/offset_commit.rs:545-555 | gateways/kafka/src/protocol/handlers/offset_delete.rs:378-388 — 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) foreign/java/java-sdk/src/main/java/org/apache/iggy/client/blocking/http/MetadataChangesJson.java:162— foreign/java/java-sdk/src/main/java/org/apache/iggy/client/blocking/http/MetadataChangesJson.java:162-172 | foreign/java/java-sdk/src/main/java/org/apache/iggy/client/blocking/http/MetadataChangesJson.java:198-210 — 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) core/cli/src/commands/binary_system/session.rs:80— core/cli/src/commands/binary_system/session.rs:80-90 | core/cli/src/commands/binary_system/session.rs:99-111 — 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) foreign/cpp/src/type_conversion.rs:1870— foreign/cpp/src/type_conversion.rs:1870-1880 | foreign/cpp/src/type_conversion.rs:1895-1905 — 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) foreign/csharp/Iggy_SDK/IggyClient/Implementations/TcpMessageStream.cs:677— foreign/csharp/Iggy_SDK/IggyClient/Implementations/TcpMessageStream.cs:677-687 | foreign/csharp/Iggy_SDK/IggyClient/Implementations/TcpMessageStream.cs:841-852 — 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) core/server/src/session_manager.rs:648— core/server/src/session_manager.rs:648-658 | core/server/src/session_manager.rs:662-672 — 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) foreign/csharp/Iggy_SDK/Contracts/FetchedMessages.cs:71— foreign/csharp/Iggy_SDK/Contracts/FetchedMessages.cs:71-81 | foreign/csharp/Iggy_SDK/Vsr/MutationLanes.cs:906-916 — 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) foreign/csharp/Iggy_SDK/Consumers/IggyConsumerBuilder.cs:109— foreign/csharp/Iggy_SDK/Consumers/IggyConsumerBuilder.cs:109-119 | foreign/csharp/Iggy_SDK/Publishers/IggyPublisherBuilder.cs:126-136 — 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) core/cli/src/args/permissions/global.rs:78— core/cli/src/args/permissions/global.rs:78-88 | core/cli/src/args/permissions/topic.rs:65-76 — 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) core/bench/report/src/plotting/chart.rs:263— core/bench/report/src/plotting/chart.rs:263-273 | core/bench/report/src/plotting/chart.rs:282-294 — 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.
FunctionTooLong: server::boot::shard_main core/server/src/boot/mod.rs:537— FunctionTooLong — server::boot::shard_main runs 428 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 328 over it, 4.28× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: kafka_message_gen::build_payload gateways/kafka/tools/kafka-tool/src/main.rs:256— FunctionTooLong — kafka_message_gen::build_payload runs 330 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 230 over it, 3.30× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: simulator::replica::new_shard core/simulator/src/replica.rs:152— FunctionTooLong — simulator::replica::new_shard runs 275 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 175 over it, 2.75× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: server::partition_helpers::load_partition_or_fence core/server/src/partition_helpers.rs:183— FunctionTooLong — server::partition_helpers::load_partition_or_fence runs 273 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 173 over it, 2.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.
FunctionTooLong: server::boot::recovery::build_shard_for_thread core/server/src/boot/recovery.rs:98— FunctionTooLong — server::boot::recovery::build_shard_for_thread runs 232 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 132 over it, 2.32× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: partitions::segment_recovery::load_persisted_segments_with_checkpoint core/partitions/src/segment_recovery.rs:722— FunctionTooLong — partitions::segment_recovery::load_persisted_segments_with_checkpoint runs 205 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 105 over it, 2.05× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: server::partition_reconciler::reconcile_target core/server/src/partition_reconciler.rs:926— FunctionTooLong — server::partition_reconciler::reconcile_target runs 198 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 98 over it, 1.98× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: iggy_cli::get_command core/cli/src/main.rs:114— FunctionTooLong — iggy_cli::get_command runs 195 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 95 over it, 1.95× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: kafka_message_gen::response::decode_body gateways/kafka/tools/kafka-tool/src/response.rs:208— FunctionTooLong — kafka_message_gen::response::decode_body runs 195 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 95 over it, 1.95× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: server::partition_helpers::load_partition core/server/src/partition_helpers.rs:596— FunctionTooLong — server::partition_helpers::load_partition runs 176 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 76 over it, 1.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.
FunctionTooLong: partitions::segment_recovery::recover_segment_bounds core/partitions/src/segment_recovery.rs:1993— FunctionTooLong — partitions::segment_recovery::recover_segment_bounds runs 160 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) 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.
FunctionTooLong: server::partition_helpers::build_partition_fresh core/server/src/partition_helpers.rs:990— FunctionTooLong — server::partition_helpers::build_partition_fresh runs 156 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 56 over it, 1.56× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: apache_iggy::metadata_changes::change_body foreign/python/src/metadata_changes.rs:1420— FunctionTooLong — apache_iggy::metadata_changes::change_body runs 153 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 53 over it, 1.53× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: server::boot::bootstrap core/server/src/boot/mod.rs:285— FunctionTooLong — server::boot::bootstrap runs 144 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 44 over it, 1.44× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: metadata::stm::authz::authorize core/metadata/src/stm/authz.rs:249— FunctionTooLong — metadata::stm::authz::authorize runs 142 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) 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.
FunctionTooLong: message_bus::replica::handshake::acceptor_handshake core/message_bus/src/replica/handshake.rs:150— FunctionTooLong — message_bus::replica::handshake::acceptor_handshake runs 139 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 39 over it, 1.39× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: message_bus::installer::replica::install_replica_conn core/message_bus/src/installer/replica.rs:393— FunctionTooLong — message_bus::installer::replica::install_replica_conn runs 129 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 29 over it, 1.29× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: partitions::segment_recovery::index_is_consistent core/partitions/src/segment_recovery.rs:2815— FunctionTooLong — partitions::segment_recovery::index_is_consistent runs 122 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 22 over it, 1.22× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: server::http::handlers::poll_messages_impl core/server/src/http/handlers.rs:1301— FunctionTooLong — server::http::handlers::poll_messages_impl runs 116 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 16 over it, 1.16× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: message_bus::replica::io::start_on_shard_zero core/message_bus/src/replica/io.rs:169— FunctionTooLong — message_bus::replica::io::start_on_shard_zero runs 115 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 15 over it, 1.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.
FunctionTooLong: apache_iggy::apache_iggy foreign/python/src/lib.rs:90— FunctionTooLong — apache_iggy::apache_iggy runs 115 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 15 over it, 1.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.
FunctionTooLong: harness_derive::codegen::generate_harness_setup core/harness_derive/src/codegen.rs:389— FunctionTooLong — harness_derive::codegen::generate_harness_setup runs 112 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 12 over it, 1.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.
FunctionTooLong: binaryserialization.decodeChangeBody foreign/go/binary_serialization/metadata_changes_deserializer.go:150— FunctionTooLong — decodeChangeBody runs 105 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 5 over it, 1.05× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: message_bus::installer::tcp::install_client_conn core/message_bus/src/installer/tcp.rs:78— FunctionTooLong — message_bus::installer::tcp::install_client_conn runs 101 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 1 over it, 1.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.
Duplicated block (11 lines × 2) core/ai/mcp/src/configs.rs:307— core/ai/mcp/src/configs.rs:307-317 | core/server/src/http.rs:715-725 — 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 `core/ai/mcp/src/configs.rs:307` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) core/common/src/types/configuration/quic_config/quic_connection_string_options.rs:217— core/common/src/types/configuration/quic_config/quic_connection_string_options.rs:217-227 | core/common/src/types/configuration/tcp_config/tcp_connection_string_options.rs:129-139 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (11 lines × 2) core/common/src/types/permissions/permissions_global.rs:254— core/common/src/types/permissions/permissions_global.rs:254-264 | core/common/src/types/permissions/permissions_global.rs:278-288 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/common/src/types/permissions/permissions_global.rs:254` 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 `value` to `GlobalPermissions` in one and `&TopicPermissions` 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) core/configs/src/configs_impl/typed_env_provider.rs:399— core/configs/src/configs_impl/typed_env_provider.rs:399-409 | core/integration/src/harness/config/resolve.rs:185-195 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `core/configs/src/configs_impl/typed_env_provider.rs:399` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) core/integration/src/harness/handle/connectors_runtime.rs:182— core/integration/src/harness/handle/connectors_runtime.rs:182-192 | core/integration/src/harness/handle/mcp.rs:164-174 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `core/integration/src/harness/handle/connectors_runtime.rs:182` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) core/message_bus/src/transports/tcp_tls.rs:258— core/message_bus/src/transports/tcp_tls.rs:258-268 | core/message_bus/src/transports/wss.rs:258-268 — before extracting anything, compare `core/message_bus/src/transports/tcp_tls.rs` and `core/message_bus/src/transports/wss.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 68 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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) core/message_bus/src/transports/ws.rs:253— core/message_bus/src/transports/ws.rs:253-263 | core/message_bus/src/transports/wss.rs:404-414 — before extracting anything, compare `core/message_bus/src/transports/ws.rs` and `core/message_bus/src/transports/wss.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 96 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 `core/message_bus/src/transports/ws.rs:253` 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) core/object_store/src/contract.rs:354— core/object_store/src/contract.rs:354-364 | core/object_store/src/contract.rs:378-388 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/object_store/src/contract.rs:354` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) gateways/kafka/src/protocol/handlers/alter_configs.rs:104— gateways/kafka/src/protocol/handlers/alter_configs.rs:104-114 | gateways/kafka/src/protocol/handlers/incremental_alter_configs.rs:122-132 — before extracting anything, compare `gateways/kafka/src/protocol/handlers/alter_configs.rs` and `gateways/kafka/src/protocol/handlers/incremental_alter_configs.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 112 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 `gateways/kafka/src/protocol/handlers/alter_configs.rs:104` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (11 lines × 2) core/partitions/src/iggy_partition.rs:8473— core/partitions/src/iggy_partition.rs:8473-8489 | core/partitions/src/iggy_partition.rs:8512-8522 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/partitions/src/iggy_partition.rs:8473` it does not close everything it opens, so those exact lines 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) core/integration/src/harness/handle/client_builder.rs:189— core/integration/src/harness/handle/client_builder.rs:189-199 | core/integration/src/harness/handle/client_builder.rs:256-266 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/integration/src/harness/handle/client_builder.rs:189` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) gateways/kafka/src/protocol/handlers/alter_configs.rs:100— gateways/kafka/src/protocol/handlers/alter_configs.rs:100-110 | gateways/kafka/src/protocol/handlers/describe_configs.rs:103-113 — 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 `gateways/kafka/src/protocol/handlers/alter_configs.rs:100` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) core/partitions/src/segment_recovery.rs:1924— core/partitions/src/segment_recovery.rs:1924-1934 | core/partitions/src/segment_recovery.rs:2827-2837 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/partitions/src/segment_recovery.rs:1924` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) gateways/kafka/src/protocol/handlers/fetch.rs:125— gateways/kafka/src/protocol/handlers/fetch.rs:125-135 | gateways/kafka/src/protocol/handlers/list_offsets.rs:84-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. Read the line range as the matched WINDOW rather than a finished unit: at `gateways/kafka/src/protocol/handlers/fetch.rs:125` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (11 lines × 2) core/kafka_wire/src/bounds_guard.rs:358— core/kafka_wire/src/bounds_guard.rs:358-368 | core/kafka_wire/src/bounds_guard.rs:401-411 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/kafka_wire/src/bounds_guard.rs:358` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `core/kafka_wire/src/bounds_guard.rs:413` calls `remaining` and `core/kafka_wire/src/bounds_guard.rs:370` 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) foreign/java/java-sdk/src/main/java/org/apache/iggy/client/blocking/http/MetadataChangesJson.java:150— foreign/java/java-sdk/src/main/java/org/apache/iggy/client/blocking/http/MetadataChangesJson.java:150-160 | foreign/java/java-sdk/src/main/java/org/apache/iggy/serde/MetadataChangesReader.java:192-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. 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 `body` to `JsonNode` in one and `ByteBuf` 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) foreign/java/java-sdk/src/main/java/org/apache/iggy/serde/BytesSerializer.java:153— foreign/java/java-sdk/src/main/java/org/apache/iggy/serde/BytesSerializer.java:153-163 | foreign/java/java-sdk/src/main/java/org/apache/iggy/serde/BytesSerializer.java:266-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 `foreign/java/java-sdk/src/main/java/org/apache/iggy/serde/BytesSerializer.java:153` 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 (11 lines × 2) foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/MessagesClient.java:272— foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/MessagesClient.java:272-282 | foreign/java/java-sdk/src/main/java/org/apache/iggy/client/blocking/MessagesClient.java:134-144 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/MessagesClient.java:272` 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 (11 lines × 2) foreign/go/contracts/node_status.go:56— foreign/go/contracts/node_status.go:56-66 | foreign/go/contracts/role.go:45-55 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (11 lines × 2) core/bench/src/analytics/time_series/calculator.rs:50— core/bench/src/analytics/time_series/calculator.rs:50-60 | core/bench/src/analytics/time_series/calculator.rs:86-97 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11 lines × 2) examples/java/src/main/java/org/apache/iggy/examples/multitenant/consumer/MultiTenantConsumer.java:286— examples/java/src/main/java/org/apache/iggy/examples/multitenant/consumer/MultiTenantConsumer.java:286-296 | examples/java/src/main/java/org/apache/iggy/examples/multitenant/producer/MultiTenantProducer.java:320-330 — before extracting anything, compare `examples/java/src/main/java/org/apache/iggy/examples/multitenant/consumer/MultiTenantConsumer.java` and `examples/java/src/main/java/org/apache/iggy/examples/multitenant/producer/MultiTenantProducer.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 57 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 (11 lines × 2) examples/java/src/main/java/org/apache/iggy/examples/multitenant/consumer/MultiTenantConsumer.java:329— examples/java/src/main/java/org/apache/iggy/examples/multitenant/consumer/MultiTenantConsumer.java:329-339 | examples/java/src/main/java/org/apache/iggy/examples/multitenant/producer/MultiTenantProducer.java:333-343 — before extracting anything, compare `examples/java/src/main/java/org/apache/iggy/examples/multitenant/consumer/MultiTenantConsumer.java` and `examples/java/src/main/java/org/apache/iggy/examples/multitenant/producer/MultiTenantProducer.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 57 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 (11 lines × 2) examples/python/basic/consumer.py:46— examples/python/basic/consumer.py:46-56 | examples/python/basic/producer.py:39-49 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (11 lines × 2) examples/go/multi-tenant/consumer/main.go:79— examples/go/multi-tenant/consumer/main.go:79-89 | examples/go/multi-tenant/producer/main.go:78-88 — `examples/go/multi-tenant/consumer/main.go` and `examples/go/multi-tenant/producer/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 3 separate duplicated blocks between them, totalling at least 36 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `examples/go/multi-tenant/consumer/main.go:79` 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) core/ai/mcp/src/log.rs:86— core/ai/mcp/src/log.rs:86-94 | core/ai/mcp/src/log.rs:97-105 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/ai/mcp/src/log.rs:86` 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 (9 lines × 2) core/binary_protocol/src/framing.rs:106— core/binary_protocol/src/framing.rs:106-114 | core/binary_protocol/src/framing.rs:182-190 — both copies are in the same file, so extract the 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) core/binary_protocol/src/primitives/metadata_changes/body.rs:808— core/binary_protocol/src/primitives/metadata_changes/body.rs:808-816 | core/binary_protocol/src/primitives/metadata_changes/body.rs:888-896 — both copies are in the same file, so extract the 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) core/binary_protocol/src/primitives/metadata_changes/body.rs:834— core/binary_protocol/src/primitives/metadata_changes/body.rs:834-842 | core/binary_protocol/src/primitives/metadata_changes/body.rs:914-922 — both copies are in the same file, so extract the 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) core/binary_protocol/src/requests/users/create_user.rs:68— core/binary_protocol/src/requests/users/create_user.rs:68-76 | core/binary_protocol/src/requests/users/update_permissions.rs:47-55 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `core/binary_protocol/src/requests/users/create_user.rs:77` calls `encode` and `core/binary_protocol/src/requests/users/update_permissions.rs:56` 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) core/cli/src/args/permissions/global.rs:113— core/cli/src/args/permissions/global.rs:113-121 | core/cli/src/args/permissions/topic.rs:106-114 — 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 `core/cli/src/args/permissions/global.rs:113` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (9 lines × 2) core/metadata/src/stm/stream.rs:1940— core/metadata/src/stm/stream.rs:1940-1948 | core/metadata/src/stm/stream.rs:2053-2061 — both copies are in the same file, so extract the 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) core/shard/src/lib.rs:4584— core/shard/src/lib.rs:4584-4592 | core/shard/src/lib.rs:4651-4659 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/shard/src/lib.rs:4584` 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 `header` to `ForwardRegisterResultHeader` in one and `ForwardLogoutResultHeader` 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) core/simulator/src/workload/state_checker.rs:147— core/simulator/src/workload/state_checker.rs:147-155 | core/simulator/src/workload/state_checker.rs:529-537 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/simulator/src/workload/state_checker.rs:147` it does not close everything it opens, so those exact lines 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) foreign/cpp/src/type_conversion.rs:906— foreign/cpp/src/type_conversion.rs:906-914 | foreign/cpp/src/type_conversion.rs:925-933 — both copies are in the same file, so extract the 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 `topic` to `RustTopic` in one and `RustTopicDetails` 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) foreign/cpp/src/type_conversion.rs:957— foreign/cpp/src/type_conversion.rs:957-965 | foreign/cpp/src/type_conversion.rs:981-989 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `foreign/cpp/src/type_conversion.rs:957` 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 `stream` to `RustStream` in one and `RustStreamDetails` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `foreign/cpp/src/type_conversion.rs:980` calls `into_iter`, `collect` and `foreign/cpp/src/type_conversion.rs:956` 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) foreign/python/src/permissions.rs:67— foreign/python/src/permissions.rs:67-77 | foreign/python/src/permissions.rs:315-323 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `foreign/python/src/permissions.rs:67` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) foreign/python/src/producer.rs:571— foreign/python/src/producer.rs:571-579 | foreign/python/src/producer.rs:610-618 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `foreign/python/src/producer.rs:571` it does not close everything it opens, so those 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, `foreign/python/src/producer.rs:608` calls `extract_send_to_identifier` and `foreign/python/src/producer.rs:570` 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) core/configs_derive/src/config_env.rs:216— core/configs_derive/src/config_env.rs:216-224 | core/configs_derive/src/config_env.rs:327-335 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/configs_derive/src/config_env.rs:216` it does not close everything it opens, so those exact lines 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) core/partitions/src/iggy_partitions.rs:288— core/partitions/src/iggy_partitions.rs:288-296 | core/shard/src/partition_io.rs:226-234 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (9 lines × 2) core/sdk/src/http/http_client.rs:880— core/sdk/src/http/http_client.rs:880-888 | core/server/src/http/forward.rs:1449-1457 — 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 first that the copies are not typed on the same thing: the declarations holding them bind `body` to `&str` in one and `&[u8]` 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) foreign/cpp/src/consumer.rs:62— foreign/cpp/src/consumer.rs:62-70 | foreign/cpp/src/reader.rs:72-81 — before extracting anything, compare `foreign/cpp/src/consumer.rs` and `foreign/cpp/src/reader.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 30 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 `foreign/cpp/src/consumer.rs:62` it does not close everything it opens, so those exact lines 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) core/integration/src/harness/handle/client.rs:131— core/integration/src/harness/handle/client.rs:131-139 | core/integration/src/harness/handle/client.rs:156-164 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/integration/src/harness/handle/client.rs:131` 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) core/metadata/src/impls/metadata.rs:3964— core/metadata/src/impls/metadata.rs:3964-3972 | core/metadata/src/impls/metadata.rs:4068-4076 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/metadata/src/impls/metadata.rs:3964` it does not close everything it opens, so those exact lines 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) core/object_store/src/contract.rs:403— core/object_store/src/contract.rs:403-411 | core/object_store/src/contract.rs:430-438 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/object_store/src/contract.rs:403` 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) foreign/java/java-sdk/src/main/java/org/apache/iggy/serde/BytesDeserializer.java:118— foreign/java/java-sdk/src/main/java/org/apache/iggy/serde/BytesDeserializer.java:118-126 | foreign/java/java-sdk/src/main/java/org/apache/iggy/serde/BytesDeserializer.java:193-201 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) foreign/go/internal/command/topic.go:144— foreign/go/internal/command/topic.go:144-152 | foreign/go/internal/command/topic.go:228-236 — both copies are in the same file, so extract the 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) examples/csharp/src/Basic/Iggy_SDK.Examples.Basic.Consumer/Settings.cs:22— examples/csharp/src/Basic/Iggy_SDK.Examples.Basic.Consumer/Settings.cs:22-30 | examples/csharp/src/Basic/Iggy_SDK.Examples.Basic.Producer/Settings.cs:22-30 — `examples/csharp/src/Basic/Iggy_SDK.Examples.Basic.Consumer/Settings.cs` and `examples/csharp/src/Basic/Iggy_SDK.Examples.Basic.Producer/Settings.cs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 1 separate duplicated blocks between them, totalling at least 9 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `examples/csharp/src/Basic/Iggy_SDK.Examples.Basic.Consumer/Settings.cs:22` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) examples/python/message-envelope/consumer.py:76— examples/python/message-envelope/consumer.py:76-84 | examples/python/message-headers/common.py:223-231 — before extracting anything, compare `examples/python/message-envelope/consumer.py` and `examples/python/message-headers/common.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 50 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: the declarations holding them bind `message_type` to `OrderType | str | None` in one and `OrderType | None` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication· Edited copy of a member (10 corresponding lines) · ×23
Edited copy of a member (10 corresponding lines) core/common/src/utils/crypto.rs:54— core/common/src/utils/crypto.rs:54-63 | core/sdk/src/clients/producer.rs:392-406 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) foreign/swift/Sources/Iggy/Models/MetadataChanges.swift:271— foreign/swift/Sources/Iggy/Models/MetadataChanges.swift:271-280 | foreign/swift/Sources/Iggy/Models/MetadataChanges.swift:334-344 — 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) foreign/swift/Sources/Iggy/Client/IggyClient+Messages.swift:642— foreign/swift/Sources/Iggy/Client/IggyClient+Messages.swift:642-652 | foreign/swift/Sources/Iggy/Client/IggyClient+Messages.swift:654-663 — 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) foreign/go/internal/command/access_token.go:41— foreign/go/internal/command/access_token.go:41-51 | foreign/go/internal/command/access_token.go:71-80 — 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) foreign/cpp/src/consumer.rs:85— foreign/cpp/src/consumer.rs:85-94 | foreign/cpp/src/reader.rs:95-104 — 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) core/partitions/src/iggy_partition.rs:15562— core/partitions/src/iggy_partition.rs:15562-15571 | core/partitions/src/iggy_partition.rs:15588-15597 — 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) foreign/cpp/src/consumer.rs:149— foreign/cpp/src/consumer.rs:149-158 | foreign/cpp/src/reader.rs:166-175 — 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) core/partitions/src/segment_recovery.rs:1160— core/partitions/src/segment_recovery.rs:1160-1169 | core/partitions/src/segment_recovery.rs:1867-1882 — 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) foreign/python/src/client.rs:2364— foreign/python/src/client.rs:2364-2373 | foreign/python/src/client.rs:2402-2411 — 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) core/shard/src/lib.rs:6385— core/shard/src/lib.rs:6385-6397 | core/shard/src/lib.rs:6698-6707 — 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) core/web_ui/src/api.rs:69— core/web_ui/src/api.rs:69-79 | core/web_ui/src/api.rs:134-143 — 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) core/simulator/src/lib.rs:1942— core/simulator/src/lib.rs:1942-1952 | core/simulator/src/lib.rs:2021-2030 — 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) foreign/java/java-sdk/src/main/java/org/apache/iggy/message/HeaderKey.java:31— foreign/java/java-sdk/src/main/java/org/apache/iggy/message/HeaderKey.java:31-40 | foreign/java/java-sdk/src/main/java/org/apache/iggy/message/HeaderValue.java:35-44 — 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) core/sdk/src/stream_builder/iggy_stream.rs:75— core/sdk/src/stream_builder/iggy_stream.rs:75-84 | core/sdk/src/stream_builder/iggy_stream_consumer.rs:74-87 — 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) core/sdk/src/clients/client.rs:687— core/sdk/src/clients/client.rs:687-696 | core/sdk/src/clients/client.rs:757-766 — 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) core/kafka_wire/src/dedup.rs:33— core/kafka_wire/src/dedup.rs:33-42 | gateways/kafka/src/protocol/handlers/delete_topics.rs:207-216 — 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) core/simulator/src/workload/ops/update_permissions.rs:44— core/simulator/src/workload/ops/update_permissions.rs:44-54 | core/simulator/src/workload/ops/delete_user.rs:44-53 — 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) core/web_ui/src/format.rs:104— core/web_ui/src/format.rs:104-114 | gateways/kafka/src/tls/identity.rs:159-168 — 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) foreign/go/client/tcp/tcp_stream_management.go:77— foreign/go/client/tcp/tcp_stream_management.go:77-86 | foreign/go/client/tcp/tcp_user_management.go:78-88 — 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) core/binary_protocol/src/requests/partitions/create_partitions_with_assignments.rs:37— core/binary_protocol/src/requests/partitions/create_partitions_with_assignments.rs:37-46 | core/binary_protocol/src/requests/topics/create_topic_with_assignments.rs:46-57 — 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) foreign/csharp/Iggy_SDK/Consumers/IggyConsumerBuilder.cs:141— foreign/csharp/Iggy_SDK/Consumers/IggyConsumerBuilder.cs:141-150 | foreign/csharp/Iggy_SDK/Publishers/IggyPublisherBuilder.cs:158-167 — 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) foreign/java/external-processors/iggy-connector-flink/iggy-connector-library/src/main/java/org/apache/iggy/connector/flink/sink/IggySink.java:89— foreign/java/external-processors/iggy-connector-flink/iggy-connector-library/src/main/java/org/apache/iggy/connector/flink/sink/IggySink.java:89-98 | foreign/java/external-processors/iggy-connector-flink/iggy-connector-library/src/main/java/org/apache/iggy/connector/flink/source/IggySource.java:90-99 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) core/simulator/src/workload/ops/replace_fixture_topic.rs:57— core/simulator/src/workload/ops/replace_fixture_topic.rs:57-71 | core/simulator/src/workload/ops/leave_fixture_group.rs:55-64 — 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.
IggyPartition::admit_request (cyclomatic 90) core/partitions/src/iggy_partition.rs:7778— IggyPartition::admit_request has cyclomatic complexity 90 (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.
IggyPartition::resume_io_inner (cyclomatic 88) core/partitions/src/iggy_partition.rs:6596— IggyPartition::resume_io_inner has cyclomatic complexity 88 (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.
IggyPartition::on_replicate (cyclomatic 47) core/partitions/src/iggy_partition.rs:9059— IggyPartition::on_replicate has cyclomatic complexity 47 (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.
IggyPartition::drain_request_queue_into_prepares (cyclomatic 43) core/partitions/src/iggy_partition.rs:8648— IggyPartition::drain_request_queue_into_prepares 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.
IggyPartition::drive_install_io (cyclomatic 43) core/partitions/src/state_transfer.rs:3689— IggyPartition::drive_install_io 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.
IggyPartition::accept_install_io (cyclomatic 34) core/partitions/src/state_transfer.rs:4226— IggyPartition::accept_install_io has cyclomatic complexity 34 (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.
IggyPartition::prepare_state_transfer_install (cyclomatic 30) core/partitions/src/state_transfer.rs:4674— IggyPartition::prepare_state_transfer_install has cyclomatic complexity 30 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
IggyPartition::apply_repaired_prepare (cyclomatic 27) core/partitions/src/iggy_partition.rs:14782— IggyPartition::apply_repaired_prepare 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.
IggyPartition::capture_install_io (cyclomatic 26) core/partitions/src/state_transfer.rs:3970— IggyPartition::capture_install_io has cyclomatic complexity 26 (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.
IggyPartition::resynchronize_consumer_offset_reservations_inner (cyclomatic 25) core/partitions/src/iggy_partition.rs:5841— IggyPartition::resynchronize_consumer_offset_reservations_inner 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.
IggyPartition::accept_io (cyclomatic 22) core/partitions/src/iggy_partition.rs:7104— IggyPartition::accept_io 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.
IggyPartition::reanchor_to_offset_frontier (cyclomatic 22) core/partitions/src/iggy_partition.rs:14433— IggyPartition::reanchor_to_offset_frontier 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.
IggyPartition::open_persistence_with_recovered (cyclomatic 21) core/partitions/src/iggy_partition.rs:1820— IggyPartition::open_persistence_with_recovered 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.
IggyPartition::build_poll_plan_within (cyclomatic 20) core/partitions/src/iggy_partition.rs:6064— IggyPartition::build_poll_plan_within has cyclomatic complexity 20 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
IggyPartition::complete_repair (cyclomatic 20) core/partitions/src/iggy_partition.rs:14926— IggyPartition::complete_repair 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.
IggyPartition::drive_validated_commit (cyclomatic 19) core/partitions/src/iggy_partition.rs:11353— IggyPartition::drive_validated_commit has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
IggyPartition::publish_pending_commit (cyclomatic 19) core/partitions/src/iggy_partition.rs:11981— IggyPartition::publish_pending_commit 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.
IggyPartition::capture_io (cyclomatic 18) core/partitions/src/iggy_partition.rs:7005— IggyPartition::capture_io 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.
IggyPartition::build_state_transfer_offer (cyclomatic 17) core/partitions/src/state_transfer.rs:2662— IggyPartition::build_state_transfer_offer 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. This is NOT this file's highest cyclomatic complexity: PartitionInstallError::fmt (cyclomatic 20) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
IggyPartition::drive_materialization (cyclomatic 16) core/partitions/src/iggy_partition.rs:10789— IggyPartition::drive_materialization has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D4 · Code Duplication· Edited copy of a member (16 corresponding lines) · ×20
Edited copy of a member (16 corresponding lines) core/server/src/dispatch/session_ops.rs:702— core/server/src/dispatch/session_ops.rs:702-718 | core/server/src/dispatch/submit.rs:813-828 — 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) foreign/cpp/src/type_conversion.rs:903— foreign/cpp/src/type_conversion.rs:903-918 | foreign/cpp/src/type_conversion.rs:922-942 — 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) core/binary_protocol/src/framing.rs:105— core/binary_protocol/src/framing.rs:105-120 | core/binary_protocol/src/framing.rs:181-196 — 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) core/simulator/src/client.rs:1161— core/simulator/src/client.rs:1161-1176 | core/simulator/src/client.rs:1178-1197 — 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) foreign/java/java-sdk/src/main/java/org/apache/iggy/serde/BytesDeserializer.java:755— foreign/java/java-sdk/src/main/java/org/apache/iggy/serde/BytesDeserializer.java:755-770 | foreign/java/java-sdk/src/main/java/org/apache/iggy/serde/BytesDeserializer.java:780-802 — 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) foreign/php/src/receive_message.rs:288— foreign/php/src/receive_message.rs:288-303 | foreign/python/src/send_message.rs:46-63 — 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) foreign/cpp/src/type_conversion.rs:1798— foreign/cpp/src/type_conversion.rs:1798-1813 | foreign/cpp/src/type_conversion.rs:1817-1832 — 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) core/server/src/boot/handoff.rs:104— core/server/src/boot/handoff.rs:104-119 | core/server/src/boot/handoff.rs:216-233 — 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) foreign/go/internal/codec/reader.go:159— foreign/go/internal/codec/reader.go:159-174 | foreign/go/internal/codec/reader.go:177-192 — 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) core/binary_protocol/src/framing.rs:76— core/binary_protocol/src/framing.rs:76-91 | core/binary_protocol/src/framing.rs:153-173 — 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) core/sdk/src/stream_builder/iggy_stream.rs:43— core/sdk/src/stream_builder/iggy_stream.rs:43-59 | core/sdk/src/stream_builder/iggy_stream_consumer.rs:42-57 — 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) foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/tcp/ConsumerGroupsTcpClient.java:138— foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/tcp/ConsumerGroupsTcpClient.java:138-157 | foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/tcp/ConsumerGroupsTcpClient.java:160-175 — 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) core/shard/src/lib.rs:4581— core/shard/src/lib.rs:4581-4596 | core/shard/src/lib.rs:4648-4663 — 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) core/partitions/src/segment_recovery.rs:1752— core/partitions/src/segment_recovery.rs:1752-1767 | core/partitions/src/segment_recovery.rs:1884-1899 — 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) core/binary_protocol/src/requests/topics/create_topic.rs:62— core/binary_protocol/src/requests/topics/create_topic.rs:62-78 | core/binary_protocol/src/version.rs:213-228 — 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) core/message_bus/src/installer/replica.rs:212— core/message_bus/src/installer/replica.rs:212-228 | core/message_bus/src/installer/replica.rs:366-381 — 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) foreign/go/client/tcp/tcp_stream_management.go:38— foreign/go/client/tcp/tcp_stream_management.go:38-55 | foreign/go/client/tcp/tcp_topic_management.go:38-53 — 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) core/message_bus/src/transports/ws.rs:303— core/message_bus/src/transports/ws.rs:303-318 | core/message_bus/src/transports/wss.rs:457-484 — 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) foreign/python/src/permissions.rs:90— foreign/python/src/permissions.rs:90-105 | foreign/python/src/permissions.rs:368-383 — 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) core/sdk/src/http/streams.rs:63— core/sdk/src/http/streams.rs:63-79 | core/sdk/src/http/personal_access_tokens.rs:52-67 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (12 corresponding lines) · ×20
Edited copy of a member (12 corresponding lines) core/simulator/src/deps.rs:288— core/simulator/src/deps.rs:288-314 | core/simulator/src/deps.rs:561-572 — 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) gateways/kafka/src/bridge/iggy_bridge/topics.rs:300— gateways/kafka/src/bridge/iggy_bridge/topics.rs:300-317 | gateways/kafka/src/bridge/iggy_bridge/topics.rs:369-380 — 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) core/consensus/src/vsr_timeout.rs:290— core/consensus/src/vsr_timeout.rs:290-301 | core/consensus/src/vsr_timeout.rs:315-327 — 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) foreign/csharp/Iggy_SDK/Vsr/LoginRegister.cs:51— foreign/csharp/Iggy_SDK/Vsr/LoginRegister.cs:51-65 | foreign/csharp/Iggy_SDK/Vsr/LoginRegister.cs:68-79 — 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) core/configs/src/common/http.rs:142— core/configs/src/common/http.rs:142-153 | core/configs/src/common/http.rs:155-166 — 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) core/binary_protocol/src/requests/users/update_permissions.rs:45— core/binary_protocol/src/requests/users/update_permissions.rs:45-56 | core/binary_protocol/src/responses/users/get_user.rs:47-61 — 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) core/simulator/src/lib.rs:2069— core/simulator/src/lib.rs:2069-2080 | core/simulator/src/lib.rs:2085-2098 — 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) foreign/php/src/client.rs:552— foreign/php/src/client.rs:552-564 | foreign/php/src/client.rs:879-890 — 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) foreign/csharp/Iggy_SDK/IggyClient/Implementations/TcpMessageStream.cs:590— foreign/csharp/Iggy_SDK/IggyClient/Implementations/TcpMessageStream.cs:590-601 | foreign/csharp/Iggy_SDK/IggyClient/Implementations/TcpMessageStream.cs:606-617 — 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) foreign/csharp/Iggy_SDK/IggyClient/Implementations/TcpMessageStream.cs:257— foreign/csharp/Iggy_SDK/IggyClient/Implementations/TcpMessageStream.cs:257-268 | foreign/csharp/Iggy_SDK/IggyClient/Implementations/TcpMessageStream.cs:273-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) core/binary_protocol/src/consensus/header.rs:1714— core/binary_protocol/src/consensus/header.rs:1714-1725 | core/binary_protocol/src/consensus/header.rs:2129-2142 — 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) foreign/csharp/Iggy_SDK/IggyClient/Implementations/TcpMessageStream.cs:856— foreign/csharp/Iggy_SDK/IggyClient/Implementations/TcpMessageStream.cs:856-867 | foreign/csharp/Iggy_SDK/IggyClient/Implementations/TcpMessageStream.cs:887-898 — 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) core/simulator/src/workload/ops/create_consumer_group.rs:107— core/simulator/src/workload/ops/create_consumer_group.rs:107-121 | core/simulator/src/workload/ops/delete_consumer_group.rs:103-114 — 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) foreign/go/internal/codec/writer.go:105— foreign/go/internal/codec/writer.go:105-116 | foreign/go/internal/codec/writer.go:131-142 — 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) core/server/src/http/state.rs:254— core/server/src/http/state.rs:254-265 | core/server/src/dispatch/mod.rs:576-587 — 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) core/common/src/types/metadata_changes/records.rs:851— core/common/src/types/metadata_changes/records.rs:851-864 | core/common/src/types/metadata_changes/records.rs:870-881 — 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) core/partitions/src/iggy_index_writer.rs:175— core/partitions/src/iggy_index_writer.rs:175-186 | core/partitions/src/messages_writer.rs:180-191 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) core/common/src/types/segment.rs:50— core/common/src/types/segment.rs:50-61 | core/partitions/src/segment.rs:70-83 — 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) core/common/src/types/configuration/websocket_config/websocket_client_config.rs:195— core/common/src/types/configuration/websocket_config/websocket_client_config.rs:195-206 | core/configs/src/server_config/websocket.rs:101-114 — 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) core/bench/dashboard/frontend/src/pages/explore/catalog.rs:456— core/bench/dashboard/frontend/src/pages/explore/catalog.rs:456-467 | core/bench/dashboard/frontend/src/pages/run/facts.rs:118-134 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (5 corresponding lines) · ×20
Edited copy of a member (5 corresponding lines) foreign/swift/Sources/Iggy/Client/IggyClient+Resources.swift:188— foreign/swift/Sources/Iggy/Client/IggyClient+Resources.swift:188-192 | foreign/swift/Sources/Iggy/Client/IggyClient+Resources.swift:195-201 — 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) foreign/swift/Sources/Iggy/Models/MetadataChanges.swift:1236— foreign/swift/Sources/Iggy/Models/MetadataChanges.swift:1236-1241 | foreign/swift/Sources/Iggy/Models/MetadataChanges.swift:1246-1250 — 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) foreign/swift/Sources/Iggy/Client/IggyClient+Resources.swift:27— foreign/swift/Sources/Iggy/Client/IggyClient+Resources.swift:27-31 | foreign/swift/Sources/Iggy/Client/IggyClient+Resources.swift:208-212 — 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) foreign/swift/Sources/Iggy/Utilities/UInt128Value.swift:41— foreign/swift/Sources/Iggy/Utilities/UInt128Value.swift:41-45 | foreign/swift/Sources/Iggy/Utilities/UInt128Value.swift:69-74 — 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) core/partitions/src/remote_segments.rs:316— core/partitions/src/remote_segments.rs:316-321 | core/sdk/src/vsr.rs:335-339 — 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) foreign/java/java-sdk/src/main/java/org/apache/iggy/client/blocking/http/HttpOptionValue.java:157— foreign/java/java-sdk/src/main/java/org/apache/iggy/client/blocking/http/HttpOptionValue.java:157-163 | foreign/java/java-sdk/src/main/java/org/apache/iggy/system/MetadataChangeEncoding.java:48-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.
Edited copy of a member (5 corresponding lines) core/binary_protocol/src/requests/streams/update_stream_resolved.rs:52— core/binary_protocol/src/requests/streams/update_stream_resolved.rs:52-56 | core/binary_protocol/src/requests/topics/update_topic_resolved.rs:54-59 — 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) foreign/php/src/metadata_changes.rs:1667— foreign/php/src/metadata_changes.rs:1667-1674 | foreign/python/src/metadata_changes.rs:1262-1322 — 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) foreign/csharp/Iggy_SDK/IggyClient/Implementations/HttpMessageStream.cs:342— foreign/csharp/Iggy_SDK/IggyClient/Implementations/HttpMessageStream.cs:342-346 | foreign/csharp/Iggy_SDK/IggyClient/Implementations/TcpMessageStream.cs:417-422 — 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) core/common/src/types/stream/mod.rs:133— core/common/src/types/stream/mod.rs:133-137 | foreign/php/src/stream.rs:75-80 — 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) foreign/go/contracts/partitions.go:143— foreign/go/contracts/partitions.go:143-151 | foreign/go/contracts/user_headers.go:59-63 — 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) core/binary_protocol/src/requests/streams/update_stream_resolved.rs:46— core/binary_protocol/src/requests/streams/update_stream_resolved.rs:46-50 | core/binary_protocol/src/requests/topics/update_topic_resolved.rs: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.
Edited copy of a member (5 corresponding lines) foreign/csharp/Iggy_SDK/IggyClient/Implementations/HttpMessageStream.cs:351— foreign/csharp/Iggy_SDK/IggyClient/Implementations/HttpMessageStream.cs:351-355 | foreign/csharp/Iggy_SDK/IggyClient/Implementations/TcpMessageStream.cs:391-395 — 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) foreign/csharp/Iggy_SDK/IggyClient/Implementations/TcpMessageStream.cs:408— foreign/csharp/Iggy_SDK/IggyClient/Implementations/TcpMessageStream.cs:408-412 | foreign/csharp/Iggy_SDK/IggyClient/Implementations/HttpMessageStream.cs:351-355 — 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) core/sdk/src/clients/consumer.rs:1025— core/sdk/src/clients/consumer.rs:1025-1029 | core/sdk/src/clients/reader.rs:640-644 — 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) foreign/csharp/Iggy_SDK/IggyClient/Implementations/HttpMessageStream.cs:435— foreign/csharp/Iggy_SDK/IggyClient/Implementations/HttpMessageStream.cs:435-439 | foreign/csharp/Iggy_SDK/IggyClient/Implementations/TcpMessageStream.cs:353-357 — 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) foreign/csharp/Iggy_SDK/IggyClient/Implementations/TcpMessageStream.cs:373— foreign/csharp/Iggy_SDK/IggyClient/Implementations/TcpMessageStream.cs:373-377 | foreign/csharp/Iggy_SDK/IggyClient/Implementations/HttpMessageStream.cs:435-439 — 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) foreign/php/src/metadata_changes.rs:1705— foreign/php/src/metadata_changes.rs:1705-1711 | foreign/python/src/metadata_changes.rs:1262-1347 — 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) foreign/python/src/config.rs:1540— foreign/python/src/config.rs:1540-1544 | foreign/python/src/producer.rs:881-885 — 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) core/ai/mcp/src/systemd.rs:21— core/ai/mcp/src/systemd.rs:21-25 | core/server/src/boot/systemd.rs:27-31 — 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 (15 corresponding lines) · ×19
Edited copy of a member (15 corresponding lines) foreign/php/src/client.rs:624— foreign/php/src/client.rs:624-639 | foreign/php/src/client.rs:654-668 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) core/binary_protocol/src/responses/system/describe_options.rs:157— core/binary_protocol/src/responses/system/describe_options.rs:157-171 | core/binary_protocol/src/responses/topics/get_topics.rs:65-79 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) core/message_bus/src/replica/handshake.rs:507— core/message_bus/src/replica/handshake.rs:507-523 | core/message_bus/src/replica/handshake.rs:534-548 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) core/partitions/src/log.rs:297— core/partitions/src/log.rs:297-311 | core/partitions/src/log.rs:319-333 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) foreign/java/java-sdk/src/main/java/org/apache/iggy/client/blocking/http/InternalHttpClient.java:155— foreign/java/java-sdk/src/main/java/org/apache/iggy/client/blocking/http/InternalHttpClient.java:155-173 | foreign/java/java-sdk/src/main/java/org/apache/iggy/client/blocking/http/InternalHttpClient.java:476-490 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) core/binary_protocol/src/consensus/header.rs:2898— core/binary_protocol/src/consensus/header.rs:2898-2912 | core/binary_protocol/src/consensus/header.rs:3091-3105 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) core/shard/src/lib.rs:1656— core/shard/src/lib.rs:1656-1676 | core/shard/src/lib.rs:1685-1699 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) core/server/src/dispatch/session_ops.rs:963— core/server/src/dispatch/session_ops.rs:963-979 | core/server/src/dispatch/session_ops.rs:995-1009 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) core/binary_protocol/src/codec.rs:161— core/binary_protocol/src/codec.rs:161-179 | core/binary_protocol/src/codec.rs:238-252 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) foreign/java/java-sdk/src/main/java/org/apache/iggy/serde/MetadataChangesReader.java:204— foreign/java/java-sdk/src/main/java/org/apache/iggy/serde/MetadataChangesReader.java:204-218 | foreign/java/java-sdk/src/main/java/org/apache/iggy/serde/MetadataChangesReader.java:403-419 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) foreign/csharp/Iggy_SDK/Mappers/BinaryMapper.cs:945— foreign/csharp/Iggy_SDK/Mappers/BinaryMapper.cs:945-969 | foreign/csharp/Iggy_SDK/Mappers/BinaryMapper.cs:1002-1016 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) core/binary_protocol/src/requests/streams/update_stream_resolved.rs:60— core/binary_protocol/src/requests/streams/update_stream_resolved.rs:60-74 | core/binary_protocol/src/requests/topics/update_topic_resolved.rs:63-80 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) core/ai/mcp/src/service/mod.rs:888— core/ai/mcp/src/service/mod.rs:888-902 | core/cli/src/args/common.rs:160-174 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) core/binary_protocol/src/requests/partitions/create_partitions_with_assignments.rs:48— core/binary_protocol/src/requests/partitions/create_partitions_with_assignments.rs:48-62 | core/binary_protocol/src/requests/topics/create_topic_with_assignments.rs:59-78 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) foreign/swift/Sources/Iggy/Consumer/IggyConsumer.swift:106— foreign/swift/Sources/Iggy/Consumer/IggyConsumer.swift:106-120 | foreign/swift/Sources/Iggy/Consumer/PartitionReader.swift:524-538 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) gateways/kafka/src/protocol/handlers/alter_configs.rs:138— gateways/kafka/src/protocol/handlers/alter_configs.rs:138-152 | gateways/kafka/src/protocol/handlers/incremental_alter_configs.rs:156-170 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) examples/java/src/main/java/org/apache/iggy/examples/multitenant/consumer/MultiTenantConsumer.java:218— examples/java/src/main/java/org/apache/iggy/examples/multitenant/consumer/MultiTenantConsumer.java:218-233 | examples/java/src/main/java/org/apache/iggy/examples/multitenant/producer/MultiTenantProducer.java:232-246 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) core/bench/report/src/plotting/chart.rs:246— core/bench/report/src/plotting/chart.rs:246-260 | core/bench/report/src/plotting/chart.rs:306-321 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) examples/python/getting-started/consumer.py:158— examples/python/getting-started/consumer.py:158-175 | examples/python/getting-started/producer.py:155-169 — 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 (9 corresponding lines) · ×19
Edited copy of a member (9 corresponding lines) foreign/swift/Sources/Iggy/Client/PollRouter.swift:748— foreign/swift/Sources/Iggy/Client/PollRouter.swift:748-756 | foreign/swift/Sources/Iggy/Client/PollRouter.swift:758-766 — 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) foreign/java/java-sdk/src/main/java/org/apache/iggy/client/blocking/http/MetadataChangesJson.java:423— foreign/java/java-sdk/src/main/java/org/apache/iggy/client/blocking/http/MetadataChangesJson.java:423-431 | foreign/java/java-sdk/src/main/java/org/apache/iggy/client/blocking/http/MetadataChangesJson.java:433-441 — 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) foreign/cpp/src/consumer.rs:139— foreign/cpp/src/consumer.rs:139-147 | foreign/cpp/src/reader.rs:149-157 — 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) gateways/kafka/src/coordinator/mod.rs:1492— gateways/kafka/src/coordinator/mod.rs:1492-1501 | gateways/kafka/src/coordinator/mod.rs:1506-1514 — 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) foreign/java/java-sdk/src/main/java/org/apache/iggy/serde/BytesDeserializer.java:217— foreign/java/java-sdk/src/main/java/org/apache/iggy/serde/BytesDeserializer.java:217-225 | foreign/java/java-sdk/src/main/java/org/apache/iggy/serde/BytesDeserializer.java:236-251 — 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) core/server/src/dispatch/submit.rs:767— core/server/src/dispatch/submit.rs:767-775 | core/server/src/dispatch/submit.rs:781-789 — 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) core/server/src/stream_key_rewrapper.rs:221— core/server/src/stream_key_rewrapper.rs:221-234 | core/server/src/stream_keys.rs:159-167 — 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) foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/tcp/ConsumerOffsetsTcpClient.java:119— foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/tcp/ConsumerOffsetsTcpClient.java:119-127 | foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/tcp/ConsumerOffsetsTcpClient.java:135-143 — 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) core/binary_protocol/src/primitives/metadata_changes/body.rs:1288— core/binary_protocol/src/primitives/metadata_changes/body.rs:1288-1296 | core/binary_protocol/src/primitives/metadata_changes/body.rs:1337-1346 — 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) core/server_common/src/bootstrap.rs:159— core/server_common/src/bootstrap.rs:159-167 | core/server_common/src/fs_utils.rs:282-290 — 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) core/common/src/wire_conversions.rs:80— core/common/src/wire_conversions.rs:80-90 | core/common/src/wire_conversions.rs:204-212 — 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) core/cli/src/commands/binary_context/delete_context.rs:51— core/cli/src/commands/binary_context/delete_context.rs:51-59 | core/cli/src/commands/binary_context/use_context.rs:59-69 — 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) core/simulator/src/workload/ops/update_stream.rs:83— core/simulator/src/workload/ops/update_stream.rs:83-91 | core/simulator/src/workload/ops/update_topic.rs:137-146 — 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) gateways/kafka/src/protocol/api.rs:892— gateways/kafka/src/protocol/api.rs:892-901 | gateways/kafka/src/protocol/handlers/mod.rs:302-310 — 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) foreign/go/client/tcp/tcp_driver.go:655— foreign/go/client/tcp/tcp_driver.go:655-663 | foreign/go/client/tcp/tcp_messaging.go:346-354 — 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) examples/java/src/main/java/org/apache/iggy/examples/gettingstarted/producer/GettingStartedProducer.java:112— examples/java/src/main/java/org/apache/iggy/examples/gettingstarted/producer/GettingStartedProducer.java:112-120 | examples/java/src/main/java/org/apache/iggy/examples/tcptls/producer/TcpTlsProducer.java:133-141 — 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) core/bench/src/utils/client_factory.rs:159— core/bench/src/utils/client_factory.rs:159-168 | core/bench/src/utils/client_factory.rs:196-204 — 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) core/bench/dashboard/frontend/src/pages/compare/mod.rs:251— core/bench/dashboard/frontend/src/pages/compare/mod.rs:251-259 | core/bench/dashboard/frontend/src/pages/compare/releases/mod.rs:122-130 — 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) examples/go/multi-tenant/consumer/main.go:182— examples/go/multi-tenant/consumer/main.go:182-190 | examples/go/multi-tenant/producer/main.go:191-200 — 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.
Duplicated block (5 lines × 2) core/journal/src/prepare_journal.rs:930— core/journal/src/prepare_journal.rs:930-934 | core/journal/src/prepare_journal.rs:1182-1186 — both copies are in the same file, so extract the 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) core/message_bus/src/lifecycle/connection_registry.rs:364— core/message_bus/src/lifecycle/connection_registry.rs:364-368 | core/message_bus/src/lifecycle/connection_registry.rs:401-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. Read the line range as the matched WINDOW rather than a finished unit: at `core/message_bus/src/lifecycle/connection_registry.rs:364` it does not close everything it opens, so those exact lines 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) core/metadata/src/stm/stream.rs:2259— core/metadata/src/stm/stream.rs:2259-2263 | core/metadata/src/stm/stream.rs:2343-2347 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/metadata/src/stm/stream.rs:2259` it does not close everything it opens, so those exact lines 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) core/object_store/src/s3/mod.rs:452— core/object_store/src/s3/mod.rs:452-456 | core/object_store/src/s3/mod.rs:540-544 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/object_store/src/s3/mod.rs:452` 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) core/partitions/src/segment_recovery.rs:3211— core/partitions/src/segment_recovery.rs:3211-3215 | core/partitions/src/segment_recovery.rs:3339-3343 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/partitions/src/segment_recovery.rs:3211` 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: `core/partitions/src/segment_recovery.rs:3211` is reached only past a guard at line 3184 that tests `self.file_len` and leaves the function early, and `core/partitions/src/segment_recovery.rs:3339` reads `self.file_len` with no such check. What separates these copies is not which lines they run but which PRECONDITION they enforce, so one of them is operating on state the other one refuses. Decide which is intended BEFORE unifying them — extract the shared part and whichever copy is missing the check keeps running unchecked, and if the guard is the correct behaviour then that hole is already live.
Duplicated block (5 lines × 2) core/shard/src/lib.rs:2346— core/shard/src/lib.rs:2346-2350 | core/shard/src/lib.rs:3308-3312 — both copies are in the same file, so extract the 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) foreign/csharp/Iggy_SDK/Consumers/IggyConsumerBuilder.cs:289— foreign/csharp/Iggy_SDK/Consumers/IggyConsumerBuilder.cs:289-293 | foreign/csharp/Iggy_SDK/Publishers/IggyPublisherBuilder.cs:375-379 — 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) foreign/csharp/Iggy_SDK/Identifier.cs:53— foreign/csharp/Iggy_SDK/Identifier.cs:53-57 | foreign/csharp/Iggy_SDK/Kinds/Partitioning.cs:52-56 — 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) core/binary_protocol/src/requests/users/login_register.rs:217— core/binary_protocol/src/requests/users/login_register.rs:217-221 | core/binary_protocol/src/requests/users/login_register_with_pat.rs:122-126 — before extracting anything, compare `core/binary_protocol/src/requests/users/login_register.rs` and `core/binary_protocol/src/requests/users/login_register_with_pat.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 34 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 2) foreign/python/src/config.rs:1527— foreign/python/src/config.rs:1527-1531 | foreign/python/src/producer.rs:866-870 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (5 lines × 2) core/partitions/src/segment_recovery.rs:3384— core/partitions/src/segment_recovery.rs:3384-3388 | core/sdk/src/vsr.rs:329-333 — 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) core/common/src/types/message/iggy_message.rs:618— core/common/src/types/message/iggy_message.rs:618-622 | core/common/src/types/message/iggy_message.rs:628-634 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/common/src/types/message/iggy_message.rs:618` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (5 lines × 2) gateways/kafka/tools/kafka-tool/src/response.rs:365— gateways/kafka/tools/kafka-tool/src/response.rs:365-369 | gateways/kafka/tools/kafka-tool/src/response.rs:396-400 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `gateways/kafka/tools/kafka-tool/src/response.rs: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.
Duplicated block (5 lines × 2) foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/tcp/PartitionsTcpClient.java:61— foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/tcp/PartitionsTcpClient.java:61-65 | foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/tcp/PartitionsTcpClient.java:76-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.
Duplicated block (5 lines × 2) foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/tcp/StreamsTcpClient.java:111— foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/tcp/StreamsTcpClient.java:111-115 | foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/tcp/UsersTcpClient.java:103-107 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. 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 `update` to `StreamUpdate` in one and `UserUpdate` 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) foreign/java/java-sdk/src/main/java/org/apache/iggy/client/blocking/http/StreamsHttpClient.java:69— foreign/java/java-sdk/src/main/java/org/apache/iggy/client/blocking/http/StreamsHttpClient.java:69-73 | foreign/java/java-sdk/src/main/java/org/apache/iggy/client/blocking/http/UsersHttpClient.java:85-89 — 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 first that the copies are not typed on the same thing: the declarations holding them bind `update` to `StreamUpdate` in one and `UserUpdate` 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) foreign/go/binary_serialization/binary_response_deserializer.go:113— foreign/go/binary_serialization/binary_response_deserializer.go:113-117 | foreign/go/binary_serialization/binary_response_deserializer.go:646-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.
Duplicated block (5 lines × 2) foreign/go/client/reader/reader.go:832— foreign/go/client/reader/reader.go:832-836 | foreign/go/client/reader/reader.go:998-1002 — both copies are in the same file, so extract the 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) foreign/swift/Sources/Iggy/Client/IggyClient+Messages.swift:345— foreign/swift/Sources/Iggy/Client/IggyClient+Messages.swift:345-349 | foreign/swift/Sources/Iggy/Client/IggyClient+Messages.swift:366-370 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
server::boot::shard_main (cyclomatic 37) core/server/src/boot/mod.rs:537— server::boot::shard_main has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
server::partition_helpers::load_partition_or_fence (cyclomatic 31) core/server/src/partition_helpers.rs:183— server::partition_helpers::load_partition_or_fence has cyclomatic complexity 31 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
server::consumer_group::liveness::sweep_retirement (cyclomatic 29) core/server/src/consumer_group/liveness.rs:743— server::consumer_group::liveness::sweep_retirement has cyclomatic complexity 29 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
server::dispatch::submit::handle_metadata_submit (cyclomatic 29) core/server/src/dispatch/submit.rs:76— server::dispatch::submit::handle_metadata_submit has cyclomatic complexity 29 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
server::dispatch::reads::handle_non_replicated_request (cyclomatic 27) core/server/src/dispatch/reads.rs:372— server::dispatch::reads::handle_non_replicated_request 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.
server::dispatch::handle_client_request (cyclomatic 23) core/server/src/dispatch/mod.rs:893— server::dispatch::handle_client_request 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.
server::partition_reconciler::reconcile_target (cyclomatic 23) core/server/src/partition_reconciler.rs:926— server::partition_reconciler::reconcile_target 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.
server::http::forward::serve_partition (cyclomatic 19) core/server/src/http/forward.rs:551— server::http::forward::serve_partition 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.
server::partition_helpers::build_partition_fresh (cyclomatic 19) core/server/src/partition_helpers.rs:990— server::partition_helpers::build_partition_fresh 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.
server::consumer_group::liveness::retire_session (cyclomatic 18) core/server/src/consumer_group/liveness.rs:593— server::consumer_group::liveness::retire_session 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.
server::http::forward::attach_partition_request (cyclomatic 18) core/server/src/http/forward.rs:979— server::http::forward::attach_partition_request 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.
server::partition_reconciler::reconcile_group_offsets (cyclomatic 18) core/server/src/partition_reconciler.rs:1522— server::partition_reconciler::reconcile_group_offsets 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.
server::dispatch::enqueue_client_request (cyclomatic 17) core/server/src/dispatch/mod.rs:212— server::dispatch::enqueue_client_request 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.
server::boot::credentials::initialize_root_user (cyclomatic 16) core/server/src/boot/credentials.rs:76— server::boot::credentials::initialize_root_user 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.
server::boot::threads::validate_sharding_runtime_knobs (cyclomatic 16) core/server/src/boot/threads.rs:580— server::boot::threads::validate_sharding_runtime_knobs has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
server::partition_helpers::load_partition (cyclomatic 16) core/server/src/partition_helpers.rs:596— server::partition_helpers::load_partition has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
server::partition_reconciler::reconcile_retired_lifecycles (cyclomatic 16) core/server/src/partition_reconciler.rs:2181— server::partition_reconciler::reconcile_retired_lifecycles 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.
D4 · Code Duplication· Edited copy of a member (6 corresponding lines) · ×17
Edited copy of a member (6 corresponding lines) foreign/swift/Sources/Iggy/Protocol/Requests.swift:142— foreign/swift/Sources/Iggy/Protocol/Requests.swift:142-150 | foreign/swift/Sources/Iggy/Protocol/Requests.swift:158-163 — 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) foreign/swift/Sources/Iggy/Models/StreamOptions.swift:93— foreign/swift/Sources/Iggy/Models/StreamOptions.swift:93-98 | foreign/swift/Sources/Iggy/Models/UserOptions.swift:56-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) foreign/csharp/Iggy_SDK/IggyClient/Implementations/HttpMessageStream.cs:313— foreign/csharp/Iggy_SDK/IggyClient/Implementations/HttpMessageStream.cs:313-318 | foreign/csharp/Iggy_SDK/IggyClient/Implementations/TcpMessageStream.cs:342-347 — 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) core/binary_protocol/src/requests/personal_access_tokens/create_personal_access_token.rs:44— core/binary_protocol/src/requests/personal_access_tokens/create_personal_access_token.rs:44-49 | core/binary_protocol/src/responses/personal_access_tokens/get_personal_access_tokens.rs:47-53 — 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) gateways/kafka/src/bridge/iggy_bridge/mod.rs:159— gateways/kafka/src/bridge/iggy_bridge/mod.rs:159-164 | gateways/kafka/src/protocol/handlers/create_partitions.rs:501-506 — 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) core/message_bus/src/lib.rs:1469— core/message_bus/src/lib.rs:1469-1478 | core/metadata/src/impls/metadata.rs:1732-1737 — 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) foreign/swift/Sources/Iggy/Models/MetadataChanges.swift:46— foreign/swift/Sources/Iggy/Models/MetadataChanges.swift:46-51 | foreign/swift/Sources/Iggy/Models/UserHeaders.swift:68-73 — 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) core/bench/dashboard/frontend/src/components/select_field.rs:81— core/bench/dashboard/frontend/src/components/select_field.rs:81-86 | gateways/kafka/src/group/state.rs:297-302 — 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) core/binary_protocol/src/requests/segments/delete_segments.rs:40— core/binary_protocol/src/requests/segments/delete_segments.rs:40-45 | core/metadata/src/stm/consumer_group.rs:1030-1036 — 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) core/binary_protocol/src/requests/messages/send_messages.rs:230— core/binary_protocol/src/requests/messages/send_messages.rs:230-235 | core/metadata/src/stm/consumer_group.rs:427-433 — 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) core/sdk/src/http/streams.rs:94— core/sdk/src/http/streams.rs:94-99 | core/sdk/src/http/topics.rs:94-102 — 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) core/binary_protocol/src/consensus/header.rs:88— core/binary_protocol/src/consensus/header.rs:88-93 | core/binary_protocol/src/consensus/reply_result.rs:46-51 — 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) foreign/csharp/Iggy_SDK/Headers/HeaderKey.cs:91— foreign/csharp/Iggy_SDK/Headers/HeaderKey.cs:91-96 | foreign/csharp/Iggy_SDK/Identifier.cs:172-177 — 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) core/partitions/src/iggy_partition.rs:6360— core/partitions/src/iggy_partition.rs:6360-6365 | core/simulator/src/bus.rs:195-200 — 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) core/partitions/src/iggy_partitions.rs:145— core/partitions/src/iggy_partitions.rs:145-150 | core/partitions/src/io.rs:286-291 — 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) examples/python/basic/consumer.py:60— examples/python/basic/consumer.py:60-65 | examples/python/basic/producer.py:53-59 — 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) core/bench/dashboard/frontend/src/pages/run/chart.rs:446— core/bench/dashboard/frontend/src/pages/run/chart.rs:446-451 | core/bench/report/src/types/time_series.rs:54-59 — 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 (12 lines × 2) core/binary_protocol/src/primitives/user_headers.rs:168— core/binary_protocol/src/primitives/user_headers.rs:168-179 | core/binary_protocol/src/primitives/user_headers.rs:182-193 — both copies are in the same file, so extract the 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) core/common/src/wire_conversions.rs:624— core/common/src/wire_conversions.rs:624-635 | foreign/cpp/src/type_conversion.rs:366-377 — 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 `core/common/src/wire_conversions.rs:624` 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) core/consensus/src/impls.rs:4166— core/consensus/src/impls.rs:4166-4177 | core/consensus/src/impls.rs:4379-4390 — both copies are in the same file, so extract the 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) core/partitions/src/iggy_partition.rs:9210— core/partitions/src/iggy_partition.rs:9210-9221 | core/partitions/src/iggy_partition.rs:9422-9433 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/partitions/src/iggy_partition.rs:9210` 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) core/partitions/src/io.rs:1344— core/partitions/src/io.rs:1344-1355 | core/partitions/src/partition_storage.rs:613-624 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (12 lines × 2) core/shard/src/lib.rs:11979— core/shard/src/lib.rs:11979-11990 | core/shard/src/lib.rs:12211-12222 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/shard/src/lib.rs:11979` it does not close everything it opens, so those exact lines 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) foreign/python/src/config.rs:375— foreign/python/src/config.rs:375-386 | foreign/python/src/config.rs:1415-1426 — both copies are in the same file, so extract the 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, `foreign/python/src/config.rs:387` calls `Some` and `foreign/python/src/config.rs:1428` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (12 lines × 2) foreign/php/src/identifier.rs:57— foreign/php/src/identifier.rs:57-68 | foreign/python/src/identifier.rs:61-72 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (12 lines × 2) core/partitions/src/iggy_partitions.rs:958— core/partitions/src/iggy_partitions.rs:958-969 | core/partitions/src/iggy_partitions.rs:983-994 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/partitions/src/iggy_partitions.rs:958` it does not close everything it opens, so those 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, `core/partitions/src/iggy_partitions.rs:972` calls `header` and `core/partitions/src/iggy_partitions.rs:998` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (12 lines × 2) gateways/kafka/src/bridge/iggy_bridge/mod.rs:226— gateways/kafka/src/bridge/iggy_bridge/mod.rs:226-237 | gateways/kafka/src/bridge/iggy_bridge/reach.rs:71-82 — 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 (12 lines × 2) core/message_bus/src/client_listener/tcp_tls.rs:113— core/message_bus/src/client_listener/tcp_tls.rs:113-124 | core/message_bus/src/client_listener/wss.rs:107-118 — before extracting anything, compare `core/message_bus/src/client_listener/tcp_tls.rs` and `core/message_bus/src/client_listener/wss.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/message_bus/src/client_listener/tcp_tls.rs:113` 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) core/server/src/dispatch/session_ops.rs:496— core/server/src/dispatch/session_ops.rs:496-507 | core/server/src/dispatch/session_ops.rs:764-775 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/server/src/dispatch/session_ops.rs:496` 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) foreign/java/external-processors/iggy-connector-flink/iggy-connector-library/src/main/java/org/apache/iggy/connector/flink/sink/IggyCommittable.java:50— foreign/java/external-processors/iggy-connector-flink/iggy-connector-library/src/main/java/org/apache/iggy/connector/flink/sink/IggyCommittable.java:50-61 | foreign/java/external-processors/iggy-connector-flink/iggy-connector-library/src/main/java/org/apache/iggy/connector/flink/source/IggySourceSplit.java:52-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.
Duplicated block (12 lines × 2) foreign/java/java-sdk/src/main/java/org/apache/iggy/stream/StreamDetails.java:49— foreign/java/java-sdk/src/main/java/org/apache/iggy/stream/StreamDetails.java:49-60 | foreign/java/java-sdk/src/main/java/org/apache/iggy/topic/TopicDetails.java:50-61 — 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 (12 lines × 2) foreign/go/binary_serialization/binary_response_deserializer.go:825— foreign/go/binary_serialization/binary_response_deserializer.go:825-836 | foreign/go/binary_serialization/binary_response_deserializer.go:841-852 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `foreign/go/binary_serialization/binary_response_deserializer.go:825` it does not close everything it opens, so those exact lines 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) examples/csharp/src/GettingStarted/Iggy_SDK.Examples.GettingStarted.Producer/Utils.cs:69— examples/csharp/src/GettingStarted/Iggy_SDK.Examples.GettingStarted.Producer/Utils.cs:69-80 | examples/csharp/src/TcpTls/Iggy_SDK.Examples.TcpTls.Producer/Program.cs:115-127 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `examples/csharp/src/GettingStarted/Iggy_SDK.Examples.GettingStarted.Producer/Utils.cs:69` 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) examples/python/message-envelope/producer.py:128— examples/python/message-envelope/producer.py:128-139 | examples/python/message-headers/common.py:141-152 — before extracting anything, compare `examples/python/message-envelope/producer.py` and `examples/python/message-headers/common.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 77 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (10 lines × 2) foreign/csharp/Iggy_SDK/Contracts/Tcp/TcpContracts.cs:153— foreign/csharp/Iggy_SDK/Contracts/Tcp/TcpContracts.cs:153-162 | foreign/csharp/Iggy_SDK/Contracts/Tcp/TcpContracts.cs:164-173 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) core/journal/src/partition_journal.rs:994— core/journal/src/partition_journal.rs:994-1003 | core/journal/src/partition_journal.rs:1200-1209 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/journal/src/partition_journal.rs:994` it does not close everything it opens, so those exact lines 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) core/message_bus/src/lifecycle/connection_registry.rs:980— core/message_bus/src/lifecycle/connection_registry.rs:980-989 | core/message_bus/src/lifecycle/connection_registry.rs:1007-1016 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/message_bus/src/lifecycle/connection_registry.rs:980` 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) core/metadata/src/impls/metadata.rs:5216— core/metadata/src/impls/metadata.rs:5216-5225 | core/metadata/src/impls/metadata.rs:5262-5271 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/metadata/src/impls/metadata.rs:5216` it does not close everything it opens, so those exact lines 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) core/partitions/src/iggy_index_writer.rs:48— core/partitions/src/iggy_index_writer.rs:48-57 | core/partitions/src/messages_writer.rs:60-69 — 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) core/partitions/src/segment_recovery.rs:2689— core/partitions/src/segment_recovery.rs:2689-2698 | core/partitions/src/segment_recovery.rs:2824-2833 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/partitions/src/segment_recovery.rs:2689` it does not close everything it opens, so those exact lines 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) core/server/src/dispatch/metadata_changes.rs:96— core/server/src/dispatch/metadata_changes.rs:96-105 | core/server/src/dispatch/mod.rs:1344-1353 — 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 `core/server/src/dispatch/metadata_changes.rs:96` 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) core/simulator/src/workload/mod.rs:1589— core/simulator/src/workload/mod.rs:1589-1598 | core/simulator/src/workload/oracle.rs:403-412 — 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 `core/simulator/src/workload/mod.rs:1589` it does not close everything it opens, so those exact lines 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) core/common/src/http/personal_access_tokens/create_personal_access_token.rs:46— core/common/src/http/personal_access_tokens/create_personal_access_token.rs:46-55 | core/common/src/http/personal_access_tokens/delete_personal_access_token.rs:41-50 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (10 lines × 2) core/simulator/src/workload/ops/create_keyed_stream.rs:76— core/simulator/src/workload/ops/create_keyed_stream.rs:76-85 | core/simulator/src/workload/ops/create_stream.rs:74-83 — before extracting anything, compare `core/simulator/src/workload/ops/create_keyed_stream.rs` and `core/simulator/src/workload/ops/create_stream.rs` as WHOLE FILES: 88% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (10 lines × 2) gateways/kafka/src/protocol/handlers/alter_configs.rs:157— gateways/kafka/src/protocol/handlers/alter_configs.rs:157-166 | gateways/kafka/src/protocol/handlers/incremental_alter_configs.rs:175-184 — before extracting anything, compare `gateways/kafka/src/protocol/handlers/alter_configs.rs` and `gateways/kafka/src/protocol/handlers/incremental_alter_configs.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 112 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) core/simulator/src/workload/ops/create_partitions.rs:111— core/simulator/src/workload/ops/create_partitions.rs:111-120 | core/simulator/src/workload/ops/delete_partitions.rs:134-143 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (10 lines × 2) core/binary_protocol/src/consensus/header.rs:1553— core/binary_protocol/src/consensus/header.rs:1553-1562 | core/binary_protocol/src/consensus/header.rs:1635-1644 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/binary_protocol/src/consensus/header.rs:1553` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (10 lines × 2) core/message_bus/src/transports/tls/mod.rs:111— core/message_bus/src/transports/tls/mod.rs:111-120 | core/message_bus/src/transports/tls/mod.rs:130-139 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) core/server/src/boot/credentials.rs:483— core/server/src/boot/credentials.rs:483-492 | core/server/src/boot/credentials.rs:499-508 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/server/src/boot/credentials.rs:483` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/MessagesClient.java:194— foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/MessagesClient.java:194-203 | foreign/java/java-sdk/src/main/java/org/apache/iggy/client/blocking/MessagesClient.java:72-81 — 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 `foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/MessagesClient.java:194` 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 (10 lines × 2) core/bench/dashboard/shared/src/delta.rs:117— core/bench/dashboard/shared/src/delta.rs:117-126 | core/bench/dashboard/shared/src/metrics.rs:115-124 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication· Edited copy of a member (13 corresponding lines) · ×16
Edited copy of a member (13 corresponding lines) foreign/go/errors/generator/main.go:182— foreign/go/errors/generator/main.go:182-194 | foreign/go/errors/generator/main.go:197-209 — 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) core/metadata/src/stm/stream.rs:2294— core/metadata/src/stm/stream.rs:2294-2311 | core/metadata/src/stm/stream.rs:2322-2334 — 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) foreign/go/internal/vsr/register.go:69— foreign/go/internal/vsr/register.go:69-86 | foreign/go/internal/vsr/register.go:90-102 — 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) core/server/src/boot/credentials.rs:480— core/server/src/boot/credentials.rs:480-492 | core/server/src/boot/credentials.rs:496-508 — 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) foreign/python/src/client.rs:1215— foreign/python/src/client.rs:1215-1227 | foreign/python/src/client.rs:1623-1638 — 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) foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/tcp/vsr/VsrLoginCodec.java:68— foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/tcp/vsr/VsrLoginCodec.java:68-83 | foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/tcp/vsr/VsrLoginCodec.java:89-101 — 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) foreign/java/java-sdk/src/main/java/org/apache/iggy/message/HeaderKey.java:43— foreign/java/java-sdk/src/main/java/org/apache/iggy/message/HeaderKey.java:43-55 | foreign/java/java-sdk/src/main/java/org/apache/iggy/message/HeaderValue.java:220-232 — 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) foreign/java/java-sdk/src/main/java/org/apache/iggy/serde/MetadataChangesReader.java:278— foreign/java/java-sdk/src/main/java/org/apache/iggy/serde/MetadataChangesReader.java:278-290 | foreign/java/java-sdk/src/main/java/org/apache/iggy/serde/MetadataChangesReader.java:298-310 — 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) core/sdk/src/http/partitions.rs:34— core/sdk/src/http/partitions.rs:34-46 | core/sdk/src/http/partitions.rs:53-65 — 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) core/common/src/types/identifier/mod.rs:169— core/common/src/types/identifier/mod.rs:169-181 | core/common/src/types/message/partitioning.rs:98-110 — 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) foreign/csharp/Iggy_SDK/Mappers/BinaryMapper.cs:888— foreign/csharp/Iggy_SDK/Mappers/BinaryMapper.cs:888-901 | foreign/csharp/Iggy_SDK/Mappers/BinaryMapper.cs:1131-1143 — 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) examples/java/src/main/java/org/apache/iggy/examples/multitenant/consumer/MultiTenantConsumer.java:341— examples/java/src/main/java/org/apache/iggy/examples/multitenant/consumer/MultiTenantConsumer.java:341-353 | examples/java/src/main/java/org/apache/iggy/examples/sinkdataproducer/SinkDataProducer.java:151-164 — 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) foreign/java/external-processors/iggy-connector-flink/iggy-flink-examples/src/main/java/org/apache/iggy/flink/example/model/Alert.java:77— foreign/java/external-processors/iggy-connector-flink/iggy-flink-examples/src/main/java/org/apache/iggy/flink/example/model/Alert.java:77-90 | foreign/java/external-processors/iggy-connector-flink/iggy-flink-examples/src/main/java/org/apache/iggy/flink/example/model/SensorReading.java:70-82 — 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) examples/python/message-headers/plain-headers/consumer.py:39— examples/python/message-headers/plain-headers/consumer.py:39-55 | examples/python/message-headers/typed-headers/consumer.py:43-55 — 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) core/bench/report/src/plotting/chart.rs:179— core/bench/report/src/plotting/chart.rs:179-191 | core/bench/report/src/plotting/chart.rs:323-337 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) core/bench/runner/src/app/local_benchmark_runner.rs:50— core/bench/runner/src/app/local_benchmark_runner.rs:50-62 | core/bench/runner/src/app/local_benchmark_runner.rs:139-151 — 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.
D30 · Dependency Vulnerabilities· Medium CVE · ×14
Duplicated block (14 lines × 2) foreign/csharp/Iggy_SDK/Contracts/MetadataChangeBodies.cs:45— foreign/csharp/Iggy_SDK/Contracts/MetadataChangeBodies.cs:45-58 | foreign/csharp/Iggy_SDK/Contracts/MetadataChangeBodies.cs:137-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.
Duplicated block (14 lines × 2) foreign/csharp/Iggy_SDK/Publishers/IggyPublisherOfT.cs:103— foreign/csharp/Iggy_SDK/Publishers/IggyPublisherOfT.cs:103-116 | foreign/csharp/Iggy_SDK/Publishers/IggyPublisherOfT.cs:138-151 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (14 lines × 2) core/bench/report/src/types/server_stats.rs:174— core/bench/report/src/types/server_stats.rs:174-187 | core/common/src/types/stats/mod.rs:186-199 — before extracting anything, compare `core/bench/report/src/types/server_stats.rs` and `core/common/src/types/stats/mod.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 31 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (14 lines × 2) core/binary_protocol/src/requests/partitions/create_partitions.rs:47— core/binary_protocol/src/requests/partitions/create_partitions.rs:47-60 | core/binary_protocol/src/requests/partitions/delete_partitions.rs:47-60 — 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 (14 lines × 2) core/message_bus/src/installer/replica.rs:479— core/message_bus/src/installer/replica.rs:479-492 | core/message_bus/src/installer/tcp.rs:114-127 — before extracting anything, compare `core/message_bus/src/installer/replica.rs` and `core/message_bus/src/installer/tcp.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 87 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (14 lines × 2) core/partitions/src/iggy_partitions.rs:165— core/partitions/src/iggy_partitions.rs:165-178 | core/partitions/src/iggy_partitions.rs:188-201 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/partitions/src/iggy_partitions.rs:165` 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) foreign/cpp/src/client.rs:1845— foreign/cpp/src/client.rs:1845-1858 | foreign/python/src/client.rs:304-317 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (14 lines × 2) gateways/kafka/src/protocol/handlers/alter_configs.rs:204— gateways/kafka/src/protocol/handlers/alter_configs.rs:204-217 | gateways/kafka/src/protocol/handlers/incremental_alter_configs.rs:226-239 — before extracting anything, compare `gateways/kafka/src/protocol/handlers/alter_configs.rs` and `gateways/kafka/src/protocol/handlers/incremental_alter_configs.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 112 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 `gateways/kafka/src/protocol/handlers/alter_configs.rs:204` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `req` to `&AlterConfigsRequest` in one and `&IncrementalAlterConfigsRequest` 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 (14 lines × 2) core/binary_protocol/src/requests/personal_access_tokens/login_with_personal_access_token.rs:30— core/binary_protocol/src/requests/personal_access_tokens/login_with_personal_access_token.rs:30-43 | core/binary_protocol/src/responses/personal_access_tokens/create_personal_access_token.rs:35-48 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `core/binary_protocol/src/requests/personal_access_tokens/login_with_personal_access_token.rs:30` 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) core/binary_protocol/src/requests/users/delete_user.rs:30— core/binary_protocol/src/requests/users/delete_user.rs:30-43 | core/binary_protocol/src/requests/users/get_user.rs:30-43 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `core/binary_protocol/src/requests/users/delete_user.rs:30` 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) core/server/src/dispatch/session_ops.rs:1190— core/server/src/dispatch/session_ops.rs:1190-1203 | core/server/src/dispatch/session_ops.rs:1248-1265 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/server/src/dispatch/session_ops.rs:1190` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (14 lines × 2) foreign/go/client/tcp/tcp_driver.go:392— foreign/go/client/tcp/tcp_driver.go:392-405 | foreign/go/client/tcp/tcp_driver.go:602-615 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `foreign/go/client/tcp/tcp_driver.go:392` 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 (14 lines × 2) examples/csharp/src/MessageEnvelope/Iggy_SDK.Examples.MessageEnvelope.Producer/Utils.cs:88— examples/csharp/src/MessageEnvelope/Iggy_SDK.Examples.MessageEnvelope.Producer/Utils.cs:88-101 | examples/csharp/src/MessageHeaders/Iggy_SDK.Examples.MessageHeaders.Producer/Utils.cs:93-106 — before extracting anything, compare `examples/csharp/src/MessageEnvelope/Iggy_SDK.Examples.MessageEnvelope.Producer/Utils.cs` and `examples/csharp/src/MessageHeaders/Iggy_SDK.Examples.MessageHeaders.Producer/Utils.cs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 81 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 `examples/csharp/src/MessageEnvelope/Iggy_SDK.Examples.MessageEnvelope.Producer/Utils.cs:88` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) examples/python/basic/producer.py:110— examples/python/basic/producer.py:110-123 | examples/python/getting-started/producer.py:216-229 — `examples/python/basic/producer.py` and `examples/python/getting-started/producer.py` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 3 separate duplicated blocks between them, totalling at least 53 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `examples/python/basic/producer.py:110` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `examples/python/basic/producer.py:109` calls `partition_id` and `examples/python/getting-started/producer.py:215` 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) foreign/csharp/Iggy_SDK/Contracts/Tcp/TcpContracts.cs:930— foreign/csharp/Iggy_SDK/Contracts/Tcp/TcpContracts.cs:930-935 | foreign/csharp/Iggy_SDK/Contracts/Tcp/TcpContracts.cs:939-944 — both copies are in the same file, so extract the 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 (6 lines × 2) core/shard/src/lib.rs:9366— core/shard/src/lib.rs:9366-9372 | core/shard/src/lib.rs:11166-11171 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/shard/src/lib.rs:9366` it does not close everything it opens, so those exact lines 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) core/simulator/src/workload/mod.rs:1677— core/simulator/src/workload/mod.rs:1677-1682 | core/simulator/src/workload/oracle.rs:169-176 — 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 `core/simulator/src/workload/mod.rs:1677` 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) gateways/kafka/src/protocol/handlers/offset_fetch.rs:84— gateways/kafka/src/protocol/handlers/offset_fetch.rs:84-89 | gateways/kafka/src/protocol/handlers/offset_fetch.rs:95-100 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `gateways/kafka/src/protocol/handlers/offset_fetch.rs:84` it does not close everything it opens, so those exact lines 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) core/metadata/src/stm/consumer_group.rs:438— core/metadata/src/stm/consumer_group.rs:438-443 | core/metadata/src/stm/consumer_group.rs:493-498 — both copies are in the same file, so extract the 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) core/common/src/traits/binary_impls/mod.rs:193— core/common/src/traits/binary_impls/mod.rs:193-198 | core/common/src/types/options/catalog.rs:1156-1161 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (6 lines × 2) foreign/cpp/src/consumer.rs:117— foreign/cpp/src/consumer.rs:117-122 | foreign/cpp/src/reader.rs:127-132 — before extracting anything, compare `foreign/cpp/src/consumer.rs` and `foreign/cpp/src/reader.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 30 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 `foreign/cpp/src/consumer.rs:117` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) core/binary_protocol/src/consensus/header.rs:1035— core/binary_protocol/src/consensus/header.rs:1035-1040 | core/binary_protocol/src/consensus/header.rs:1196-1201 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/binary_protocol/src/consensus/header.rs:1035` it does not close everything it opens, so those exact lines 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) foreign/php/src/client.rs:625— foreign/php/src/client.rs:625-630 | foreign/php/src/client.rs:655-660 — both copies are in the same file, so extract the 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) foreign/java/java-sdk/src/main/java/org/apache/iggy/client/blocking/http/StreamsHttpClient.java:47— foreign/java/java-sdk/src/main/java/org/apache/iggy/client/blocking/http/StreamsHttpClient.java:47-52 | foreign/java/java-sdk/src/main/java/org/apache/iggy/client/blocking/http/UsersHttpClient.java:50-55 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (6 lines × 2) foreign/go/contracts/user_headers.go:179— foreign/go/contracts/user_headers.go:179-184 | foreign/go/contracts/user_headers.go:208-213 — both copies are in the same file, so extract the 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) foreign/go/errors/generator/main.go:189— foreign/go/errors/generator/main.go:189-194 | foreign/go/errors/generator/main.go:204-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 `foreign/go/errors/generator/main.go:189` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) foreign/go/internal/command/topic.go:111— foreign/go/internal/command/topic.go:111-116 | foreign/go/internal/command/topic.go:222-227 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) core/bench/src/actors/producer/typed_benchmark_producer.rs:94— core/bench/src/actors/producer/typed_benchmark_producer.rs:94-99 | core/bench/src/actors/producing_consumer/typed_benchmark_producing_consumer.rs:126-131 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
iggy_kafka_wire::bounds_guard::validate_fetch_shape (cognitive 51) core/kafka_wire/src/bounds_guard.rs:548— iggy_kafka_wire::bounds_guard::validate_fetch_shape has cognitive complexity 51 (threshold 15). Drivers by points: if/else 23 (38 pts), loops 5 (13 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
iggy_kafka_wire::bounds_guard::validate_create_topics_shape (cognitive 34) core/kafka_wire/src/bounds_guard.rs:707— iggy_kafka_wire::bounds_guard::validate_create_topics_shape has cognitive complexity 34 (threshold 15). Drivers by points: if/else 16 (26 pts), loops 4 (8 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
iggy_kafka_wire::bounds_guard::validate_offset_commit_shape (cognitive 30) core/kafka_wire/src/bounds_guard.rs:1242— iggy_kafka_wire::bounds_guard::validate_offset_commit_shape has cognitive complexity 30 (threshold 15). Drivers by points: if/else 19 (27 pts), loops 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
iggy_kafka_wire::bounds_guard::validate_list_offsets_shape (cognitive 24) core/kafka_wire/src/bounds_guard.rs:648— iggy_kafka_wire::bounds_guard::validate_list_offsets_shape has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (21 pts), loops 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
iggy_kafka_wire::bounds_guard::validate_create_partitions_shape (cognitive 24) core/kafka_wire/src/bounds_guard.rs:829— iggy_kafka_wire::bounds_guard::validate_create_partitions_shape has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (18 pts), loops 3 (6 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
iggy_kafka_wire::bounds_guard::validate_produce_shape (cognitive 23) core/kafka_wire/src/bounds_guard.rs:492— iggy_kafka_wire::bounds_guard::validate_produce_shape has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (20 pts), loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
iggy_kafka_wire::bounds_guard::validate_join_group_shape (cognitive 21) core/kafka_wire/src/bounds_guard.rs:1032— iggy_kafka_wire::bounds_guard::validate_join_group_shape has cognitive complexity 21 (threshold 15). Drivers by points: if/else 17 (20 pts), loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
iggy_kafka_wire::bounds_guard::validate_leave_group_shape (cognitive 20) core/kafka_wire/src/bounds_guard.rs:1137— iggy_kafka_wire::bounds_guard::validate_leave_group_shape has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (18 pts), loops 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
iggy_kafka_wire::bounds_guard::validate_describe_configs_shape (cognitive 19) core/kafka_wire/src/bounds_guard.rs:1514— iggy_kafka_wire::bounds_guard::validate_describe_configs_shape has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (16 pts), loops 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
iggy_kafka_wire::bounds_guard::validate_sync_group_shape (cognitive 18) core/kafka_wire/src/bounds_guard.rs:1183— iggy_kafka_wire::bounds_guard::validate_sync_group_shape has cognitive complexity 18 (threshold 15). Drivers by points: if/else 14 (17 pts), loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
iggy_kafka_wire::bounds_guard::validate_alter_configs_shape (cognitive 18) core/kafka_wire/src/bounds_guard.rs:1567— iggy_kafka_wire::bounds_guard::validate_alter_configs_shape has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (15 pts), loops 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (iggy_kafka_wire::bounds_guard::validate_incremental_alter_configs_shape) 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.
iggy_kafka_wire::bounds_guard::validate_incremental_alter_configs_shape (cognitive 18) core/kafka_wire/src/bounds_guard.rs:1620— iggy_kafka_wire::bounds_guard::validate_incremental_alter_configs_shape has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (15 pts), loops 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (iggy_kafka_wire::bounds_guard::validate_alter_configs_shape) 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.
iggy_kafka_wire::bounds_guard::validate_offset_fetch_shape (cognitive 16) core/kafka_wire/src/bounds_guard.rs:1319— iggy_kafka_wire::bounds_guard::validate_offset_fetch_shape has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (14 pts), loops 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
iggy_gateway_kafka::tls::identity::parse_replacement (cognitive 36) gateways/kafka/src/tls/identity.rs:623— iggy_gateway_kafka::tls::identity::parse_replacement has cognitive complexity 36 (threshold 15). Drivers by points: if/else 5 (17 pts), match/switch 3 (10 pts), loops 3 (9 pts) (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
iggy_gateway_kafka::protocol::handlers::list_offsets::resolve_topic_lookups (cognitive 25) gateways/kafka/src/protocol/handlers/list_offsets.rs:173— iggy_gateway_kafka::protocol::handlers::list_offsets::resolve_topic_lookups has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (19 pts), loops 2 (3 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
iggy_gateway_kafka::server::serve_frames (cognitive 24) gateways/kafka/src/server.rs:1431— iggy_gateway_kafka::server::serve_frames has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (12 pts), match/switch 5 (10 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
iggy_gateway_kafka::coordinator::partition::claim (cognitive 23) gateways/kafka/src/coordinator/partition.rs:216— iggy_gateway_kafka::coordinator::partition::claim has cognitive complexity 23 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 4 (8 pts), match/switch 2 (5 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
iggy_gateway_kafka::protocol::handlers::offset_delete::delete_unsubscribed (cognitive 22) gateways/kafka/src/protocol/handlers/offset_delete.rs:283— iggy_gateway_kafka::protocol::handlers::offset_delete::delete_unsubscribed has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (12 pts), match/switch 2 (5 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
iggy_gateway_kafka::server::accept_loop (cognitive 22) gateways/kafka/src/server.rs:988— iggy_gateway_kafka::server::accept_loop has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (14 pts), match/switch 3 (7 pts), loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
iggy_gateway_kafka::protocol::handlers::delete_groups::delete (cognitive 21) gateways/kafka/src/protocol/handlers/delete_groups.rs:140— iggy_gateway_kafka::protocol::handlers::delete_groups::delete has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (11 pts), match/switch 4 (5 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
iggy_gateway_kafka::protocol::handlers::produce::handle (cognitive 21) gateways/kafka/src/protocol/handlers/produce.rs:91— iggy_gateway_kafka::protocol::handlers::produce::handle has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14 (16 pts), match/switch 3 (5 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
iggy_gateway_kafka::group::state::join_or_store_step (cognitive 20) gateways/kafka/src/group/state.rs:1346— iggy_gateway_kafka::group::state::join_or_store_step has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 2, match/switch 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
iggy_gateway_kafka::group::state::sync_or_store_step (cognitive 18) gateways/kafka/src/group/state.rs:1647— iggy_gateway_kafka::group::state::sync_or_store_step has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 2, match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
iggy_gateway_kafka::group::state::choose_described (cognitive 18) gateways/kafka/src/group/state.rs:2022— iggy_gateway_kafka::group::state::choose_described has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
iggy_gateway_kafka::load_config (cognitive 17) gateways/kafka/src/main.rs:358— iggy_gateway_kafka::load_config has cognitive complexity 17 (threshold 15). Drivers by points: if/else 15 (17 pts) (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
iggy_gateway_kafka::protocol::handlers::produce::write_request (cognitive 17) gateways/kafka/src/protocol/handlers/produce.rs:370— iggy_gateway_kafka::protocol::handlers::produce::write_request has cognitive complexity 17 (threshold 15). Drivers by points: if/else 2 (7 pts), match/switch 2 (7 pts), loops 2 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TooManyFields: IggyPartition core/partitions/src/iggy_partition.rs:134— TooManyFields — 124 stored fields beside 548 methods. The bar is 30 stored fields; this is 94 over it, 4.13× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: IggyShard core/shard/src/lib.rs:1863— TooManyFields — 72 stored fields beside 277 methods. The bar is 30 stored fields; this is 42 over it, 2.40× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: VsrConsensus core/consensus/src/impls.rs:1380— TooManyFields — 67 stored fields beside 215 methods. The bar is 30 stored fields; this is 37 over it, 2.23× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: ShardMetrics core/shard/src/metrics.rs:335— TooManyFields — 65 stored fields beside 47 methods. The bar is 30 stored fields; this is 35 over it, 2.17× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: PartitionPersistence core/partitions/src/persistence.rs:295— TooManyFields — 49 stored fields beside 78 methods. The bar is 30 stored fields; this is 19 over it, 1.63× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: PartitionReader foreign/go/client/reader/reader.go:315— TooManyFields — 44 stored fields beside 65 methods. The bar is 30 stored fields; this is 14 over it, 1.47× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: Args core/common/src/types/args/mod.rs:227— TooManyFields — 43 stored fields beside 1 method. The bar is 30 stored fields; this is 13 over it, 1.43× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: Worker core/sdk/src/clients/reader/worker.rs:185— TooManyFields — 42 stored fields beside 82 methods. The bar is 30 stored fields; this is 12 over it, 1.40× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: Args core/simulator/src/bin/workload-fuzz.rs:91— TooManyFields — 38 stored fields. The bar is 30 stored fields; this is 8 over it, 1.27× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: TopicCreateOptions foreign/cpp/src/lib.rs:691— TooManyFields — 36 stored fields. The bar is 30 stored fields; this is 6 over it, 1.20× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: partition foreign/go/client/reader/reader.go:163— TooManyFields — 32 stored fields beside 5 methods. The bar is 30 stored fields; this is 2 over it, 1.07× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: Stats foreign/cpp/src/lib.rs:517— TooManyFields — 31 stored fields. The bar is 30 stored fields; this is 1 over it, 1.03× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: MetadataChangeBody foreign/cpp/src/lib.rs:844— TooManyFields — 31 stored fields. The bar is 30 stored fields; this is 1 over it, 1.03× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
D4 · Code Duplication· Edited copy of a member (14 corresponding lines) · ×13
Edited copy of a member (14 corresponding lines) core/server/src/responses.rs:430— core/server/src/responses.rs:430-443 | core/server/src/responses.rs:455-468 — 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) foreign/csharp/Iggy_SDK/Encryption/AesMessageEncryptor.cs:109— foreign/csharp/Iggy_SDK/Encryption/AesMessageEncryptor.cs:109-122 | foreign/csharp/Iggy_SDK/Encryption/AesMessageEncryptor.cs:131-147 — 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) core/metadata/src/impls/placement.rs:236— core/metadata/src/impls/placement.rs:236-252 | core/metadata/src/stm/stream.rs:1795-1808 — 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) gateways/kafka/src/protocol/handlers/topic_config.rs:988— gateways/kafka/src/protocol/handlers/topic_config.rs:988-1001 | gateways/kafka/src/protocol/handlers/topic_config.rs:1017-1030 — 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) core/simulator/src/client.rs:735— core/simulator/src/client.rs:735-755 | core/simulator/src/client.rs:759-772 — 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) core/server/src/session_manager.rs:497— core/server/src/session_manager.rs:497-512 | core/server/src/session_manager.rs:516-529 — 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) core/binary_protocol/src/requests/messages/get_partition_route.rs:46— core/binary_protocol/src/requests/messages/get_partition_route.rs:46-59 | core/binary_protocol/src/requests/system/bind_session.rs:84-97 — 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) core/simulator/src/workload/mod.rs:1529— core/simulator/src/workload/mod.rs:1529-1542 | core/simulator/src/workload/oracle.rs:358-372 — 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) core/common/src/wire_conversions.rs:622— core/common/src/wire_conversions.rs:622-635 | foreign/cpp/src/type_conversion.rs:364-377 — 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) core/integration/src/harness/orchestrator/harness.rs:400— core/integration/src/harness/orchestrator/harness.rs:400-413 | core/integration/src/harness/orchestrator/harness.rs:424-442 — 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) foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/tcp/vsr/ConsensusSession.java:160— foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/tcp/vsr/ConsensusSession.java:160-176 | foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/tcp/vsr/ConsensusSession.java:178-191 — 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) core/bench/dashboard/frontend/src/format.rs:22— core/bench/dashboard/frontend/src/format.rs:22-35 | core/bench/dashboard/frontend/src/format.rs: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) core/bench/dashboard/server/src/cache/series.rs:157— core/bench/dashboard/server/src/cache/series.rs:157-170 | core/bench/dashboard/server/src/render.rs:107-120 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (7 corresponding lines) · ×13
Edited copy of a member (7 corresponding lines) foreign/swift/Sources/Iggy/Consumer/IggyConsumer.swift:437— foreign/swift/Sources/Iggy/Consumer/IggyConsumer.swift:437-443 | foreign/swift/Sources/Iggy/Consumer/IggyConsumer.swift:449-455 — 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) foreign/swift/Sources/Iggy/Protocol/Responses.swift:142— foreign/swift/Sources/Iggy/Protocol/Responses.swift:142-148 | foreign/swift/Sources/Iggy/Protocol/Responses.swift:210-219 — 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) foreign/swift/Sources/Iggy/Client/IggyClient+Messages.swift:878— foreign/swift/Sources/Iggy/Client/IggyClient+Messages.swift:878-884 | foreign/swift/Sources/Iggy/Client/IggyClient+Messages.swift:886-892 — 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) gateways/kafka/src/protocol/handlers/topic_config.rs:936— gateways/kafka/src/protocol/handlers/topic_config.rs:936-942 | gateways/kafka/src/protocol/handlers/topic_config.rs:946-954 — 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) core/metadata/src/impls/metadata.rs:354— core/metadata/src/impls/metadata.rs:354-362 | core/metadata/src/impls/metadata.rs:364-370 — 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) core/server/src/http/handlers.rs:991— core/server/src/http/handlers.rs:991-997 | core/server/src/http/handlers.rs:2036-2042 — 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) core/simulator/src/packet.rs:993— core/simulator/src/packet.rs:993-999 | core/simulator/src/packet.rs:1002-1008 — 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) core/journal/src/partition_journal/segments.rs:836— core/journal/src/partition_journal/segments.rs:836-842 | core/partitions/src/state_transfer.rs:2131-2137 — 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) core/partitions/src/segment_chain.rs:519— core/partitions/src/segment_chain.rs:519-525 | core/journal/src/durable_storage.rs:304-310 — 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) core/integration/src/harness/handle/connectors_runtime.rs:60— core/integration/src/harness/handle/connectors_runtime.rs:60-66 | core/integration/src/harness/handle/mcp.rs: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) core/binary_protocol/src/responses/consumer_groups/get_consumer_group.rs:41— core/binary_protocol/src/responses/consumer_groups/get_consumer_group.rs:41-47 | core/binary_protocol/src/responses/consumer_groups/sync_consumer_group.rs:41-47 — 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) core/common/src/http/consumer_groups/create_consumer_group.rs:52— core/common/src/http/consumer_groups/create_consumer_group.rs:52-58 | core/common/src/http/streams/create_stream.rs: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) foreign/python/src/consumer.rs:259— foreign/python/src/consumer.rs:259-265 | foreign/python/src/reader.rs:251-257 — 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 (17 corresponding lines) · ×12
Edited copy of a member (17 corresponding lines) foreign/swift/Sources/Iggy/Client/IggyClient+Messages.swift:336— foreign/swift/Sources/Iggy/Client/IggyClient+Messages.swift:336-352 | foreign/swift/Sources/Iggy/Client/IggyClient+Messages.swift:356-374 — 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) core/server/src/http/handlers.rs:2131— core/server/src/http/handlers.rs:2131-2149 | core/server/src/http/handlers.rs:2157-2173 — 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) foreign/php/src/client.rs:765— foreign/php/src/client.rs:765-782 | foreign/python/src/client.rs:2029-2045 — 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) core/metadata/src/stm/stream.rs:425— core/metadata/src/stm/stream.rs:425-441 | core/metadata/src/stm/stream.rs:445-461 — 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) core/binary_protocol/src/consensus/header.rs:1551— core/binary_protocol/src/consensus/header.rs:1551-1567 | core/binary_protocol/src/consensus/header.rs:1633-1654 — 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) core/server/src/dispatch/authz.rs:442— core/server/src/dispatch/authz.rs:442-458 | core/server/src/dispatch/authz.rs:477-494 — 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) core/integration/src/harness/handle/connectors_runtime.rs:147— core/integration/src/harness/handle/connectors_runtime.rs:147-165 | core/integration/src/harness/handle/mcp.rs:131-147 — 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) foreign/go/binary_serialization/binary_response_deserializer.go:939— foreign/go/binary_serialization/binary_response_deserializer.go:939-955 | foreign/go/binary_serialization/binary_response_deserializer.go:1019-1035 — 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) core/server/src/dispatch/failure.rs:351— core/server/src/dispatch/failure.rs:351-368 | core/server/src/dispatch/failure.rs:503-519 — 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) core/common/src/types/permissions/permissions_global.rs:165— core/common/src/types/permissions/permissions_global.rs:165-181 | core/integration/src/harness/helpers.rs:410-426 — 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) examples/python/multi-tenant/consumer.py:68— examples/python/multi-tenant/consumer.py:68-84 | examples/python/multi-tenant/producer.py:54-70 — 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) foreign/java/external-processors/iggy-connector-flink/iggy-flink-examples/src/main/java/org/apache/iggy/flink/example/MultiStreamJoinJob.java:194— foreign/java/external-processors/iggy-connector-flink/iggy-flink-examples/src/main/java/org/apache/iggy/flink/example/MultiStreamJoinJob.java:194-210 | foreign/java/external-processors/iggy-connector-flink/iggy-flink-examples/src/main/java/org/apache/iggy/flink/example/MultiStreamJoinJob.java:214-231 — 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.
D30 · Dependency Vulnerabilities· Medium advisory (unmaintained) · ×11
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
D4 · Code Duplication· Edited copy of a member (20 corresponding lines) · ×11
Edited copy of a member (20 corresponding lines) core/integration/src/harness/handle/connectors_runtime.rs:224— core/integration/src/harness/handle/connectors_runtime.rs:224-247 | core/integration/src/harness/handle/server.rs:1176-1214 — 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) foreign/java/java-sdk/src/main/java/org/apache/iggy/serde/BytesSerializer.java:144— foreign/java/java-sdk/src/main/java/org/apache/iggy/serde/BytesSerializer.java:144-163 | foreign/java/java-sdk/src/main/java/org/apache/iggy/serde/BytesSerializer.java:255-276 — 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) core/partitions/src/iggy_partitions.rs:159— core/partitions/src/iggy_partitions.rs:159-178 | core/partitions/src/iggy_partitions.rs:181-201 — 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) foreign/cpp/src/type_conversion.rs:946— foreign/cpp/src/type_conversion.rs:946-965 | foreign/cpp/src/type_conversion.rs:969-989 — 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) core/binary_protocol/src/requests/users/login_register.rs:149— core/binary_protocol/src/requests/users/login_register.rs:149-169 | core/binary_protocol/src/requests/users/login_register_with_pat.rs:59-78 — 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) core/integration/src/harness/disk.rs:112— core/integration/src/harness/disk.rs:112-131 | core/integration/src/harness/disk.rs:682-706 — 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) core/server/src/http/extractor.rs:166— core/server/src/http/extractor.rs:166-185 | core/server/src/http/extractor.rs:194-214 — 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) core/sdk/src/stream_builder/config/config_iggy_consumer.rs:79— core/sdk/src/stream_builder/config/config_iggy_consumer.rs:79-98 | core/sdk/src/stream_builder/config/config_iggy_consumer.rs:177-200 — 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) core/kafka_wire/src/bounds_guard.rs:999— core/kafka_wire/src/bounds_guard.rs:999-1024 | core/kafka_wire/src/bounds_guard.rs:1409-1428 — 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) gateways/kafka/src/group/mod.rs:798— gateways/kafka/src/group/mod.rs:798-819 | gateways/kafka/src/group/mod.rs:827-846 — 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) core/server/src/dispatch/reads.rs:317— core/server/src/dispatch/reads.rs:317-336 | core/server/src/http/reads.rs:240-262 — 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 (18 corresponding lines) · ×11
Edited copy of a member (18 corresponding lines) core/binary_protocol/src/batch.rs:399— core/binary_protocol/src/batch.rs:399-416 | core/binary_protocol/src/batch.rs:435-457 — 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) foreign/java/external-processors/iggy-connector-flink/iggy-connector-library/src/main/java/org/apache/iggy/connector/flink/sink/IggySink.java:122— foreign/java/external-processors/iggy-connector-flink/iggy-connector-library/src/main/java/org/apache/iggy/connector/flink/sink/IggySink.java:122-139 | foreign/java/external-processors/iggy-connector-flink/iggy-connector-library/src/main/java/org/apache/iggy/connector/flink/source/IggySource.java:157-177 — 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) core/shard/src/lib.rs:7920— core/shard/src/lib.rs:7920-7937 | core/shard/src/lib.rs:8723-8745 — 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) foreign/python/src/config.rs:454— foreign/python/src/config.rs:454-471 | foreign/python/src/config.rs:1493-1510 — 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) foreign/python/src/client.rs:753— foreign/python/src/client.rs:753-772 | foreign/python/src/client.rs:1118-1135 — 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) foreign/java/external-processors/iggy-connector-pinot/src/main/java/org/apache/iggy/connector/pinot/consumer/IggyPartitionGroupConsumer.java:124— foreign/java/external-processors/iggy-connector-pinot/src/main/java/org/apache/iggy/connector/pinot/consumer/IggyPartitionGroupConsumer.java:124-143 | foreign/java/external-processors/iggy-connector-pinot/src/main/java/org/apache/iggy/connector/pinot/metadata/IggyStreamMetadataProvider.java:208-225 — 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) core/sdk/src/client_wrappers/client_wrapper.rs:311— core/sdk/src/client_wrappers/client_wrapper.rs:311-343 | core/sdk/src/client_wrappers/client_wrapper.rs:350-367 — 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) foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/tcp/PersonalAccessTokensTcpClient.java:90— foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/tcp/PersonalAccessTokensTcpClient.java:90-107 | foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/tcp/SystemTcpClient.java:163-180 — 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) foreign/php/src/poll_options.rs:95— foreign/php/src/poll_options.rs:95-112 | foreign/python/src/poll_options.rs:109-127 — 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) foreign/java/java-sdk/src/main/java/org/apache/iggy/client/blocking/http/IggyHttpClientBuilder.java:229— foreign/java/java-sdk/src/main/java/org/apache/iggy/client/blocking/http/IggyHttpClientBuilder.java:229-246 | foreign/java/java-sdk/src/main/java/org/apache/iggy/client/blocking/tcp/IggyTcpClientBuilder.java:290-308 — 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) examples/go/getting-started/producer/main.go:72— examples/go/getting-started/producer/main.go:72-89 | REDACTED:151-170 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (8 corresponding lines) · ×11
Edited copy of a member (8 corresponding lines) foreign/swift/Sources/Iggy/Client/IggyClient+Messages.swift:603— foreign/swift/Sources/Iggy/Client/IggyClient+Messages.swift:603-614 | foreign/swift/Sources/Iggy/Client/IggyClient+Messages.swift:622-629 — 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) gateways/kafka/src/bridge/iggy_bridge/topics.rs:267— gateways/kafka/src/bridge/iggy_bridge/topics.rs:267-274 | gateways/kafka/src/bridge/iggy_bridge/topics.rs:343-352 — 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) foreign/php/src/client.rs:829— foreign/php/src/client.rs:829-839 | foreign/php/src/client.rs:856-863 — 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) core/consensus/src/replication.rs:362— core/consensus/src/replication.rs:362-369 | core/consensus/src/replication.rs:406-421 — 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) core/metadata/src/stm/stream.rs:1846— core/metadata/src/stm/stream.rs:1846-1853 | core/metadata/src/stm/stream.rs:2086-2093 — 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) core/sdk/src/http/consumer_groups.rs:62— core/sdk/src/http/consumer_groups.rs:62-71 | core/sdk/src/http/topics.rs:43-50 — 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) core/binary_protocol/src/requests/users/login_register.rs:139— core/binary_protocol/src/requests/users/login_register.rs:139-147 | core/binary_protocol/src/requests/users/login_register_with_pat.rs:50-57 — 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) core/sdk/src/http/streams.rs:85— core/sdk/src/http/streams.rs:85-92 | core/sdk/src/http/topics.rs:81-88 — 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) core/binary_protocol/src/requests/consumer_offsets/delete_consumer_offset.rs:47— core/binary_protocol/src/requests/consumer_offsets/delete_consumer_offset.rs:47-54 | core/binary_protocol/src/requests/consumer_offsets/store_consumer_offset.rs:48-56 — 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) core/common/src/wire_conversions.rs:638— core/common/src/wire_conversions.rs:638-648 | foreign/cpp/src/type_conversion.rs:381-388 — 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) examples/java/src/main/java/org/apache/iggy/examples/sinkdataproducer/SinkDataProducer.java:99— examples/java/src/main/java/org/apache/iggy/examples/sinkdataproducer/SinkDataProducer.java:99-106 | examples/java/src/main/java/org/apache/iggy/examples/sinkdataproducer/SinkDataProducer.java:108-115 — 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.
partitions::segment_recovery::load_persisted_segments_with_checkpoint (cognitive 43) core/partitions/src/segment_recovery.rs:722— partitions::segment_recovery::load_persisted_segments_with_checkpoint has cognitive complexity 43 (threshold 15). Drivers by points: if/else 19 (31 pts), boolean chains 5, match/switch 2 (4 pts), loops 3 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
partitions::segment_recovery::recover_segment_bounds (cognitive 26) core/partitions/src/segment_recovery.rs:1993— partitions::segment_recovery::recover_segment_bounds has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (24 pts), boolean chains 1, match/switch 1 (nesting depth added 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.
partitions::install_backup::link_tree (cognitive 24) core/partitions/src/install_backup.rs:138— partitions::install_backup::link_tree has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (17 pts), loops 3 (4 pts), boolean chains 3 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
partitions::persistence::merge_recovered_logs (cognitive 23) core/partitions/src/persistence.rs:2164— partitions::persistence::merge_recovered_logs has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (18 pts), loops 2, match/switch 1 (2 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
partitions::segment_recovery::find_provable_index_anchor (cognitive 23) core/partitions/src/segment_recovery.rs:2672— partitions::segment_recovery::find_provable_index_anchor has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (20 pts), boolean chains 2, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
partitions::segment_recovery::index_is_consistent (cognitive 20) core/partitions/src/segment_recovery.rs:2815— partitions::segment_recovery::index_is_consistent has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (12 pts), boolean chains 5, loops 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
partitions::segment_recovery::sweep_scratch_files_and_collect_offsets (cognitive 19) core/partitions/src/segment_recovery.rs:1471— partitions::segment_recovery::sweep_scratch_files_and_collect_offsets has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (13 pts), match/switch 2 (3 pts), loops 2, boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
partitions::io::remove_offset_files (cognitive 18) core/partitions/src/io.rs:905— partitions::io::remove_offset_files has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 2, match/switch 1 (2 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
partitions::segment_recovery::recover_by_walking_log (cognitive 18) core/partitions/src/segment_recovery.rs:2283— partitions::segment_recovery::recover_by_walking_log has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 1, match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
partitions::segment_recovery::walk_chain_from_anchor (cognitive 16) core/partitions/src/segment_recovery.rs:2429— partitions::segment_recovery::walk_chain_from_anchor has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D4 · Code Duplication· Edited copies of one member (3 members, 12+ corresponding lines) · ×10
Edited copies of one member (3 members, 12+ corresponding lines) foreign/java/java-sdk/src/main/java/org/apache/iggy/stream/StreamUpdate.java:53— foreign/java/java-sdk/src/main/java/org/apache/iggy/stream/StreamUpdate.java:53-64 | foreign/java/java-sdk/src/main/java/org/apache/iggy/topic/TopicUpdate.java:73-90 | foreign/java/java-sdk/src/main/java/org/apache/iggy/user/UserUpdate.java:60-79 — 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) core/object_store/src/contract.rs:331— core/object_store/src/contract.rs:331-342 | core/object_store/src/contract.rs:347-364 | core/object_store/src/contract.rs:371-388 — 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) foreign/swift/Sources/Iggy/Protocol/Requests.swift:333— foreign/swift/Sources/Iggy/Protocol/Requests.swift:333-346 | foreign/swift/Sources/Iggy/Protocol/Requests.swift:355-366 | foreign/swift/Sources/Iggy/Protocol/Requests.swift:369-380 — 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) foreign/java/java-sdk/src/main/java/org/apache/iggy/serde/BytesDeserializer.java:132— foreign/java/java-sdk/src/main/java/org/apache/iggy/serde/BytesDeserializer.java:132-145 | foreign/java/java-sdk/src/main/java/org/apache/iggy/serde/BytesDeserializer.java:147-159 | foreign/java/java-sdk/src/main/java/org/apache/iggy/serde/BytesDeserializer.java:918-929 — 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) foreign/cpp/src/client.rs:280— foreign/cpp/src/client.rs:280-291 | foreign/cpp/src/client.rs:1692-1703 | foreign/cpp/src/client.rs:1716-1729 — 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) foreign/python/src/config.rs:257— foreign/python/src/config.rs:257-268 | foreign/python/src/config.rs:567-578 | foreign/python/src/config.rs:1133-1144 — 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) foreign/swift/Sources/Iggy/Models/MetadataChanges.swift:562— foreign/swift/Sources/Iggy/Models/MetadataChanges.swift:562-574 | foreign/swift/Sources/Iggy/Models/MetadataChanges.swift:587-598 | foreign/swift/Sources/Iggy/Models/MetadataChanges.swift:611-622 — 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) foreign/python/src/reader.rs:109— foreign/python/src/reader.rs:109-121 | foreign/python/src/reader.rs:131-142 | foreign/python/src/reader.rs:169-181 — 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) foreign/java/bench/src/main/java/org/apache/iggy/bench/report/StatsHelper.java:34— foreign/java/bench/src/main/java/org/apache/iggy/bench/report/StatsHelper.java:34-45 | foreign/java/bench/src/main/java/org/apache/iggy/bench/report/StatsHelper.java:60-71 | foreign/java/bench/src/main/java/org/apache/iggy/bench/report/StatsHelper.java:73-84 — 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) core/bench/src/args/kinds/end_to_end/producing_consumer.rs:83— core/bench/src/args/kinds/end_to_end/producing_consumer.rs:83-94 | core/bench/src/args/kinds/pinned/consumer.rs:70-81 | core/bench/src/args/kinds/pinned/producer.rs:82-93 — 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.
Worker::complete_fetch (cognitive 82) core/sdk/src/clients/reader/worker.rs:1626— Worker::complete_fetch has cognitive complexity 82 (threshold 15). Drivers by points: if/else 22 (45 pts), boolean chains 14, match/switch 6 (13 pts), loops 7 (10 pts) (nesting depth added 33). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Worker::complete_on_demand (cognitive 48) core/sdk/src/clients/reader/worker.rs:2193— Worker::complete_on_demand has cognitive complexity 48 (threshold 15). Drivers by points: if/else 21 (34 pts), boolean chains 8, match/switch 3 (6 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Worker::run (cognitive 47) core/sdk/src/clients/reader/worker.rs:342— Worker::run has cognitive complexity 47 (threshold 15). Drivers by points: if/else 14 (34 pts), match/switch 3 (8 pts), boolean chains 4, loops 1 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Worker::schedule_groups (cognitive 33) core/sdk/src/clients/reader/worker.rs:985— Worker::schedule_groups has cognitive complexity 33 (threshold 15). Drivers by points: if/else 8 (23 pts), loops 5 (9 pts), boolean chains 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Worker::schedule_alone (cognitive 29) core/sdk/src/clients/reader/worker.rs:1177— Worker::schedule_alone has cognitive complexity 29 (threshold 15). Drivers by points: if/else 13 (20 pts), boolean chains 6, match/switch 1 (2 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Worker::apply (cognitive 20) core/sdk/src/clients/reader/worker.rs:738— Worker::apply has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 3, loops 1 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Worker::refuse (cognitive 20) core/sdk/src/clients/reader/worker.rs:2616— Worker::refuse has cognitive complexity 20 (threshold 15). Drivers by points: loops 6 (11 pts), if/else 2 (6 pts), match/switch 2 (3 pts) (nesting depth added 10). 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.
Worker::spawn_group (cognitive 19) core/sdk/src/clients/reader/worker.rs:1051— Worker::spawn_group has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 3 (5 pts), match/switch 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Worker::complete_poll (cognitive 19) core/sdk/src/clients/reader/worker.rs:2074— Worker::complete_poll has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 6, match/switch 2 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
simulator::replica::new_shard (cognitive 35) core/simulator/src/replica.rs:152— simulator::replica::new_shard has cognitive complexity 35 (threshold 15). Drivers by points: if/else 21 (27 pts), boolean chains 4, loops 2 (4 pts) (nesting depth added 8). 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.
simulator::workload::state_checker::assert_applied_data_agrees (cognitive 26) core/simulator/src/workload/state_checker.rs:679— simulator::workload::state_checker::assert_applied_data_agrees has cognitive complexity 26 (threshold 15). Drivers by points: if/else 5 (16 pts), loops 3 (6 pts), match/switch 1 (4 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
simulator::workload::oracle::assert_partition_offsets_agree (cognitive 20) core/simulator/src/workload/oracle.rs:1007— simulator::workload::oracle::assert_partition_offsets_agree has cognitive complexity 20 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 3 (9 pts), boolean chains 1 (nesting depth added 12). 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.
simulator::workload::state_checker::assert_partition_prefixes_agree (cognitive 20) core/simulator/src/workload/state_checker.rs:595— simulator::workload::state_checker::assert_partition_prefixes_agree has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 3 (6 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
simulator::workload::oracle::assert_retired_owners_removed (cognitive 19) core/simulator/src/workload/oracle.rs:929— simulator::workload::oracle::assert_retired_owners_removed has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 3 (6 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
simulator::workload::oracle::quiesce_failure_report (cognitive 18) core/simulator/src/workload/oracle.rs:205— simulator::workload::oracle::quiesce_failure_report has cognitive complexity 18 (threshold 15). Drivers by points: loops 6 (11 pts), if/else 2 (4 pts), match/switch 1 (3 pts) (nesting depth added 9). 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.
simulator::workload::oracle::assert_converged (cognitive 18) core/simulator/src/workload/oracle.rs:525— simulator::workload::oracle::assert_converged has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
simulator::bin::workload-fuzz::network_options (cognitive 16) core/simulator/src/bin/workload-fuzz.rs:487— simulator::bin::workload-fuzz::network_options has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14, boolean chains 2. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
simulator::bin::workload-fuzz::run_quiesce_phase (cognitive 16) core/simulator/src/bin/workload-fuzz.rs:589— simulator::bin::workload-fuzz::run_quiesce_phase has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9, boolean chains 5, loops 1 (2 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D4 · Code Duplication· Members sharing a duplicated core (4 members, 50+ identical tokens) · ×9
Members sharing a duplicated core (4 members, 50+ identical tokens) core/binary_protocol/src/requests/consumer_offsets/delete_consumer_offset.rs:56— core/binary_protocol/src/requests/consumer_offsets/delete_consumer_offset.rs:56-68 | core/binary_protocol/src/requests/consumer_offsets/get_consumer_offset.rs:50-61 | core/binary_protocol/src/requests/consumer_offsets/store_consumer_offset.rs:58-71 | core/binary_protocol/src/requests/messages/poll_messages.rs:122-136 — 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) core/integration/src/harness/disk.rs:265— core/integration/src/harness/disk.rs:265-292 | core/integration/src/harness/disk.rs:446-471 | core/integration/src/harness/disk.rs:476-499 | core/integration/src/harness/disk.rs:562-590 — 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) core/kafka_wire/src/bounds_guard.rs:492— core/kafka_wire/src/bounds_guard.rs:492-540 | core/kafka_wire/src/bounds_guard.rs:548-640 | core/kafka_wire/src/bounds_guard.rs:652-699 | core/kafka_wire/src/bounds_guard.rs:1246-1310 — 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) core/kafka_wire/src/bounds_guard.rs:1032— core/kafka_wire/src/bounds_guard.rs:1032-1088 | core/kafka_wire/src/bounds_guard.rs:1099-1126 | core/kafka_wire/src/bounds_guard.rs:1183-1232 | core/kafka_wire/src/bounds_guard.rs:1246-1310 — 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) core/message_bus/src/lifecycle/connection_registry.rs:640— core/message_bus/src/lifecycle/connection_registry.rs:640-651 | core/message_bus/src/lifecycle/connection_registry.rs:664-683 | core/message_bus/src/lifecycle/connection_registry.rs:975-991 | core/message_bus/src/lifecycle/connection_registry.rs:1001-1019 — 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) core/sdk/src/http/consumer_groups.rs:35— core/sdk/src/http/consumer_groups.rs:35-56 | core/sdk/src/http/consumer_offsets.rs:92-115 | core/sdk/src/http/streams.rs:33-48 | core/sdk/src/http/users.rs:37-52 — 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) core/shard/src/lib.rs:5839— core/shard/src/lib.rs:5839-5882 | core/shard/src/lib.rs:5892-5971 | core/shard/src/lib.rs:5982-6206 | core/shard/src/lib.rs:6410-6461 — 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) examples/java/src/main/java/org/apache/iggy/examples/gettingstarted/consumer/GettingStartedConsumer.java:62— examples/java/src/main/java/org/apache/iggy/examples/gettingstarted/consumer/GettingStartedConsumer.java:62-115 | examples/java/src/main/java/org/apache/iggy/examples/messageenvelope/consumer/MessageEnvelopeConsumer.java:71-124 | examples/java/src/main/java/org/apache/iggy/examples/messageheaders/consumer/MessageHeadersConsumer.java:74-119 | examples/java/src/main/java/org/apache/iggy/examples/tcptls/consumer/TcpTlsConsumer.java:83-136 — 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) examples/python/basic/producer.py:63— examples/python/basic/producer.py:63-77 | examples/python/getting-started/producer.py:173-187 | examples/python/message-envelope/producer.py:110-124 | examples/python/message-headers/common.py:123-137 — 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 (13 lines × 2) foreign/csharp/Iggy_SDK/Contracts/Tcp/TcpContracts.cs:911— foreign/csharp/Iggy_SDK/Contracts/Tcp/TcpContracts.cs:911-923 | foreign/csharp/Iggy_SDK/Contracts/Tcp/TcpContracts.cs:1043-1055 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (13 lines × 2) core/binary_protocol/src/requests/users/login_register.rs:157— core/binary_protocol/src/requests/users/login_register.rs:157-169 | core/binary_protocol/src/requests/users/login_register_with_pat.rs:66-78 — before extracting anything, compare `core/binary_protocol/src/requests/users/login_register.rs` and `core/binary_protocol/src/requests/users/login_register_with_pat.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 34 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/binary_protocol/src/requests/users/login_register.rs: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) core/integration/src/harness/handle/mcp.rs:178— core/integration/src/harness/handle/mcp.rs:178-190 | core/integration/src/harness/handle/server.rs:1143-1155 — 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 (13 lines × 2) core/shard/src/lib.rs:9382— core/shard/src/lib.rs:9382-9394 | core/shard/src/lib.rs:11263-11275 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/shard/src/lib.rs:9382` 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) gateways/kafka/src/protocol/handlers/alter_configs.rs:116— gateways/kafka/src/protocol/handlers/alter_configs.rs:116-128 | gateways/kafka/src/protocol/handlers/incremental_alter_configs.rs:134-146 — before extracting anything, compare `gateways/kafka/src/protocol/handlers/alter_configs.rs` and `gateways/kafka/src/protocol/handlers/incremental_alter_configs.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 112 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 `gateways/kafka/src/protocol/handlers/alter_configs.rs:116` 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) core/simulator/src/workload/ops/create_keyed_stream.rs:47— core/simulator/src/workload/ops/create_keyed_stream.rs:47-59 | core/simulator/src/workload/ops/create_stream.rs:44-57 — before extracting anything, compare `core/simulator/src/workload/ops/create_keyed_stream.rs` and `core/simulator/src/workload/ops/create_stream.rs` as WHOLE FILES: 88% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/simulator/src/workload/ops/create_keyed_stream.rs:47` 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) core/message_bus/src/transports/ws.rs:270— core/message_bus/src/transports/ws.rs:270-282 | core/message_bus/src/transports/wss.rs:421-434 — before extracting anything, compare `core/message_bus/src/transports/ws.rs` and `core/message_bus/src/transports/wss.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 96 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 `core/message_bus/src/transports/ws.rs:270` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (13 lines × 2) core/journal/src/prepare_journal.rs:671— core/journal/src/prepare_journal.rs:671-683 | core/journal/src/prepare_journal.rs:739-751 — both copies are in the same file, so extract the 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) foreign/java/external-processors/iggy-connector-pinot/src/main/java/org/apache/iggy/connector/pinot/consumer/IggyPartitionGroupConsumer.java:125— foreign/java/external-processors/iggy-connector-pinot/src/main/java/org/apache/iggy/connector/pinot/consumer/IggyPartitionGroupConsumer.java:125-137 | foreign/java/external-processors/iggy-connector-pinot/src/main/java/org/apache/iggy/connector/pinot/metadata/IggyStreamMetadataProvider.java:209-221 — 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 `foreign/java/external-processors/iggy-connector-pinot/src/main/java/org/apache/iggy/connector/pinot/consumer/IggyPartitionGroupConsumer.java: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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `foreign/java/external-processors/iggy-connector-pinot/src/main/java/org/apache/iggy/connector/pinot/consumer/IggyPartitionGroupConsumer.java:139` calls `of`, `valueOf` and `foreign/java/external-processors/iggy-connector-pinot/src/main/java/org/apache/iggy/connector/pinot/metadata/IggyStreamMetadataProvider.java:223` 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.
No assertions: CreateClient_TcpClientDisposesTwice foreign/csharp/Iggy_SDK_Tests/ClientTests/IggyClientFactoryTests.cs:129— 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: Validate_AcceptsTheLimits foreign/csharp/Iggy_SDK_Tests/ContractsTests/DeferredPollContractsTests.cs:110— 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: given_queries_the_rules_allow_when_validating_should_accept_them foreign/csharp/Iggy_SDK_Tests/MapperTests/MetadataChangesTests.cs:228— 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: Dispose_IsIdempotent foreign/csharp/Iggy_SDK_Tests/UtilityTests/PooledBufferWriterTests.cs:116— 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: BatchDispose_IsIdempotent foreign/csharp/Iggy_SDK_Tests/UtilityTests/RentedMessageBatchTests.cs:192— 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: ValidateUsername_AcceptsTheServerBounds foreign/csharp/Iggy_SDK_Tests/VsrTests/CredentialBoundsTests.cs:29— 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: ValidatePassword_AcceptsTheServerBounds foreign/csharp/Iggy_SDK_Tests/VsrTests/CredentialBoundsTests.cs:45— 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: given_a_writer_reference_when_abandoning_should_release_the_logical_count_before_its_bytes foreign/csharp/Iggy_SDK_Tests/VsrTests/MutationLaneTests.cs:113— 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 (19 corresponding lines) · ×8
Edited copy of a member (19 corresponding lines) core/binary_protocol/src/responses/consumer_groups/get_consumer_group.rs:51— core/binary_protocol/src/responses/consumer_groups/get_consumer_group.rs:51-74 | core/binary_protocol/src/responses/consumer_groups/sync_consumer_group.rs:51-69 — 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) core/shard/src/lib.rs:3540— core/shard/src/lib.rs:3540-3566 | core/shard/src/primary_rebalance.rs:1116-1134 — 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) core/message_bus/src/installer/tcp_tls.rs:57— core/message_bus/src/installer/tcp_tls.rs:57-75 | core/message_bus/src/installer/wss.rs:56-75 — 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) core/sdk/src/http/consumer_offsets.rs:39— core/sdk/src/http/consumer_offsets.rs:39-57 | core/sdk/src/http/consumer_offsets.rs:66-84 — 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) core/simulator/src/client.rs:893— core/simulator/src/client.rs:893-911 | core/simulator/src/client.rs:1056-1074 — 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) foreign/python/src/permissions.rs:59— foreign/python/src/permissions.rs:59-77 | foreign/python/src/permissions.rs:304-323 — 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) core/binary_protocol/src/consensus/header.rs:2365— core/binary_protocol/src/consensus/header.rs:2365-2383 | core/binary_protocol/src/consensus/header.rs:2591-2612 — 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) foreign/php/src/client.rs:919— foreign/php/src/client.rs:919-941 | foreign/php/src/client.rs:962-980 — 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.
Duplicated block (17 lines × 2) core/binary_protocol/src/requests/users/create_user.rs:93— core/binary_protocol/src/requests/users/create_user.rs:93-109 | core/binary_protocol/src/requests/users/update_permissions.rs:63-79 — 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 after the matched lines, `core/binary_protocol/src/requests/users/create_user.rs:111` calls `from_slice` and `core/binary_protocol/src/requests/users/update_permissions.rs:81` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (17 lines × 2) core/common/src/http/users/create_user.rs:63— core/common/src/http/users/create_user.rs:63-79 | core/common/src/http/users/login_user.rs:37-53 — 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) core/integration/src/harness/handle/server.rs:817— core/integration/src/harness/handle/server.rs:817-833 | core/integration/src/harness/handle/server.rs:999-1015 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/integration/src/harness/handle/server.rs:817` 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) core/kafka_wire/src/bounds_guard.rs:1578— core/kafka_wire/src/bounds_guard.rs:1578-1594 | core/kafka_wire/src/bounds_guard.rs:1631-1647 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/kafka_wire/src/bounds_guard.rs:1578` 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, `core/kafka_wire/src/bounds_guard.rs:1649` calls `read_i8` and `core/kafka_wire/src/bounds_guard.rs:1596` 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 (17 lines × 2) core/partitions/src/partition_storage.rs:963— core/partitions/src/partition_storage.rs:963-979 | core/partitions/src/partition_storage.rs:1003-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 `core/partitions/src/partition_storage.rs:963` 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, `core/partitions/src/partition_storage.rs:1020` calls `as_str` and `core/partitions/src/partition_storage.rs:980` 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 (17 lines × 2) core/shard/src/lib.rs:8802— core/shard/src/lib.rs:8802-8818 | core/shard/src/lib.rs:8832-8848 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/shard/src/lib.rs:8802` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `core/shard/src/lib.rs:8830` calls `total_len` and `core/shard/src/lib.rs:8800` 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 (17 lines × 2) core/tools/src/data-seeder/seeder.rs:64— core/tools/src/data-seeder/seeder.rs:64-80 | core/tools/src/data-seeder/seeder.rs:88-104 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/tools/src/data-seeder/seeder.rs:64` 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) core/server/src/dispatch/reads.rs:551— core/server/src/dispatch/reads.rs:551-567 | core/server/src/dispatch/reads.rs:574-590 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/server/src/dispatch/reads.rs:551` 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.
IggyMetadata::install_state_transfer (cognitive 85) core/metadata/src/impls/metadata.rs:2589— IggyMetadata::install_state_transfer has cognitive complexity 85 (threshold 15). Drivers by points: if/else 40 (73 pts), boolean chains 12 (nesting depth added 33). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IggyMetadata::on_replicate (cognitive 25) core/metadata/src/impls/metadata.rs:1912— IggyMetadata::on_replicate has cognitive complexity 25 (threshold 15). Drivers by points: if/else 17 (19 pts), boolean chains 3, match/switch 2 (3 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
IggyMetadata::submit_logout_in_process (cognitive 20) core/metadata/src/impls/metadata.rs:3168— IggyMetadata::submit_logout_in_process has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (14 pts), match/switch 3 (4 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IggyMetadata::drain_request_queue_into_prepares (cognitive 18) core/metadata/src/impls/metadata.rs:4294— IggyMetadata::drain_request_queue_into_prepares has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (13 pts), match/switch 2 (4 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IggyMetadata::submit_register_in_process (cognitive 16) core/metadata/src/impls/metadata.rs:2990— IggyMetadata::submit_register_in_process has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IggyMetadata::repair_primary_self_acks (cognitive 16) core/metadata/src/impls/metadata.rs:3999— IggyMetadata::repair_primary_self_acks has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), loops 4 (5 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IggyMetadata::prepare_request (cognitive 16) core/metadata/src/impls/metadata.rs:5075— IggyMetadata::prepare_request has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 2, match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D4 · Code Duplication· Edited copy of a member (23 corresponding lines) · ×7
Edited copy of a member (23 corresponding lines) core/bench/report/src/types/server_stats.rs:134— core/bench/report/src/types/server_stats.rs:134-157 | core/common/src/types/stats/mod.rs:147-169 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (23 corresponding lines) core/metadata/src/stm/stream.rs:1937— core/metadata/src/stm/stream.rs:1937-1959 | core/metadata/src/stm/stream.rs:2050-2073 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (23 corresponding lines) foreign/csharp/Iggy_SDK/Publishers/IggyPublisherOfT.cs:102— foreign/csharp/Iggy_SDK/Publishers/IggyPublisherOfT.cs:102-124 | foreign/csharp/Iggy_SDK/Publishers/IggyPublisherOfT.cs:137-160 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (23 corresponding lines) core/sdk/src/client_wrappers/client_wrapper.rs:77— core/sdk/src/client_wrappers/client_wrapper.rs:77-106 | core/sdk/src/client_wrappers/client_wrapper.rs:116-138 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (23 corresponding lines) foreign/go/binary_serialization/binary_response_deserializer.go:58— foreign/go/binary_serialization/binary_response_deserializer.go:58-85 | foreign/go/binary_serialization/binary_response_deserializer.go:493-515 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (23 corresponding lines) gateways/kafka/src/protocol/handlers/list_groups.rs:176— gateways/kafka/src/protocol/handlers/list_groups.rs:176-198 | gateways/kafka/src/protocol/handlers/metadata.rs:444-466 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (23 corresponding lines) core/integration/src/harness/handle/server.rs:811— core/integration/src/harness/handle/server.rs:811-833 | core/integration/src/harness/handle/server.rs:993-1015 — 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.
Duplicated block (16 lines × 2) core/common/src/types/configuration/quic_config/quic_connection_string_options.rs:115— core/common/src/types/configuration/quic_config/quic_connection_string_options.rs:115-130 | core/common/src/types/configuration/tcp_config/tcp_connection_string_options.rs:82-97 — 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 `core/common/src/types/configuration/quic_config/quic_connection_string_options.rs:115` it does not close everything it opens, so those exact lines 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) core/journal/src/prepare_journal.rs:1070— core/journal/src/prepare_journal.rs:1070-1085 | core/journal/src/prepare_journal.rs:1204-1219 — both copies are in the same file, so extract the 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, `core/journal/src/prepare_journal.rs:1087` calls `set`, `last` and `core/journal/src/prepare_journal.rs:1221` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (16 lines × 2) core/kafka_wire/src/bounds_guard.rs:1064— core/kafka_wire/src/bounds_guard.rs:1064-1079 | core/kafka_wire/src/bounds_guard.rs:1211-1226 — both copies are in the same file, so extract the 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, `core/kafka_wire/src/bounds_guard.rs:1082` calls `compact_string` and `core/kafka_wire/src/bounds_guard.rs:1228` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (16 lines × 2) core/metadata/src/stm/consumer_group.rs:703— core/metadata/src/stm/consumer_group.rs:703-718 | core/metadata/src/stm/consumer_group.rs:821-836 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/metadata/src/stm/consumer_group.rs:703` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16 lines × 2) core/server/src/dispatch/partition.rs:650— core/server/src/dispatch/partition.rs:650-665 | core/server/src/dispatch/partition.rs:1078-1093 — both copies are in the same file, so extract the 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 (16 lines × 2) gateways/kafka/src/protocol/handlers/alter_configs.rs:225— gateways/kafka/src/protocol/handlers/alter_configs.rs:225-240 | gateways/kafka/src/protocol/handlers/incremental_alter_configs.rs:247-262 — before extracting anything, compare `gateways/kafka/src/protocol/handlers/alter_configs.rs` and `gateways/kafka/src/protocol/handlers/incremental_alter_configs.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 112 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (16 lines × 2) examples/go/message-envelope/consumer/main.go:71— examples/go/message-envelope/consumer/main.go:71-86 | REDACTED:129-144 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (12 lines × 3) core/bench/src/analytics/report_builder.rs:214— core/bench/src/analytics/report_builder.rs:214-225 | core/common/src/wire_conversions.rs:454-465 | foreign/cpp/src/type_conversion.rs:298-309 — 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `stats` to `Stats` in one and `RustStats` 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) core/integration/src/harness/handle/connectors_runtime.rs:204— core/integration/src/harness/handle/connectors_runtime.rs:204-215 | core/integration/src/harness/handle/mcp.rs:185-196 | core/integration/src/harness/handle/server.rs:1150-1161 — 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 `core/integration/src/harness/handle/connectors_runtime.rs:204` 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) core/metadata/src/impls/metadata.rs:3561— core/metadata/src/impls/metadata.rs:3561-3572 | core/metadata/src/impls/metadata.rs:3689-3702 | core/metadata/src/impls/metadata.rs:3744-3757 — 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 `core/metadata/src/impls/metadata.rs:3561` it does not close everything it opens, so those exact lines 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 × 3) core/metadata/src/impls/metadata.rs:3614— core/metadata/src/impls/metadata.rs:3614-3626 | core/metadata/src/impls/metadata.rs:3682-3693 | core/metadata/src/impls/metadata.rs:3737-3748 — 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 (12 lines × 3) foreign/python/src/config.rs:209— foreign/python/src/config.rs:209-220 | foreign/python/src/config.rs:519-530 | foreign/python/src/config.rs:1085-1096 — 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 `foreign/python/src/config.rs:209` it does not close everything it opens, so those exact lines 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 × 3) examples/java/src/main/java/org/apache/iggy/examples/multitenant/consumer/MultiTenantConsumer.java:342— examples/java/src/main/java/org/apache/iggy/examples/multitenant/consumer/MultiTenantConsumer.java:342-353 | examples/java/src/main/java/org/apache/iggy/examples/multitenant/producer/MultiTenantProducer.java:346-357 | examples/java/src/main/java/org/apache/iggy/examples/sinkdataproducer/SinkDataProducer.java:153-164 — before extracting anything, compare `examples/java/src/main/java/org/apache/iggy/examples/multitenant/consumer/MultiTenantConsumer.java` and `examples/java/src/main/java/org/apache/iggy/examples/multitenant/producer/MultiTenantProducer.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 57 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 `examples/java/src/main/java/org/apache/iggy/examples/sinkdataproducer/SinkDataProducer.java:153` 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, `examples/java/src/main/java/org/apache/iggy/examples/sinkdataproducer/SinkDataProducer.java:152` calls `toLowerCase`, `replace` and `examples/java/src/main/java/org/apache/iggy/examples/multitenant/consumer/MultiTenantConsumer.java:341` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (12 lines × 3) examples/python/message-envelope/consumer.py:53— examples/python/message-envelope/consumer.py:53-64 | examples/python/message-envelope/producer.py:60-71 | examples/python/message-headers/common.py:73-84 — before extracting anything, compare `examples/python/message-envelope/consumer.py` and `examples/python/message-headers/common.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 50 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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.
Worker::complete_fetch (cyclomatic 49) core/sdk/src/clients/reader/worker.rs:1626— Worker::complete_fetch has cyclomatic complexity 49 (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.
Worker::complete_on_demand (cyclomatic 33) core/sdk/src/clients/reader/worker.rs:2193— Worker::complete_on_demand 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.
Worker::run (cyclomatic 27) core/sdk/src/clients/reader/worker.rs:342— Worker::run 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.
Worker::schedule_alone (cyclomatic 21) core/sdk/src/clients/reader/worker.rs:1177— Worker::schedule_alone 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.
Worker::refuse (cyclomatic 21) core/sdk/src/clients/reader/worker.rs:2616— Worker::refuse has cyclomatic complexity 21 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
Worker::complete_poll (cyclomatic 19) core/sdk/src/clients/reader/worker.rs:2074— Worker::complete_poll 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.
Repeated repair: core/sdk/src/websocket/websocket_client.rs core/sdk/src/websocket/websocket_client.rs:40— core/sdk/src/websocket/websocket_client.rs changed 16 times in last 90 days and 9 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 2 (its worst body is WebSocketClient::sign_in_with_credentials at line 40), 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: “fix(sdk): stop a reconnect sweep when the client shuts down (#4507)”; “fix(sdk): drop the oldest diagnostic event instead of blocking (#4501)”; “fix(sdk): keep an explicit disconnect until the next connect (#4388)”; “fix(sdk): keep a shut down client shut down (#4374)”. 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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:06:10 +01:00' --until='2026-11-14 14:06:10 +01:00' --full-history --no-merges -- core/sdk/src/websocket/websocket_client.rs`: 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.
Repeated repair: core/configs/src/configs_impl/typed_env_provider.rs core/configs/src/configs_impl/typed_env_provider.rs:266— core/configs/src/configs_impl/typed_env_provider.rs 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 13 (its worst body is TypedEnvProvider::warn_unknown_env_vars_inner at line 266), 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: “fix(repo): restore log bridge and guards lost in the connectors move (#4838)”; “fix(connectors): exclude key and version from connector env mappings (#4486)”; “fix(configs): check server env vars once and refuse boot only in debug (#4200)”; “fix(configs): allow sibling IGGY variables (#4149)”. 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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:06:10 +01:00' --until='2026-11-14 14:06:10 +01:00' --full-history --no-merges -- core/configs/src/configs_impl/typed_env_provider.rs`: 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.
Repeated repair: core/common/src/traits/client.rs core/common/src/traits/client.rs:110— core/common/src/traits/client.rs 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 1 (its worst body is Client::resolve_operation at line 110), 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: “fix(sdk): drop the oldest diagnostic event instead of blocking (#4501)”; “fix(sdk): keep an explicit disconnect until the next connect (#4388)”; “fix(sdk): keep a shut down client shut down (#4374)”; “fix(server): preserve write responses and validate CLI input (#4150)”. 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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:06:10 +01:00' --until='2026-11-14 14:06:10 +01:00' --full-history --no-merges -- core/common/src/traits/client.rs`: 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.
Repeated repair: core/server/src/shell.rs core/server/src/shell.rs:93— core/server/src/shell.rs 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 1 (its worst body is server::shell::duration_to_ticks at line 93), 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: “fix(server): recover stalled consumer groups after restarts (#4283)”; “fix(partitions): complete polls on the owning shard (#4119)”; “fix(shard): drive metadata repair and the commit walk from the tick (#4008)”; “fix(shard): drive partition repair and the commit walk from the tick (#4006)”. 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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:06:10 +01:00' --until='2026-11-14 14:06:10 +01:00' --full-history --no-merges -- core/server/src/shell.rs`: 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.
Repeated repair: core/sdk/src/clients/reader.rs core/sdk/src/clients/reader.rs:418— core/sdk/src/clients/reader.rs changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 9 (its worst body is PartitionReader::move_to at line 418), 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: “fix(cluster,sdk)!: prevent partition stalls and lost reader batches (#4868)”; “fix(sdk)!: prevent reader stalls, skips and premature poll errors (#4803)”; “fix(sdk): resume stopped partitions and keep readiness waits current (#4693)”. 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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:06:10 +01:00' --until='2026-11-14 14:06:10 +01:00' --full-history --no-merges -- core/sdk/src/clients/reader.rs`: 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.
Repeated repair: core/server/src/shard_allocator.rs core/server/src/shard_allocator.rs:368— core/server/src/shard_allocator.rs changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 10 (its worst body is ShardAllocator::to_shard_assignments at line 368), 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: “fix(server): skip NUMA memory binding on a single-node host (#4243)”; “fix(server): preserve write responses and validate CLI input (#4150)”; “fix(server): resolve non-Linux clippy errors in shard binding (#4144)”. 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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:06:10 +01:00' --until='2026-11-14 14:06:10 +01:00' --full-history --no-merges -- core/server/src/shard_allocator.rs`: 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 foreign/csharp/Iggy_SDK/Errors/ErrorFactory.cs:20— //TODO - refactor whole error system, once the contract is set and stone. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment foreign/csharp/Iggy_SDK/IggyClient/Implementations/HttpMessageStream.cs:82— //TODO - create mechanism for refreshing REDACTED token — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment foreign/csharp/Iggy_SDK/IggyClient/Implementations/HttpMessageStream.cs:83— //TODO - replace the HttpClient with IHttpClientFactory, when implementing support for ASP.NET Core DI — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment foreign/csharp/Iggy_SDK/IggyClient/Implementations/HttpMessageStream.cs:84— //TODO - the error handling pattern is pretty ugly, look into moving it into an extension method — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment foreign/csharp/Iggy_SDK/IggyClient/Implementations/HttpMessageStream.cs:1125— //TODO - this doesn't work prob needs a custom json serializer — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment foreign/csharp/Iggy_SDK/IggyClient/Implementations/HttpMessageStream.cs:1215— // TODO: Add binary protocol version — 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.
PartitionPrepareJournal::rewrite (cognitive 34) core/journal/src/partition_journal.rs:1517— PartitionPrepareJournal::rewrite has cognitive complexity 34 (threshold 15). Drivers by points: if/else 16 (30 pts), boolean chains 3, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PartitionPrepareJournal::append_batch_inner (cognitive 30) core/journal/src/partition_journal.rs:916— PartitionPrepareJournal::append_batch_inner has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (22 pts), boolean chains 5, loops 3 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PartitionPrepareJournal::reset_with_segment_checkpoint (cognitive 25) core/journal/src/partition_journal/segments.rs:253— PartitionPrepareJournal::reset_with_segment_checkpoint has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (20 pts), boolean chains 4, match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PartitionPrepareJournal::recover_entries (cognitive 21) core/journal/src/partition_journal.rs:1079— PartitionPrepareJournal::recover_entries has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 6, match/switch 1 (2 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PartitionPrepareJournal::recover_unpublished_tail (cognitive 18) core/journal/src/partition_journal.rs:1164— PartitionPrepareJournal::recover_unpublished_tail has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 4, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PartitionPrepareJournal::recover_segment_files (cognitive 16) core/journal/src/partition_journal/segments.rs:601— PartitionPrepareJournal::recover_segment_files has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 3, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Change coupling: bounds_guard.rs ↔ mod.rs core/kafka_wire/src/bounds_guard.rs:1— `core/kafka_wire/src/bounds_guard.rs` and `gateways/kafka/src/protocol/handlers/mod.rs` change together 73% of the time (8 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `99bde9d4` feat(gateways): serve ApiVersions v4 and v5 to Kafka 4 clients (#4780); `67e3a3c7` feat(gateways): serve Kafka IncrementalAlterConfigs (key 44) (#4572) (at that commit the file was still `gateways/kafka/src/protocol/bounds_guard.rs`); `3a8e8599` feat(gateways): serve Kafka CreatePartitions through the Iggy bridge … (at that commit the file was still `gateways/kafka/src/protocol/bounds_guard.rs`) — run `git show` on any of them.
Change coupling: quic_client.rs ↔ tcp_client.rs core/sdk/src/quic/quic_client.rs:1— `core/sdk/src/quic/quic_client.rs` and `core/sdk/src/tcp/tcp_client.rs` change together 73% of the time (8 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `b1166a59` fix(sdk): stop a reconnect sweep when the client shuts down (#4507); `69ab058c` fix(sdk): drop the oldest diagnostic event instead of blocking (#4501); `8ded5478` fix(sdk): keep an explicit disconnect until the next connect (#4388) — run `git show` on any of them.
Change coupling: benchmark_producer.rs ↔ common.rs core/bench/src/actors/producer/benchmark_producer.rs:1— `core/bench/src/actors/producer/benchmark_producer.rs` and `core/bench/src/args/common.rs` change together 62% of the time (8 of the 13 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `c0340966` fix(bench): pace warmup and rewind consumers (#4314); `fcc5a447` feat(bench): prettier table output (#3090); `8294ccef` feat(bench): add high-level consumer API for benchmarking (#1855) — run `git show` on any of them.
Change coupling: iggy_partition.rs ↔ metrics.rs core/partitions/src/iggy_partition.rs:1— `core/partitions/src/iggy_partition.rs` and `core/shard/src/metrics.rs` change together 57% of the time (8 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `bb525eae` perf(server): reconcile only the partitions of each committed op (#4756); `44c7dc83` fix(consensus): retry the primary's own write on prepare timeout (#4457); `22778643` fix(shard): drive metadata repair and the commit walk from the tick (… — run `git show` on any of them.
Change coupling: partition_helpers.rs ↔ lib.rs core/server/src/partition_helpers.rs:1— `core/server/src/partition_helpers.rs` and `core/shard/src/lib.rs` change together 56% of the time (10 of the 18 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 10 shared commits counted here, the most recent 3 are `ee3bb4f3` feat(partitions): add the tiered floor state machine to every partiti…; `39c1bd0a` fix(partitions): reserve offsets before confirming them (#3975); `bad22c03` feat(server): dedup partition writes with per-group client table slic… — run `git show` on any of them.
Change coupling: lib.rs ↔ deps.rs core/shard/src/lib.rs:1— `core/shard/src/lib.rs` and `core/simulator/src/deps.rs` change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `5713f97b` fix(metadata): keep a resumed primary from journaling stale prepares …; `22778643` fix(shard): drive metadata repair and the commit walk from the tick (…; `565e1a7b` refactor(shard): drop journal generic, metrics scrape, poll cursor (#… — run `git show` on any of them.
Duplicated block (19 lines × 2) core/binary_protocol/src/requests/users/login_register_with_pat.rs:100— core/binary_protocol/src/requests/users/login_register_with_pat.rs:100-118 | core/binary_protocol/src/requests/users/login_user.rs:102-120 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `core/binary_protocol/src/requests/users/login_register_with_pat.rs:100` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (19 lines × 2) core/metadata/src/stm/stream.rs:3438— core/metadata/src/stm/stream.rs:3438-3456 | core/metadata/src/stm/stream.rs:3932-3950 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/metadata/src/stm/stream.rs:3438` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (19 lines × 2) core/partitions/src/iggy_index_writer.rs:59— core/partitions/src/iggy_index_writer.rs:59-77 | core/partitions/src/messages_writer.rs:76-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. Read the line range as the matched WINDOW rather than a finished unit: at `core/partitions/src/iggy_index_writer.rs:59` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (19 lines × 2) core/server/src/http/handlers.rs:1831— core/server/src/http/handlers.rs:1831-1849 | core/server/src/http/handlers.rs:1899-1917 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/server/src/http/handlers.rs:1831` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (19 lines × 2) core/integration/src/harness/handle/connectors_runtime.rs:229— core/integration/src/harness/handle/connectors_runtime.rs:229-247 | core/integration/src/harness/handle/server.rs:1196-1214 — 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 `core/integration/src/harness/handle/connectors_runtime.rs:229` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (19 lines × 2) examples/go/getting-started/consumer/main.go:41— examples/go/getting-started/consumer/main.go:41-59 | examples/go/getting-started/producer/main.go:43-61 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
iggy_gateway_kafka::group::state::join_or_store_step (cyclomatic 17) gateways/kafka/src/group/state.rs:1346— iggy_gateway_kafka::group::state::join_or_store_step 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.
iggy_gateway_kafka::group::state::sync_or_store_step (cyclomatic 16) gateways/kafka/src/group/state.rs:1647— iggy_gateway_kafka::group::state::sync_or_store_step 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.
iggy_gateway_kafka::protocol::handlers::delete_groups::delete (cyclomatic 16) gateways/kafka/src/protocol/handlers/delete_groups.rs:140— iggy_gateway_kafka::protocol::handlers::delete_groups::delete has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
iggy_gateway_kafka::protocol::handlers::produce::handle (cyclomatic 16) gateways/kafka/src/protocol/handlers/produce.rs:91— iggy_gateway_kafka::protocol::handlers::produce::handle has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
iggy_gateway_kafka::protocol::handlers::topic_config::plan_set (cyclomatic 16) gateways/kafka/src/protocol/handlers/topic_config.rs:791— iggy_gateway_kafka::protocol::handlers::topic_config::plan_set has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
message_bus::transports::ws::run_pump (cognitive 37) core/message_bus/src/transports/ws.rs:186— message_bus::transports::ws::run_pump has cognitive complexity 37 (threshold 15). Drivers by points: match/switch 5 (15 pts), if/else 3 (12 pts), loops 4 (10 pts) (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
message_bus::transports::wss::run_pump (cognitive 37) core/message_bus/src/transports/wss.rs:334— message_bus::transports::wss::run_pump has cognitive complexity 37 (threshold 15). Drivers by points: match/switch 5 (15 pts), if/else 3 (12 pts), loops 4 (10 pts) (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
message_bus::transports::tcp_tls::run_pump (cognitive 28) core/message_bus/src/transports/tcp_tls.rs:521— message_bus::transports::tcp_tls::run_pump has cognitive complexity 28 (threshold 15). Drivers by points: if/else 3 (10 pts), loops 4 (10 pts), match/switch 3 (8 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
message_bus::installer::replica::install_replica_conn (cognitive 23) core/message_bus/src/installer/replica.rs:393— message_bus::installer::replica::install_replica_conn has cognitive complexity 23 (threshold 15). Drivers by points: if/else 15 (18 pts), boolean chains 4, match/switch 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
message_bus::transports::tcp::writer_loop (cognitive 18) core/message_bus/src/transports/tcp.rs:397— message_bus::transports::tcp::writer_loop has cognitive complexity 18 (threshold 15). Drivers by points: loops 4 (7 pts), if/else 3 (6 pts), match/switch 2 (5 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
integration::harness::log_capture::finish (cognitive 21) core/integration/src/harness/log_capture.rs:88— integration::harness::log_capture::finish has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 11). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
integration::harness::disk::collect_comparable_files (cognitive 17) core/integration/src/harness/disk.rs:265— integration::harness::disk::collect_comparable_files has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (integration::harness::disk::total_log_bytes) 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.
integration::harness::disk::total_log_bytes (cognitive 17) core/integration/src/harness/disk.rs:446— integration::harness::disk::total_log_bytes has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (integration::harness::disk::collect_comparable_files) 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.
integration::bench_utils::run_bench_and_wait_for_finish (cognitive 16) core/integration/src/bench_utils.rs:42— integration::bench_utils::run_bench_and_wait_for_finish has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (9 pts), loops 2 (3 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 4). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
integration::harness::config::resolve::resolve_config_paths (cognitive 16) core/integration/src/harness/config/resolve.rs:47— integration::harness::config::resolve::resolve_config_paths has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 2, match/switch 1 (2 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D4 · Code Duplication· Edited copy of a member (22 corresponding lines) · ×5
Edited copy of a member (22 corresponding lines) gateways/kafka/src/auth.rs:402— gateways/kafka/src/auth.rs:402-423 | gateways/kafka/src/bridge/iggy_bridge/mod.rs:705-728 — 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) core/partitions/src/iggy_partitions.rs:956— core/partitions/src/iggy_partitions.rs:956-978 | core/partitions/src/iggy_partitions.rs:981-1002 — 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) core/server/src/boot/handoff.rs:142— core/server/src/boot/handoff.rs:142-169 | core/server/src/boot/handoff.rs:183-204 — 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) core/cli/src/commands/binary_topics/create_topic.rs:82— core/cli/src/commands/binary_topics/create_topic.rs:82-104 | core/cli/src/commands/binary_topics/update_topic.rs:71-92 — 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) examples/go/message-envelope/consumer/main.go:70— examples/go/message-envelope/consumer/main.go:70-92 | REDACTED:128-149 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 13+ corresponding lines) · ×5
Edited copies of one member (3 members, 13+ corresponding lines) foreign/java/java-sdk/src/main/java/org/apache/iggy/serde/BytesDeserializer.java:117— foreign/java/java-sdk/src/main/java/org/apache/iggy/serde/BytesDeserializer.java:117-130 | foreign/java/java-sdk/src/main/java/org/apache/iggy/serde/BytesDeserializer.java:166-190 | foreign/java/java-sdk/src/main/java/org/apache/iggy/serde/BytesDeserializer.java:192-204 — 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) core/server_common/src/iobuf.rs:277— core/server_common/src/iobuf.rs:277-292 | core/server_common/src/iobuf.rs:490-506 | core/server_common/src/iobuf.rs:529-541 — 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) core/consensus/src/plane_helpers.rs:574— core/consensus/src/plane_helpers.rs:574-586 | core/consensus/src/plane_helpers.rs:612-631 | core/consensus/src/plane_helpers.rs:732-744 — 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) foreign/python/src/client.rs:823— foreign/python/src/client.rs:823-835 | foreign/python/src/client.rs:1430-1442 | foreign/python/src/client.rs:1473-1485 — 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) foreign/java/external-processors/iggy-connector-flink/iggy-flink-examples/src/main/java/org/apache/iggy/flink/example/model/EnrichedActivity.java:102— foreign/java/external-processors/iggy-connector-flink/iggy-flink-examples/src/main/java/org/apache/iggy/flink/example/model/EnrichedActivity.java:102-117 | foreign/java/external-processors/iggy-connector-flink/iggy-flink-examples/src/main/java/org/apache/iggy/flink/example/model/UserActivity.java:70-82 | foreign/java/external-processors/iggy-connector-flink/iggy-flink-examples/src/main/java/org/apache/iggy/flink/example/model/UserProfile.java:69-81 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 14+ corresponding lines) · ×5
Edited copies of one member (3 members, 14+ corresponding lines) foreign/java/external-processors/iggy-connector-flink/iggy-connector-library/src/main/java/org/apache/iggy/connector/flink/sink/IggyCommittable.java:94— foreign/java/external-processors/iggy-connector-flink/iggy-connector-library/src/main/java/org/apache/iggy/connector/flink/sink/IggyCommittable.java:94-107 | foreign/java/external-processors/iggy-connector-flink/iggy-connector-library/src/main/java/org/apache/iggy/connector/flink/source/IggySourceSplit.java:124-137 | foreign/java/external-processors/iggy-connector-flink/iggy-connector-library/src/main/java/org/apache/iggy/connector/partition/PartitionInfo.java:91-104 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 14+ corresponding lines) foreign/cpp/src/client.rs:416— foreign/cpp/src/client.rs:416-429 | foreign/cpp/src/client.rs:1360-1375 | foreign/cpp/src/client.rs:1596-1609 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 14+ corresponding lines) foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/tcp/PersonalAccessTokensTcpClient.java:72— foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/tcp/PersonalAccessTokensTcpClient.java:72-87 | foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/tcp/SystemTcpClient.java:77-90 | foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/tcp/SystemTcpClient.java:146-160 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 14+ corresponding lines) foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/tcp/SystemTcpClient.java:61— foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/tcp/SystemTcpClient.java:61-74 | foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/tcp/SystemTcpClient.java:114-127 | foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/tcp/SystemTcpClient.java:130-143 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 14+ corresponding lines) core/binary_protocol/src/responses/clients/client_response.rs:52— core/binary_protocol/src/responses/clients/client_response.rs:52-65 | core/binary_protocol/src/responses/consumer_offsets/get_consumer_offset.rs:52-65 | core/binary_protocol/src/responses/messages/send_messages.rs:65-79 — 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, 11+ corresponding lines) · ×5
Edited copies of one member (3 members, 11+ corresponding lines) core/server/src/responses.rs:788— core/server/src/responses.rs:788-798 | core/server/src/responses.rs:976-988 | core/server/src/responses.rs:990-1002 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 11+ corresponding lines) foreign/swift/Sources/Iggy/Models/Resources.swift:112— foreign/swift/Sources/Iggy/Models/Resources.swift:112-122 | foreign/swift/Sources/Iggy/Models/Resources.swift:136-148 | foreign/swift/Sources/Iggy/Models/Resources.swift:163-174 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 11+ corresponding lines) foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/tcp/PartitionsTcpClient.java:60— foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/tcp/PartitionsTcpClient.java:60-72 | foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/tcp/PartitionsTcpClient.java:75-87 | foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/tcp/TopicsTcpClient.java:131-141 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 11+ corresponding lines) foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/reader/ReaderSupport.java:432— foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/reader/ReaderSupport.java:432-444 | foreign/java/java-sdk/src/main/java/org/apache/iggy/client/blocking/reader/PartitionReader.java:110-120 | foreign/java/java-sdk/src/main/java/org/apache/iggy/client/blocking/tcp/FutureUtil.java:53-65 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 11+ corresponding lines) core/integration/src/harness/handle/connectors_runtime.rs:253— core/integration/src/harness/handle/connectors_runtime.rs:253-263 | core/integration/src/harness/handle/mcp.rs:217-227 | core/integration/src/harness/handle/server.rs:1220-1230 — 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 copy of a member (4 corresponding lines) · ×5
Edited copy of a member (4 corresponding lines) foreign/java/java-sdk/src/main/java/org/apache/iggy/client/blocking/http/ConsumerGroupsHttpClient.java:50— foreign/java/java-sdk/src/main/java/org/apache/iggy/client/blocking/http/ConsumerGroupsHttpClient.java:50-53 | foreign/java/java-sdk/src/main/java/org/apache/iggy/client/blocking/http/PersonalAccessTokensHttpClient.java:42-46 — 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) foreign/php/src/consumer.rs:146— foreign/php/src/consumer.rs:146-149 | foreign/php/src/reader.rs:141-144 — 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) examples/python/getting-started/consumer.py:65— examples/python/getting-started/consumer.py:65-68 | examples/python/getting-started/producer.py:62-65 — 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) examples/python/basic/consumer.py:110— examples/python/basic/consumer.py:110-113 | examples/python/getting-started/consumer.py:220-223 — 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) examples/java/src/main/java/org/apache/iggy/examples/gettingstarted/consumer/GettingStartedConsumer.java:117— examples/java/src/main/java/org/apache/iggy/examples/gettingstarted/consumer/GettingStartedConsumer.java:117-120 | examples/java/src/main/java/org/apache/iggy/examples/tcptls/consumer/TcpTlsConsumer.java:138-141 — 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 (18 lines × 2) core/integration/src/harness/seeds.rs:78— core/integration/src/harness/seeds.rs:78-95 | core/integration/src/harness/seeds.rs:105-122 — both copies are in the same file, so extract the 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 (18 lines × 2) core/server_common/src/send_messages.rs:322— core/server_common/src/send_messages.rs:322-339 | core/server_common/src/send_messages.rs:385-402 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/server_common/src/send_messages.rs:322` 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, `core/server_common/src/send_messages.rs:343` calls `freeze` and `core/server_common/src/send_messages.rs:406` 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 (18 lines × 2) foreign/go/internal/command/partition.go:37— foreign/go/internal/command/partition.go:37-54 | foreign/go/internal/command/partition.go:67-84 — both copies are in the same file, so extract the 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 (18 lines × 2) core/bench/report/src/types/group_metrics.rs:93— core/bench/report/src/types/group_metrics.rs:93-110 | core/bench/report/src/types/individual_metrics.rs:90-107 — before extracting anything, compare `core/bench/report/src/types/group_metrics.rs` and `core/bench/report/src/types/individual_metrics.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 34 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (18 lines × 2) examples/go/multi-tenant/consumer/main.go:48— examples/go/multi-tenant/consumer/main.go:48-65 | examples/go/multi-tenant/producer/main.go:50-67 — `examples/go/multi-tenant/consumer/main.go` and `examples/go/multi-tenant/producer/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 3 separate duplicated blocks between them, totalling at least 36 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `examples/go/multi-tenant/consumer/main.go:48` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (15 lines × 2) core/binary_protocol/src/primitives/permissions.rs:120— core/binary_protocol/src/primitives/permissions.rs:120-134 | core/binary_protocol/src/primitives/permissions.rs:162-176 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/binary_protocol/src/primitives/permissions.rs: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 (15 lines × 2) core/message_bus/src/transports/tcp_tls.rs:226— core/message_bus/src/transports/tcp_tls.rs:226-240 | core/message_bus/src/transports/wss.rs:185-199 — before extracting anything, compare `core/message_bus/src/transports/tcp_tls.rs` and `core/message_bus/src/transports/wss.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 68 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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 `core/message_bus/src/transports/tcp_tls.rs: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) foreign/java/java-sdk/src/main/java/org/apache/iggy/serde/BytesSerializer.java:382— foreign/java/java-sdk/src/main/java/org/apache/iggy/serde/BytesSerializer.java:382-396 | foreign/java/java-sdk/src/main/java/org/apache/iggy/serde/BytesSerializer.java:399-413 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (15 lines × 2) examples/java/src/main/java/org/apache/iggy/examples/multitenant/consumer/MultiTenantConsumer.java:93— examples/java/src/main/java/org/apache/iggy/examples/multitenant/consumer/MultiTenantConsumer.java:93-107 | examples/java/src/main/java/org/apache/iggy/examples/multitenant/producer/MultiTenantProducer.java:91-105 — before extracting anything, compare `examples/java/src/main/java/org/apache/iggy/examples/multitenant/consumer/MultiTenantConsumer.java` and `examples/java/src/main/java/org/apache/iggy/examples/multitenant/producer/MultiTenantProducer.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 57 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 `examples/java/src/main/java/org/apache/iggy/examples/multitenant/consumer/MultiTenantConsumer.java:93` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) foreign/java/bench/src/main/java/org/apache/iggy/bench/report/IndividualMetricsCalculator.java:172— foreign/java/bench/src/main/java/org/apache/iggy/bench/report/IndividualMetricsCalculator.java:172-186 | foreign/java/bench/src/main/java/org/apache/iggy/bench/report/IndividualMetricsCalculator.java:238-252 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `foreign/java/bench/src/main/java/org/apache/iggy/bench/report/IndividualMetricsCalculator.java:172` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (12–13 lines × 2) core/server/src/partition_helpers.rs:766— core/server/src/partition_helpers.rs:766-778 | core/server/src/partition_helpers.rs:1162-1173 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/server/src/partition_helpers.rs:766` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12–13 lines × 2) core/server_common/src/bootstrap.rs:127— core/server_common/src/bootstrap.rs:127-138 | core/server_common/src/fs_utils.rs:241-253 — 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 `core/server_common/src/bootstrap.rs:127` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. Note first that the copies are not typed on the same thing: the declarations holding them bind `root` to `impl AsRef<Path>` in one and `&Path` 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–13 lines × 2) foreign/php/src/metadata_changes.rs:1638— foreign/php/src/metadata_changes.rs:1638-1649 | foreign/python/src/metadata_changes.rs:1293-1305 — before extracting anything, compare `foreign/php/src/metadata_changes.rs` and `foreign/python/src/metadata_changes.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 62 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 `foreign/php/src/metadata_changes.rs:1638` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (12–13 lines × 2) foreign/php/src/receive_message.rs:290— foreign/php/src/receive_message.rs:290-302 | foreign/python/src/send_message.rs:49-60 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. 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, `foreign/python/src/send_message.rs:60` calls `clone` and `foreign/php/src/receive_message.rs:302` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (12–13 lines × 2) core/bench/src/actors/consumer/benchmark_consumer.rs:110— core/bench/src/actors/consumer/benchmark_consumer.rs:110-122 | core/bench/src/actors/producer/benchmark_producer.rs:108-119 — `core/bench/src/actors/consumer/benchmark_consumer.rs` and `core/bench/src/actors/producer/benchmark_producer.rs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 6 separate duplicated blocks between them, totalling at least 212 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `core/bench/src/actors/consumer/benchmark_consumer.rs: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. 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, `core/bench/src/actors/consumer/benchmark_consumer.rs:109` calls `make_rate_limiter` and `core/bench/src/actors/producer/benchmark_producer.rs:106` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (9 lines × 3) core/binary_protocol/src/primitives/permissions.rs:107— core/binary_protocol/src/primitives/permissions.rs:107-115 | core/binary_protocol/src/primitives/permissions.rs:160-168 | core/binary_protocol/src/primitives/permissions.rs:219-227 — 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 (9 lines × 3) core/kafka_wire/src/bounds_guard.rs:1034— core/kafka_wire/src/bounds_guard.rs:1034-1042 | core/kafka_wire/src/bounds_guard.rs:1185-1193 | core/kafka_wire/src/bounds_guard.rs:1248-1256 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `core/kafka_wire/src/bounds_guard.rs:1044` calls `read_i32` and `core/kafka_wire/src/bounds_guard.rs:1194` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (9 lines × 3) core/sdk/src/http/http_client.rs:549— core/sdk/src/http/http_client.rs:549-557 | core/sdk/src/quic/quic_client.rs:71-79 | core/sdk/src/tcp/tcp_client.rs:77-85 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
Duplicated block (9 lines × 3) core/partitions/src/segment_recovery.rs:2690— core/partitions/src/segment_recovery.rs:2690-2698 | core/partitions/src/segment_recovery.rs:2825-2833 | core/partitions/src/segment_recovery.rs:2839-2847 — 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 `core/partitions/src/segment_recovery.rs:2690` 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 × 3) examples/java/src/main/java/org/apache/iggy/examples/gettingstarted/consumer/GettingStartedConsumer.java:52— examples/java/src/main/java/org/apache/iggy/examples/gettingstarted/consumer/GettingStartedConsumer.java:52-60 | examples/java/src/main/java/org/apache/iggy/examples/messageenvelope/consumer/MessageEnvelopeConsumer.java:61-69 | examples/java/src/main/java/org/apache/iggy/examples/messageheaders/consumer/MessageHeadersConsumer.java:64-72 — before extracting anything, compare `examples/java/src/main/java/org/apache/iggy/examples/gettingstarted/consumer/GettingStartedConsumer.java` and `examples/java/src/main/java/org/apache/iggy/examples/messageenvelope/consumer/MessageEnvelopeConsumer.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 86 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 3) core/server/src/partition_reconciler.rs:1105— core/server/src/partition_reconciler.rs:1105-1112 | core/server/src/partition_reconciler.rs:1125-1132 | core/server/src/partition_reconciler.rs:1247-1254 — 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 `core/server/src/partition_reconciler.rs:1105` it does not close everything it opens, so those 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, `core/server/src/partition_reconciler.rs:1133` calls `key_context`, `kek_fingerprints`, `join` and `core/server/src/partition_reconciler.rs:1113` 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 × 3) core/common/src/types/message/deferred_poll_options.rs:128— core/common/src/types/message/deferred_poll_options.rs:128-135 | core/common/src/types/message/deferred_poll_options.rs:139-146 | core/server/src/http/wire.rs:148-155 — 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 first that the copies are not typed on the same thing: the declarations holding them bind `request` to `&DeferredPollMessagesRequest` in one and `&FetchMessagesRequest` 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 × 3) core/sdk/src/http/personal_access_tokens.rs:39— core/sdk/src/http/personal_access_tokens.rs:39-46 | core/sdk/src/http/streams.rs:50-57 | core/sdk/src/http/users.rs:54-61 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
Duplicated block (8 lines × 3) gateways/kafka/tools/kafka-tool/src/response.rs:311— gateways/kafka/tools/kafka-tool/src/response.rs:311-318 | gateways/kafka/tools/kafka-tool/src/response.rs:335-342 | gateways/kafka/tools/kafka-tool/src/response.rs:422-429 — 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 `gateways/kafka/tools/kafka-tool/src/response.rs: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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `gateways/kafka/tools/kafka-tool/src/response.rs:421` calls `topic_name` and `gateways/kafka/tools/kafka-tool/src/response.rs:310` 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 × 3) foreign/java/java-sdk/src/main/java/org/apache/iggy/serde/BytesDeserializer.java:840— foreign/java/java-sdk/src/main/java/org/apache/iggy/serde/BytesDeserializer.java:840-847 | foreign/java/java-sdk/src/main/java/org/apache/iggy/serde/BytesDeserializer.java:893-900 | foreign/java/java-sdk/src/main/java/org/apache/iggy/serde/BytesDeserializer.java:907-914 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (6 lines × 3) core/metadata/src/stm/stream.rs:1867— core/metadata/src/stm/stream.rs:1867-1872 | core/metadata/src/stm/stream.rs:1939-1944 | core/metadata/src/stm/stream.rs:2052-2057 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (6 lines × 3) core/shard/src/lib.rs:5840— core/shard/src/lib.rs:5840-5846 | core/shard/src/lib.rs:5893-5899 | core/shard/src/lib.rs:6411-6416 — 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 `core/shard/src/lib.rs:5840` it does not close everything it opens, so those 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 `msg` to `Message<StartViewChangeHeader>` in one and `Message<DoViewChangeHeader>` 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 × 3) core/common/src/types/configuration/quic_config/quic_client_config_builder.rs:165— core/common/src/types/configuration/quic_config/quic_client_config_builder.rs:165-170 | core/common/src/types/configuration/tcp_config/tcp_client_config_builder.rs:114-119 | core/common/src/types/configuration/websocket_config/websocket_client_config_builder.rs:149-154 — 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 (6 lines × 3) core/binary_protocol/src/primitives/metadata_changes/body.rs:706— core/binary_protocol/src/primitives/metadata_changes/body.rs:706-711 | core/binary_protocol/src/primitives/metadata_changes/mod.rs:270-275 | core/binary_protocol/src/primitives/metadata_changes/mod.rs:292-297 — 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 first that the copies are not typed on the same thing: the declarations holding them bind `value` to `Option<u64>` in one and `Option<u32>` 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 × 3) examples/csharp/src/GettingStarted/Iggy_SDK.Examples.GettingStarted.Producer/Utils.cs:39— examples/csharp/src/GettingStarted/Iggy_SDK.Examples.GettingStarted.Producer/Utils.cs:39-44 | examples/csharp/src/MessageEnvelope/Iggy_SDK.Examples.MessageEnvelope.Producer/Utils.cs:40-45 | examples/csharp/src/MessageHeaders/Iggy_SDK.Examples.MessageHeaders.Producer/Utils.cs:41-46 — before extracting anything, compare `examples/csharp/src/MessageEnvelope/Iggy_SDK.Examples.MessageEnvelope.Producer/Utils.cs` and `examples/csharp/src/MessageHeaders/Iggy_SDK.Examples.MessageHeaders.Producer/Utils.cs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 81 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 (11 lines × 3) core/message_bus/src/transports/tcp_tls.rs:595— core/message_bus/src/transports/tcp_tls.rs:595-612 | core/message_bus/src/transports/ws.rs:248-258 | core/message_bus/src/transports/wss.rs:399-409 — before extracting anything, compare `core/message_bus/src/transports/tcp_tls.rs` and `core/message_bus/src/transports/wss.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 68 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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 `core/message_bus/src/transports/tcp_tls.rs:595` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 3) core/common/src/types/configuration/quic_config/quic_connection_string_options.rs:132— core/common/src/types/configuration/quic_config/quic_connection_string_options.rs:132-142 | core/common/src/types/configuration/quic_config/quic_connection_string_options.rs:156-166 | core/common/src/types/configuration/quic_config/quic_connection_string_options.rs:172-182 — 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 `core/common/src/types/configuration/quic_config/quic_connection_string_options.rs:132` 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) core/message_bus/src/client_listener/tcp.rs:65— core/message_bus/src/client_listener/tcp.rs:65-75 | core/message_bus/src/client_listener/tcp_tls.rs:107-117 | core/message_bus/src/client_listener/wss.rs:101-111 — before extracting anything, compare `core/message_bus/src/client_listener/tcp.rs` and `core/message_bus/src/client_listener/tcp_tls.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 32 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 `core/message_bus/src/client_listener/tcp.rs:65` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 3) core/integration/src/harness/handle/client_builder.rs:189— core/integration/src/harness/handle/client_builder.rs:189-199 | core/integration/src/harness/handle/client_builder.rs:256-266 | core/integration/src/harness/handle/client_builder.rs:311-321 — 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 `core/integration/src/harness/handle/client_builder.rs:189` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 3) examples/python/high-level/background_producer.py:43— examples/python/high-level/background_producer.py:43-53 | examples/python/high-level/consumer.py:47-57 | examples/python/high-level/producer.py:43-53 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. The `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.
Off the main sequence: cpu_allocation — cpu_allocation: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 3 project(s), so it's rigid to change.
Off the main sequence: iggy_binary_protocol — iggy_binary_protocol: abstractness 0.01, instability 0.00, distance 0.99 — zone of pain — concrete and depended on by 16 project(s), so it's rigid to change.
Off the main sequence: github.com/apache/iggy/foreign/go — github.com/apache/iggy/foreign/go: abstractness 0.02, instability 0.00, distance 0.98 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
Off the main sequence: iggy_object_store — iggy_object_store: abstractness 0.04, instability 0.00, distance 0.96 — zone of pain — concrete and depended on by 4 project(s), so it's rigid to change.
Off the main sequence: iggy — iggy: abstractness 0.05, instability 0.20, distance 0.75 — zone of pain — concrete and depended on by 8 project(s), so it's rigid to change.
Unfinished stub — throws NotImplementedException foreign/csharp/Iggy_SDK/JsonConverters/ConsumerConverter.cs:27— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException foreign/csharp/Iggy_SDK/JsonConverters/ExpiryConverter.cs:37— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException foreign/csharp/Iggy_SDK/JsonConverters/MessageConverter.cs:27— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException foreign/csharp/Iggy_SDK/JsonConverters/MessagesConverter.cs:36— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException foreign/csharp/Iggy_SDK/JsonConverters/SizeConverter.cs:50— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Duplicated block (8 lines × 2 locations) REDACTED:255— REDACTED:255 · REDACTED:263 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (8 lines × 2 locations) foreign/node/src/stream/iggy-consumer.ts:97— foreign/node/src/stream/iggy-consumer.ts:97 · foreign/node/src/stream/iggy-consumer.ts:117 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (8 lines × 2 locations) foreign/node/src/wire/cluster/cluster.utils.ts:56— foreign/node/src/wire/cluster/cluster.utils.ts:56 · foreign/node/src/wire/cluster/cluster.utils.ts:131 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (8 lines × 2 locations) foreign/node/src/wire/session/login.utils.ts:54— foreign/node/src/wire/session/login.utils.ts:54 · foreign/node/src/wire/user/create-user.command.ts:60 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (8 lines × 2 locations) foreign/node/src/wire/user/permissions.utils.ts:251— foreign/node/src/wire/user/permissions.utils.ts:251 · foreign/node/src/wire/user/permissions.utils.ts:318 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
message_bus::installer::replica::install_replica_conn (cyclomatic 20) core/message_bus/src/installer/replica.rs:393— message_bus::installer::replica::install_replica_conn 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.
message_bus::transports::ws::run_pump (cyclomatic 19) core/message_bus/src/transports/ws.rs:186— message_bus::transports::ws::run_pump has cyclomatic complexity 19 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
message_bus::transports::wss::run_pump (cyclomatic 19) core/message_bus/src/transports/wss.rs:334— message_bus::transports::wss::run_pump has cyclomatic complexity 19 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
message_bus::transports::tcp_tls::run_pump (cyclomatic 16) core/message_bus/src/transports/tcp_tls.rs:521— message_bus::transports::tcp_tls::run_pump has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
kafka_message_gen::response::decode_body (cognitive 56) gateways/kafka/tools/kafka-tool/src/response.rs:208— kafka_message_gen::response::decode_body has cognitive complexity 56 (threshold 15). Drivers by points: loops 14 (32 pts), if/else 12 (23 pts), match/switch 1 (nesting depth added 29). 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.
kafka_message_gen::run_send (cognitive 44) gateways/kafka/tools/kafka-tool/src/main.rs:836— kafka_message_gen::run_send has cognitive complexity 44 (threshold 15). Drivers by points: if/else 9 (33 pts), match/switch 2 (6 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
kafka_message_gen::build_payload (cognitive 29) gateways/kafka/tools/kafka-tool/src/main.rs:256— kafka_message_gen::build_payload has cognitive complexity 29 (threshold 15). Drivers by points: if/else 16 (28 pts), match/switch 1 (nesting depth added 12). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
kafka_message_gen::cmd_generate (cognitive 18) gateways/kafka/tools/kafka-tool/src/main.rs:722— kafka_message_gen::cmd_generate has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 2 (3 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
shard::dispatch_vsr_actions (cognitive 54) core/shard/src/lib.rs:14995— shard::dispatch_vsr_actions has cognitive complexity 54 (threshold 15). Drivers by points: if/else 11 (34 pts), loops 6 (13 pts), match/switch 3 (6 pts), boolean chains 1 (nesting depth added 33). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
shard::dispatch_partition_journal_actions (cognitive 25) core/shard/src/lib.rs:15360— shard::dispatch_partition_journal_actions has cognitive complexity 25 (threshold 15). Drivers by points: loops 5 (12 pts), if/else 3 (11 pts), match/switch 1 (2 pts) (nesting depth added 16). 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.
shard::reconcile_partition_view_divergence (cognitive 21) core/shard/src/lib.rs:14631— shard::reconcile_partition_view_divergence has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 3, match/switch 1 (2 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
shard::reconcile_metadata_view_log (cognitive 19) core/shard/src/lib.rs:14504— shard::reconcile_metadata_view_log has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (15 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Simulator::step_with_senders (cognitive 33) core/simulator/src/lib.rs:973— Simulator::step_with_senders has cognitive complexity 33 (threshold 15). Drivers by points: if/else 8 (19 pts), match/switch 3 (9 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Simulator::try_await_setup_reply (cognitive 28) core/simulator/src/lib.rs:876— Simulator::try_await_setup_reply has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (22 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Simulator::reconcile_transitions (cognitive 24) core/simulator/src/lib.rs:1260— Simulator::reconcile_transitions has cognitive complexity 24 (threshold 15). Drivers by points: loops 6 (12 pts), if/else 3 (9 pts), match/switch 1 (3 pts) (nesting depth added 14). 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.
Simulator::build_inner (cognitive 18) core/simulator/src/lib.rs:399— Simulator::build_inner has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 6 (9 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
VsrConsensus::tick_with_history_fence (cognitive 28) core/consensus/src/impls.rs:3369— VsrConsensus::tick_with_history_fence has cognitive complexity 28 (threshold 15). Drivers by points: if/else 13 (21 pts), boolean chains 5, match/switch 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
VsrConsensus::handle_do_view_change (cognitive 19) core/consensus/src/impls.rs:4303— VsrConsensus::handle_do_view_change has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13 (18 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
VsrConsensus::try_handle_start_view (cognitive 18) core/consensus/src/impls.rs:4859— VsrConsensus::try_handle_start_view has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 4, match/switch 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
VsrConsensus::handle_commit (cognitive 16) core/consensus/src/impls.rs:5103— VsrConsensus::handle_commit has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
consensus::dvc_merge::merge_dvc_quorum (cognitive 27) core/consensus/src/dvc_merge.rs:582— consensus::dvc_merge::merge_dvc_quorum has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (24 pts), boolean chains 2, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
consensus::view_change_quorum::dvc_suffix_decode (cognitive 27) core/consensus/src/view_change_quorum.rs:367— consensus::view_change_quorum::dvc_suffix_decode has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (23 pts), boolean chains 3, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
consensus::dvc_merge::tally_op (cognitive 26) core/consensus/src/dvc_merge.rs:258— consensus::dvc_merge::tally_op has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 4, match/switch 1 (4 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
consensus::dvc_merge::committed_elsewhere (cognitive 21) core/consensus/src/dvc_merge.rs:419— consensus::dvc_merge::committed_elsewhere has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ServerHandle::start (cognitive 25) core/integration/src/harness/handle/server.rs:1017— ServerHandle::start has cognitive complexity 25 (threshold 15). Drivers by points: if/else 15 (18 pts), boolean chains 6, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
ServerHandle::set_protocol_addresses (cognitive 17) core/integration/src/harness/handle/server.rs:520— ServerHandle::set_protocol_addresses has cognitive complexity 17 (threshold 15). Drivers by points: if/else 14 (16 pts), boolean chains 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
ServerHandle::build_envs (cognitive 16) core/integration/src/harness/handle/server.rs:399— ServerHandle::build_envs has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (12 pts), loops 2, boolean chains 1, match/switch 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
ServerHandle::start_dependents (cognitive 16) core/integration/src/harness/handle/server.rs:907— ServerHandle::start_dependents has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PartitionLog::write_on (cognitive 25) gateways/kafka/src/coordinator/partition.rs:637— PartitionLog::write_on has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (14 pts), match/switch 2 (7 pts), boolean chains 2, loops 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PartitionLog::checkpoint_chunk (cognitive 19) gateways/kafka/src/coordinator/partition.rs:870— PartitionLog::checkpoint_chunk has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 3, match/switch 1 (2 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PartitionLog::read_on (cognitive 16) gateways/kafka/src/coordinator/partition.rs:534— PartitionLog::read_on has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), match/switch 3 (7 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PartitionLog::take_records (cognitive 16) gateways/kafka/src/coordinator/partition.rs:584— PartitionLog::take_records has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (11 pts), match/switch 2 (4 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D30 · Dependency Vulnerabilities· Medium vulnerability · ×4
REDACTED
REDACTED
REDACTED
REDACTED
D4 · Code Duplication· Edited copy of a member (32 corresponding lines) · ×4
Edited copy of a member (32 corresponding lines) core/integration/src/harness/handle/client.rs:112— core/integration/src/harness/handle/client.rs:112-143 | core/integration/src/harness/handle/client.rs:186-217 — 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) gateways/kafka/src/protocol/handlers/alter_configs.rs:186— gateways/kafka/src/protocol/handlers/alter_configs.rs:186-217 | gateways/kafka/src/protocol/handlers/incremental_alter_configs.rs:204-239 — 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) core/ai/mcp/src/log.rs:149— core/ai/mcp/src/log.rs:149-180 | core/ai/mcp/src/log.rs:185-216 — 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) core/simulator/src/workload/ops/create_consumer_group.rs:54— core/simulator/src/workload/ops/create_consumer_group.rs:54-90 | core/simulator/src/workload/ops/delete_consumer_group.rs:55-86 — 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 (35 corresponding lines) · ×4
Edited copy of a member (35 corresponding lines) core/server_common/src/bootstrap.rs:123— core/server_common/src/bootstrap.rs:123-157 | core/server_common/src/fs_utils.rs:239-277 — These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (35 corresponding lines) core/simulator/src/workload/oracle.rs:1100— core/simulator/src/workload/oracle.rs:1100-1139 | core/simulator/src/workload/oracle.rs:1141-1175 — These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (35 corresponding lines) foreign/csharp/Iggy_SDK/Publishers/IggyPublisherBuilder.cs:333— foreign/csharp/Iggy_SDK/Publishers/IggyPublisherBuilder.cs:333-367 | foreign/csharp/Iggy_SDK/Publishers/IggyPublisherBuilderOfT.cs:83-122 — These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (35 corresponding lines) core/bench/src/analytics/time_series/calculator.rs:49— core/bench/src/analytics/time_series/calculator.rs:49-83 | core/bench/src/analytics/time_series/calculator.rs:85-124 — 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) · ×4
Edited copy of a member (29 corresponding lines) core/configs/src/configs_impl/typed_env_provider.rs:379— core/configs/src/configs_impl/typed_env_provider.rs:379-409 | core/integration/src/harness/config/resolve.rs:167-195 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (29 corresponding lines) core/partitions/src/partition_storage.rs:960— core/partitions/src/partition_storage.rs:960-988 | core/partitions/src/partition_storage.rs:1000-1028 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (29 corresponding lines) core/cli/src/commands/binary_context/common.rs:134— core/cli/src/commands/binary_context/common.rs:134-162 | core/cli/src/commands/binary_context/common.rs:164-200 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (29 corresponding lines) foreign/csharp/Iggy_SDK/Consumers/IggyConsumerBuilder.cs:253— foreign/csharp/Iggy_SDK/Consumers/IggyConsumerBuilder.cs:253-281 | foreign/csharp/Iggy_SDK/Consumers/IggyConsumerBuilderOfT.cs:87-120 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (28 corresponding lines) · ×4
Edited copy of a member (28 corresponding lines) core/server_common/src/consensus_message.rs:322— core/server_common/src/consensus_message.rs:322-350 | core/server_common/src/consensus_message.rs:361-388 — 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) core/partitions/src/iggy_partition.rs:13085— core/partitions/src/iggy_partition.rs:13085-13112 | core/partitions/src/iggy_partition.rs:13233-13262 — 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) core/simulator/src/workload/oracle.rs:441— core/simulator/src/workload/oracle.rs:441-471 | core/simulator/src/workload/oracle.rs:479-506 — 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) foreign/csharp/Iggy_SDK/JsonConverters/MessageConverter.cs:61— foreign/csharp/Iggy_SDK/JsonConverters/MessageConverter.cs:61-88 | foreign/csharp/Iggy_SDK/JsonConverters/UserHeadersConverter.cs:206-233 — 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 (21 corresponding lines) · ×4
Edited copy of a member (21 corresponding lines) core/object_store/src/contract.rs:393— core/object_store/src/contract.rs:393-413 | core/object_store/src/contract.rs:420-440 — 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) foreign/swift/Sources/Iggy/Client/ClientCore.swift:1487— foreign/swift/Sources/Iggy/Client/ClientCore.swift:1487-1512 | foreign/swift/Sources/Iggy/Client/ClientCore.swift:1517-1537 — 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) foreign/cpp/src/consumer.rs:59— foreign/cpp/src/consumer.rs:59-79 | foreign/cpp/src/reader.rs:69-89 — 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) foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/tcp/MessagesTcpClient.java:156— foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/tcp/MessagesTcpClient.java:156-177 | foreign/java/java-sdk/src/main/java/org/apache/iggy/client/blocking/http/MessagesHttpClient.java:89-109 — 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 (24 corresponding lines) · ×4
Edited copy of a member (24 corresponding lines) foreign/java/external-processors/iggy-connector-flink/iggy-connector-library/src/main/java/org/apache/iggy/connector/flink/sink/IggyCommittable.java:48— foreign/java/external-processors/iggy-connector-flink/iggy-connector-library/src/main/java/org/apache/iggy/connector/flink/sink/IggyCommittable.java:48-71 | foreign/java/external-processors/iggy-connector-flink/iggy-connector-library/src/main/java/org/apache/iggy/connector/flink/source/IggySourceSplit.java:50-73 — 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) core/message_bus/src/installer/replica.rs:680— core/message_bus/src/installer/replica.rs:680-703 | core/message_bus/src/installer/tcp.rs:275-307 — 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) core/binary_protocol/src/consensus/header.rs:1184— core/binary_protocol/src/consensus/header.rs:1184-1207 | core/binary_protocol/src/consensus/header.rs:1313-1336 — 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) core/harness_derive/src/codegen.rs:603— core/harness_derive/src/codegen.rs:603-626 | core/harness_derive/src/codegen.rs:629-655 — 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, 9+ corresponding lines) · ×4
Edited copies of one member (3 members, 9+ corresponding lines) foreign/csharp/Iggy_SDK/IggyClient/Implementations/HttpMessageStream.cs:1108— foreign/csharp/Iggy_SDK/IggyClient/Implementations/HttpMessageStream.cs:1108-1120 | foreign/csharp/Iggy_SDK/IggyClient/Implementations/HttpMessageStream.cs:1188-1196 | foreign/csharp/Iggy_SDK/IggyClient/Implementations/HttpMessageStream.cs:1201-1210 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 9+ corresponding lines) foreign/python/src/client.rs:639— foreign/python/src/client.rs:639-647 | foreign/python/src/client.rs:857-868 | foreign/python/src/client.rs:1038-1049 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 9+ corresponding lines) foreign/java/java-sdk/src/main/java/org/apache/iggy/client/blocking/http/StreamsHttpClient.java:100— foreign/java/java-sdk/src/main/java/org/apache/iggy/client/blocking/http/StreamsHttpClient.java:100-110 | foreign/java/java-sdk/src/main/java/org/apache/iggy/client/blocking/http/TopicsHttpClient.java:111-121 | foreign/java/java-sdk/src/main/java/org/apache/iggy/client/blocking/http/UsersHttpClient.java:142-150 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 9+ corresponding lines) foreign/java/external-processors/iggy-connector-flink/iggy-connector-library/src/main/java/org/apache/iggy/connector/flink/sink/IggyCommittable.java:115— foreign/java/external-processors/iggy-connector-flink/iggy-connector-library/src/main/java/org/apache/iggy/connector/flink/sink/IggyCommittable.java:115-123 | foreign/java/external-processors/iggy-connector-flink/iggy-connector-library/src/main/java/org/apache/iggy/connector/flink/source/IggySourceSplit.java:145-153 | foreign/java/external-processors/iggy-connector-flink/iggy-connector-library/src/main/java/org/apache/iggy/connector/partition/PartitionInfo.java:112-121 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Duplicated block (20 lines × 2) foreign/csharp/Iggy_SDK/JsonConverters/MessageConverter.cs:92— foreign/csharp/Iggy_SDK/JsonConverters/MessageConverter.cs:92-111 | foreign/csharp/Iggy_SDK/JsonConverters/UserHeadersConverter.cs:237-256 — 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 (20 lines × 2) core/partitions/src/iggy_partition.rs:10015— core/partitions/src/iggy_partition.rs:10015-10034 | core/partitions/src/iggy_partition.rs:15377-15396 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/partitions/src/iggy_partition.rs:10015` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (20 lines × 2) core/partitions/src/segment_recovery.rs:2114— core/partitions/src/segment_recovery.rs:2114-2133 | core/partitions/src/segment_recovery.rs:2136-2155 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/partitions/src/segment_recovery.rs:2114` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (20 lines × 2) foreign/java/java-sdk/src/main/java/org/apache/iggy/client/blocking/http/MetadataChangesJson.java:128— foreign/java/java-sdk/src/main/java/org/apache/iggy/client/blocking/http/MetadataChangesJson.java:128-147 | foreign/java/java-sdk/src/main/java/org/apache/iggy/serde/MetadataChangesReader.java:170-189 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. Note first that the copies are not typed on the same thing: the declarations holding them bind `body` to `JsonNode` in one and `ByteBuf` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (7 lines × 3) foreign/csharp/Iggy_SDK/Contracts/Tcp/TcpContracts.cs:889— foreign/csharp/Iggy_SDK/Contracts/Tcp/TcpContracts.cs:889-895 | foreign/csharp/Iggy_SDK/Contracts/Tcp/TcpContracts.cs:911-917 | foreign/csharp/Iggy_SDK/Contracts/Tcp/TcpContracts.cs:1043-1049 — 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 `foreign/csharp/Iggy_SDK/Contracts/Tcp/TcpContracts.cs:889` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 3) core/cli/src/commands/binary_consumer_groups/get_consumer_group.rs:64— core/cli/src/commands/binary_consumer_groups/get_consumer_group.rs:64-72 | core/cli/src/commands/binary_streams/get_stream.rs:51-57 | core/cli/src/commands/binary_users/get_user.rs:54-61 — 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 `core/cli/src/commands/binary_consumer_groups/get_consumer_group.rs:64` 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 (7 lines × 3) examples/java/src/main/java/org/apache/iggy/examples/messageenvelope/producer/MessageEnvelopeProducer.java:69— examples/java/src/main/java/org/apache/iggy/examples/messageenvelope/producer/MessageEnvelopeProducer.java:69-75 | examples/java/src/main/java/org/apache/iggy/examples/messageheaders/producer/MessageHeadersProducer.java:69-75 | examples/java/src/main/java/org/apache/iggy/examples/streambuilder/StreamBasic.java:119-125 — 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 `examples/java/src/main/java/org/apache/iggy/examples/messageenvelope/producer/MessageEnvelopeProducer.java:69` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 3) foreign/java/bench/src/main/java/org/apache/iggy/bench/report/IndividualMetricsCalculator.java:171— foreign/java/bench/src/main/java/org/apache/iggy/bench/report/IndividualMetricsCalculator.java:171-177 | foreign/java/bench/src/main/java/org/apache/iggy/bench/report/IndividualMetricsCalculator.java:237-243 | foreign/java/bench/src/main/java/org/apache/iggy/bench/report/IndividualMetricsCalculator.java:303-309 — 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–9 lines × 2) core/metadata/src/impls/metadata.rs:3251— core/metadata/src/impls/metadata.rs:3251-3258 | core/metadata/src/impls/metadata.rs:3266-3274 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/metadata/src/impls/metadata.rs:3266` 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–9 lines × 2) foreign/python/src/client.rs:758— foreign/python/src/client.rs:758-766 | foreign/python/src/client.rs:1122-1129 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `foreign/python/src/client.rs:758` 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–9 lines × 2) foreign/java/external-processors/iggy-connector-flink/iggy-connector-library/src/main/java/org/apache/iggy/connector/flink/sink/IggySink.java:127— foreign/java/external-processors/iggy-connector-flink/iggy-connector-library/src/main/java/org/apache/iggy/connector/flink/sink/IggySink.java:127-134 | foreign/java/external-processors/iggy-connector-flink/iggy-connector-library/src/main/java/org/apache/iggy/connector/flink/source/IggySource.java:163-171 — 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 `foreign/java/external-processors/iggy-connector-flink/iggy-connector-library/src/main/java/org/apache/iggy/connector/flink/sink/IggySink.java:127` 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 (8–9 lines × 2) foreign/swift/Sources/Iggy/Models/Resources.swift:112— foreign/swift/Sources/Iggy/Models/Resources.swift:112-119 | foreign/swift/Sources/Iggy/Models/Resources.swift:163-171 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `foreign/swift/Sources/Iggy/Models/Resources.swift:112` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2 locations) foreign/node/src/wire/stream/get-stream.command.ts:27— foreign/node/src/wire/stream/get-stream.command.ts:27 · foreign/node/src/wire/user/get-user.command.ts:28 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (12 lines × 2 locations) foreign/node/src/wire/user/permissions.utils.ts:291— foreign/node/src/wire/user/permissions.utils.ts:291 · foreign/node/src/wire/user/permissions.utils.ts:349 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (12 lines × 2 locations) foreign/node/src/wire/vsr/register.ts:61— foreign/node/src/wire/vsr/register.ts:61 · foreign/node/src/wire/vsr/register.ts:81 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (12 lines × 2 locations) web/src/lib/components/Modals/InspectMessage.svelte:52— web/src/lib/components/Modals/InspectMessage.svelte:52 · web/src/lib/components/Modals/InspectMessage.svelte:65 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (9 lines × 2 locations) foreign/node/src/debug-send.ts:68— foreign/node/src/debug-send.ts:68 · foreign/node/src/debug.ts:67 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (9 lines × 2 locations) foreign/node/src/wire/client/client.utils.ts:31— foreign/node/src/wire/client/client.utils.ts:31 · foreign/node/src/wire/user/user.utils.ts:69 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
Duplicated block (9 lines × 2 locations) foreign/node/src/wire/consumer-group/get-group.command.ts:37— foreign/node/src/wire/consumer-group/get-group.command.ts:37 · foreign/node/src/wire/topic/get-topic.command.ts:45 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (9 lines × 2 locations) web/src/lib/api/clientApi.ts:47— web/src/lib/api/clientApi.ts:47 · web/src/lib/api/fetchApi.ts:37 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
kafka_message_gen::build_payload (cyclomatic 45) gateways/kafka/tools/kafka-tool/src/main.rs:256— kafka_message_gen::build_payload has cyclomatic complexity 45 (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.
kafka_message_gen::response::decode_body (cyclomatic 37) gateways/kafka/tools/kafka-tool/src/response.rs:208— kafka_message_gen::response::decode_body has cyclomatic complexity 37 (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.
kafka_message_gen::run_send (cyclomatic 17) gateways/kafka/tools/kafka-tool/src/main.rs:836— kafka_message_gen::run_send 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.
IggyMetadata::install_state_transfer (cyclomatic 43) core/metadata/src/impls/metadata.rs:2589— IggyMetadata::install_state_transfer 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.
IggyMetadata::on_replicate (cyclomatic 22) core/metadata/src/impls/metadata.rs:1912— IggyMetadata::on_replicate has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
IggyMetadata::submit_logout_in_process (cyclomatic 17) core/metadata/src/impls/metadata.rs:3168— IggyMetadata::submit_logout_in_process 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.
metadata::stm::authz::authorize (cyclomatic 35) core/metadata/src/stm/authz.rs:249— metadata::stm::authz::authorize 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.
metadata::impls::recovery::recover (cyclomatic 28) core/metadata/src/impls/recovery.rs:433— metadata::impls::recovery::recover 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.
metadata::impls::metadata::apply_committed_prepare (cyclomatic 16) core/metadata/src/impls/metadata.rs:923— metadata::impls::metadata::apply_committed_prepare 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.
PartitionPrepareJournal::append_batch_inner (cyclomatic 19) core/journal/src/partition_journal.rs:916— PartitionPrepareJournal::append_batch_inner 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.
PartitionPrepareJournal::reset_with_segment_checkpoint (cyclomatic 18) core/journal/src/partition_journal/segments.rs:253— PartitionPrepareJournal::reset_with_segment_checkpoint 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.
PartitionPrepareJournal::rewrite (cyclomatic 17) core/journal/src/partition_journal.rs:1517— PartitionPrepareJournal::rewrite 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.
OperationDriver::attempt (cognitive 45) core/sdk/src/driver.rs:677— OperationDriver::attempt has cognitive complexity 45 (threshold 15). Drivers by points: if/else 14 (24 pts), boolean chains 12, match/switch 5 (9 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
OperationDriver::settle (cognitive 17) core/sdk/src/driver.rs:1106— OperationDriver::settle has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 4, match/switch 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
OperationDriver::lookup (cognitive 17) core/sdk/src/driver.rs:1370— OperationDriver::lookup has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (13 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
metadata::impls::recovery::recover (cognitive 42) core/metadata/src/impls/recovery.rs:433— metadata::impls::recovery::recover has cognitive complexity 42 (threshold 15). Drivers by points: if/else 21 (36 pts), boolean chains 3, match/switch 2, loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
metadata::stm::authz::authorize (cognitive 30) core/metadata/src/stm/authz.rs:249— metadata::stm::authz::authorize has cognitive complexity 30 (threshold 15). Drivers by points: if/else 14 (27 pts), match/switch 2 (3 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
metadata::impls::metadata::apply_committed_prepare (cognitive 23) core/metadata/src/impls/metadata.rs:923— metadata::impls::metadata::apply_committed_prepare has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (20 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PrepareJournal::scan (cognitive 37) core/journal/src/prepare_journal.rs:602— PrepareJournal::scan has cognitive complexity 37 (threshold 15). Drivers by points: if/else 14 (32 pts), boolean chains 2, match/switch 1 (2 pts), loops 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PrepareJournal::remove_range (cognitive 16) core/journal/src/prepare_journal.rs:1026— PrepareJournal::remove_range has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 3, boolean chains 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PrepareJournal::drain (cognitive 16) core/journal/src/prepare_journal.rs:1143— PrepareJournal::drain has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 4, boolean chains 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IggyConsumer::consume_messages (cognitive 29) core/sdk/src/consumer_ext/consumer_message_ext.rs:85— IggyConsumer::consume_messages has cognitive complexity 29 (threshold 15). Drivers by points: if/else 5 (19 pts), match/switch 3 (9 pts), loops 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IggyConsumer::init (cognitive 19) core/sdk/src/clients/consumer.rs:664— IggyConsumer::init has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (13 pts), match/switch 2 (4 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IggyConsumer::consume_messages (cognitive 16) foreign/php/src/consumer.rs:189— IggyConsumer::consume_messages has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LinksShared::run_slot (cognitive 19) core/sdk/src/links/replicas.rs:1126— LinksShared::run_slot has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (11 pts), match/switch 3 (6 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LinksShared::apply_roster (cognitive 18) core/sdk/src/links/replicas.rs:998— LinksShared::apply_roster has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 2, loops 2, match/switch 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LinksShared::sweep (cognitive 16) core/sdk/src/links/replicas.rs:581— LinksShared::sweep has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 3 (6 pts), if/else 3 (5 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ClientTable::decode (cognitive 18) core/consensus/src/client_table.rs:1714— ClientTable::decode has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 2 (3 pts), match/switch 2 (3 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ClientTable::check_request (cognitive 16) core/consensus/src/client_table.rs:941— ClientTable::check_request has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 1, match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ClientTable::commit_request (cognitive 16) core/consensus/src/client_table.rs:1264— ClientTable::commit_request has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D4 · Code Duplication· Members sharing a duplicated core (5 members, 50+ identical tokens) · ×3
Members sharing a duplicated core (5 members, 50+ identical tokens) core/binary_protocol/src/codec.rs:84— core/binary_protocol/src/codec.rs:84-102 | core/binary_protocol/src/codec.rs:110-128 | core/binary_protocol/src/codec.rs:136-154 | core/binary_protocol/src/codec.rs:187-205 | core/binary_protocol/src/codec.rs:213-231 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
Members sharing a duplicated core (5 members, 50+ identical tokens) core/kafka_wire/src/bounds_guard.rs:711— core/kafka_wire/src/bounds_guard.rs:711-779 | core/kafka_wire/src/bounds_guard.rs:795-818 | core/kafka_wire/src/bounds_guard.rs:833-881 | core/kafka_wire/src/bounds_guard.rs:1376-1399 | core/kafka_wire/src/bounds_guard.rs:1442-1462 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
Members sharing a duplicated core (5 members, 50+ identical tokens) foreign/go/internal/command/offset.go:42— foreign/go/internal/command/offset.go:42-75 | foreign/go/internal/command/offset.go:88-119 | foreign/go/internal/command/offset.go:132-164 | foreign/go/internal/command/partition.go:36-54 | foreign/go/internal/command/partition.go:66-84 — 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 (51 corresponding lines) · ×3
Edited copy of a member (51 corresponding lines) core/server/src/dispatch/session_ops.rs:587— core/server/src/dispatch/session_ops.rs:587-644 | core/server/src/dispatch/session_ops.rs:808-858 — These two members are one piece of code written twice and then edited apart: 51 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (51 corresponding lines) core/partitions/src/iggy_partition.rs:9997— core/partitions/src/iggy_partition.rs:9997-10053 | core/partitions/src/iggy_partition.rs:15361-15411 — These two members are one piece of code written twice and then edited apart: 51 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (51 corresponding lines) core/server/src/http/handlers.rs:1799— core/server/src/http/handlers.rs:1799-1849 | core/server/src/http/handlers.rs:1866-1917 — These two members are one piece of code written twice and then edited apart: 51 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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) · ×3
Edited copy of a member (36 corresponding lines) core/common/src/types/permissions/permissions_global.rs:223— core/common/src/types/permissions/permissions_global.rs:223-264 | core/common/src/types/permissions/permissions_global.rs:292-327 — These two members are one piece of code written twice and then edited apart: 36 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (36 corresponding lines) core/metadata/src/impls/metadata.rs:3606— core/metadata/src/impls/metadata.rs:3606-3659 | core/metadata/src/impls/metadata.rs:3732-3767 — These two members are one piece of code written twice and then edited apart: 36 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (36 corresponding lines) core/metadata/src/impls/metadata.rs:3350— core/metadata/src/impls/metadata.rs:3350-3403 | core/metadata/src/impls/metadata.rs:3547-3582 — 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, 23+ corresponding lines) · ×3
Edited copies of one member (3 members, 23+ corresponding lines) core/metadata/src/impls/metadata.rs:5556— core/metadata/src/impls/metadata.rs:5556-5586 | core/metadata/src/impls/metadata.rs:5597-5619 | core/metadata/src/impls/metadata.rs:5631-5658 — 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.
Edited copies of one member (3 members, 23+ corresponding lines) core/server/src/responses.rs:637— core/server/src/responses.rs:637-661 | core/server/src/responses.rs:842-864 | core/server/src/responses.rs:952-974 — 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.
Edited copies of one member (3 members, 23+ corresponding lines) examples/go/getting-started/consumer/main.go:40— examples/go/getting-started/consumer/main.go:40-70 | examples/go/getting-started/producer/main.go:42-70 | examples/go/reader-consumer/main.go:42-64 — 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, 18+ corresponding lines) · ×3
Edited copies of one member (3 members, 18+ corresponding lines) foreign/csharp/Iggy_SDK/Contracts/Tcp/TcpContracts.cs:887— foreign/csharp/Iggy_SDK/Contracts/Tcp/TcpContracts.cs:887-906 | foreign/csharp/Iggy_SDK/Contracts/Tcp/TcpContracts.cs:909-926 | foreign/csharp/Iggy_SDK/Contracts/Tcp/TcpContracts.cs:1041-1059 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 18 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 18+ corresponding lines) core/binary_protocol/src/requests/messages/send_messages.rs:239— core/binary_protocol/src/requests/messages/send_messages.rs:239-256 | core/binary_protocol/src/requests/segments/delete_segments.rs:49-66 | core/metadata/src/stm/consumer_group.rs:492-509 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 18 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 18+ corresponding lines) foreign/csharp/Iggy_SDK/Mappers/BinaryMapper.cs:57— foreign/csharp/Iggy_SDK/Mappers/BinaryMapper.cs:57-74 | foreign/csharp/Iggy_SDK/Mappers/BinaryMapper.cs:92-109 | foreign/csharp/Iggy_SDK/Mappers/BinaryMapper.cs:209-227 — 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 (3 members, 16+ corresponding lines) · ×3
Edited copies of one member (3 members, 16+ corresponding lines) core/binary_protocol/src/responses/clients/get_client.rs:56— core/binary_protocol/src/responses/clients/get_client.rs:56-78 | core/binary_protocol/src/responses/streams/get_stream.rs:146-161 | core/binary_protocol/src/responses/topics/get_topic.rs:156-172 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 16+ corresponding lines) core/server/src/dispatch/session_ops.rs:728— core/server/src/dispatch/session_ops.rs:728-745 | core/server/src/dispatch/session_ops.rs:897-912 | core/server/src/dispatch/session_ops.rs:922-938 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 16+ corresponding lines) foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/tcp/ConsumerGroupsTcpClient.java:65— foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/tcp/ConsumerGroupsTcpClient.java:65-84 | foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/tcp/ConsumerGroupsTcpClient.java:87-105 | foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/tcp/ConsumerGroupsTcpClient.java:109-124 — 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 (3 members, 15+ corresponding lines) · ×3
Edited copies of one member (3 members, 15+ corresponding lines) foreign/python/src/producer.rs:518— foreign/python/src/producer.rs:518-534 | foreign/python/src/producer.rs:543-557 | foreign/python/src/producer.rs:570-585 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 15+ corresponding lines) core/binary_protocol/src/responses/consumer_groups/consumer_group_response.rs:55— core/binary_protocol/src/responses/consumer_groups/consumer_group_response.rs:55-71 | core/binary_protocol/src/responses/messages/poll_messages.rs:72-86 | core/binary_protocol/src/responses/users/login_register.rs:56-70 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 15+ corresponding lines) core/server/src/http/handlers.rs:1004— core/server/src/http/handlers.rs:1004-1018 | core/server/src/http/handlers.rs:2100-2114 | core/server/src/http/handlers.rs:2263-2277 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 7+ corresponding lines) · ×3
Edited copies of one member (3 members, 7+ corresponding lines) foreign/csharp/Iggy_SDK/Contracts/Tcp/TcpContracts.cs:929— foreign/csharp/Iggy_SDK/Contracts/Tcp/TcpContracts.cs:929-935 | foreign/csharp/Iggy_SDK/Contracts/Tcp/TcpContracts.cs:938-944 | foreign/csharp/Iggy_SDK/Contracts/Tcp/TcpContracts.cs:948-958 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 7+ corresponding lines) core/bench/dashboard/frontend/src/pages/run/chart.rs:187— core/bench/dashboard/frontend/src/pages/run/chart.rs:187-193 | core/bench/dashboard/frontend/src/pages/run/chart.rs:205-211 | core/bench/dashboard/frontend/src/pages/run/chart.rs:222-228 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 7+ corresponding lines) examples/csharp/src/GettingStarted/Iggy_SDK.Examples.GettingStarted.Producer/Utils.cs:38— examples/csharp/src/GettingStarted/Iggy_SDK.Examples.GettingStarted.Producer/Utils.cs:38-44 | examples/csharp/src/MessageEnvelope/Iggy_SDK.Examples.MessageEnvelope.Producer/Utils.cs:39-45 | examples/csharp/src/MessageHeaders/Iggy_SDK.Examples.MessageHeaders.Producer/Utils.cs:40-46 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 7+ corresponding lines) · ×3
Edited copies of one member (4 members, 7+ corresponding lines) foreign/csharp/Iggy_SDK/Contracts/Tcp/TcpContracts.cs:744— foreign/csharp/Iggy_SDK/Contracts/Tcp/TcpContracts.cs:744-750 | foreign/csharp/Iggy_SDK/Contracts/Tcp/TcpContracts.cs:753-759 | foreign/csharp/Iggy_SDK/Contracts/Tcp/TcpContracts.cs:762-768 | foreign/csharp/Iggy_SDK/Contracts/Tcp/TcpContracts.cs:778-784 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
Edited copies of one member (4 members, 7+ corresponding lines) foreign/python/src/client.rs:511— foreign/python/src/client.rs:511-525 | foreign/python/src/client.rs:657-664 | foreign/python/src/client.rs:1060-1066 | foreign/python/src/client.rs:1244-1255 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
Edited copies of one member (4 members, 7+ corresponding lines) foreign/swift/Sources/Iggy/Protocol/Requests.swift:46— foreign/swift/Sources/Iggy/Protocol/Requests.swift:46-53 | foreign/swift/Sources/Iggy/Protocol/Requests.swift:98-105 | foreign/swift/Sources/Iggy/Protocol/Requests.swift:109-115 | foreign/swift/Sources/Iggy/Protocol/Requests.swift:117-123 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 10+ corresponding lines) · ×3
Edited copies of one member (3 members, 10+ corresponding lines) core/binary_protocol/src/responses/streams/get_stream.rs:65— core/binary_protocol/src/responses/streams/get_stream.rs:65-74 | core/binary_protocol/src/responses/streams/stream_response.rs:61-70 | core/binary_protocol/src/responses/topics/get_topic.rs:60-70 — 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) core/binary_protocol/src/primitives/metadata_changes/body.rs:860— core/binary_protocol/src/primitives/metadata_changes/body.rs:860-870 | core/binary_protocol/src/primitives/metadata_changes/body.rs:1187-1197 | core/binary_protocol/src/primitives/metadata_changes/body.rs:1239-1248 — 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) core/metadata/src/stm/stream.rs:2228— core/metadata/src/stm/stream.rs:2228-2237 | core/metadata/src/stm/stream.rs:2242-2251 | core/metadata/src/stm/stream.rs:3046-3057 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 8+ corresponding lines) · ×3
Edited copies of one member (3 members, 8+ corresponding lines) foreign/java/java-sdk/src/main/java/org/apache/iggy/message/HeaderValue.java:79— foreign/java/java-sdk/src/main/java/org/apache/iggy/message/HeaderValue.java:79-86 | foreign/java/java-sdk/src/main/java/org/apache/iggy/message/HeaderValue.java:88-95 | foreign/java/java-sdk/src/main/java/org/apache/iggy/message/HeaderValue.java:97-104 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 8+ corresponding lines) foreign/java/java-sdk/src/main/java/org/apache/iggy/serde/MetadataChangesReader.java:427— foreign/java/java-sdk/src/main/java/org/apache/iggy/serde/MetadataChangesReader.java:427-438 | foreign/java/java-sdk/src/main/java/org/apache/iggy/serde/MetadataChangesReader.java:440-447 | foreign/java/java-sdk/src/main/java/org/apache/iggy/serde/MetadataChangesReader.java:468-479 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 8+ corresponding lines) core/common/src/types/configuration/quic_config/quic_client_reconnection_config.rs:55— core/common/src/types/configuration/quic_config/quic_client_reconnection_config.rs:55-62 | core/common/src/types/configuration/tcp_config/tcp_client_reconnection_config.rs:42-49 | core/common/src/types/configuration/websocket_config/websocket_client_reconnection_config.rs:48-55 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 5+ corresponding lines) · ×3
Edited copies of one member (3 members, 5+ corresponding lines) foreign/swift/Sources/Iggy/Client/IggyClient+Resources.swift:54— foreign/swift/Sources/Iggy/Client/IggyClient+Resources.swift:54-58 | foreign/swift/Sources/Iggy/Client/IggyClient+Resources.swift:117-121 | foreign/swift/Sources/Iggy/Client/IggyClient+Resources.swift:238-242 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 5 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 5+ corresponding lines) foreign/swift/Sources/Iggy/Client/IggyClient+Resources.swift:135— foreign/swift/Sources/Iggy/Client/IggyClient+Resources.swift:135-139 | foreign/swift/Sources/Iggy/Client/IggyClient+Resources.swift:142-146 | foreign/swift/Sources/Iggy/Client/IggyClient+Resources.swift:149-153 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 5 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 5+ corresponding lines) foreign/java/java-sdk/src/main/java/org/apache/iggy/client/blocking/http/StreamsHttpClient.java:55— foreign/java/java-sdk/src/main/java/org/apache/iggy/client/blocking/http/StreamsHttpClient.java:55-59 | foreign/java/java-sdk/src/main/java/org/apache/iggy/client/blocking/http/TopicsHttpClient.java:59-63 | foreign/java/java-sdk/src/main/java/org/apache/iggy/client/blocking/http/UsersHttpClient.java:58-62 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 5 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (3 corresponding lines) · ×3
Edited copy of a member (3 corresponding lines) foreign/swift/Sources/Iggy/Consumer/IggyConsumer.swift:306— foreign/swift/Sources/Iggy/Consumer/IggyConsumer.swift:306-308 | foreign/swift/Sources/Iggy/Consumer/PartitionReader.swift:1043-1045 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (3 corresponding lines) foreign/go/client/reader/reader.go:1906— foreign/go/client/reader/reader.go:1906-1909 | foreign/go/client/tcp/tcp_driver.go:628-630 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (3 corresponding lines) foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/ConsumerOffsetsClient.java:49— foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/ConsumerOffsetsClient.java:49-52 | foreign/java/java-sdk/src/main/java/org/apache/iggy/client/blocking/ConsumerOffsetsClient.java:35-37 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (23 lines × 2) core/binary_protocol/src/consensus/header.rs:434— core/binary_protocol/src/consensus/header.rs:434-456 | core/binary_protocol/src/consensus/header.rs:465-487 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/binary_protocol/src/consensus/header.rs: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 (23 lines × 2) core/binary_protocol/src/requests/partitions/create_partitions_with_assignments.rs:102— core/binary_protocol/src/requests/partitions/create_partitions_with_assignments.rs:102-124 | core/binary_protocol/src/requests/topics/create_topic_with_assignments.rs:125-147 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `core/binary_protocol/src/requests/partitions/create_partitions_with_assignments.rs:102` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (23 lines × 2) core/binary_protocol/src/requests/topics/delete_topic.rs:31— core/binary_protocol/src/requests/topics/delete_topic.rs:31-53 | core/binary_protocol/src/requests/topics/get_topic.rs:31-53 — 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 `core/binary_protocol/src/requests/topics/delete_topic.rs:31` 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 × 3) foreign/csharp/Iggy_SDK/Contracts/MetadataChangeBodies.cs:91— foreign/csharp/Iggy_SDK/Contracts/MetadataChangeBodies.cs:91-107 | foreign/csharp/Iggy_SDK/Contracts/MetadataChangeBodies.cs:125-141 | foreign/csharp/Iggy_SDK/Contracts/MetadataChangeBodies.cs:156-172 — 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 (17 lines × 3) foreign/csharp/Iggy_SDK/Contracts/MetadataChangeBodies.cs:228— foreign/csharp/Iggy_SDK/Contracts/MetadataChangeBodies.cs:228-244 | foreign/csharp/Iggy_SDK/Contracts/MetadataChangeBodies.cs:253-269 | foreign/csharp/Iggy_SDK/Contracts/MetadataChangeBodies.cs:281-297 — 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 (17 lines × 3) examples/csharp/src/MessageEnvelope/Iggy_SDK.Examples.MessageEnvelope.Consumer/Utils.cs:106— examples/csharp/src/MessageEnvelope/Iggy_SDK.Examples.MessageEnvelope.Consumer/Utils.cs:106-122 | examples/csharp/src/MessageHeaders/Iggy_SDK.Examples.MessageHeaders.Consumer/Utils.cs:107-123 | examples/csharp/src/NewSdk/Iggy_SDK.Examples.NewSdk.Consumer/Utils.cs:48-64 — before extracting anything, compare `examples/csharp/src/MessageEnvelope/Iggy_SDK.Examples.MessageEnvelope.Consumer/Utils.cs` and `examples/csharp/src/MessageHeaders/Iggy_SDK.Examples.MessageHeaders.Consumer/Utils.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 94 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 `examples/csharp/src/MessageEnvelope/Iggy_SDK.Examples.MessageEnvelope.Consumer/Utils.cs:106` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (16 lines × 3) core/binary_protocol/src/requests/users/login_register.rs:193— core/binary_protocol/src/requests/users/login_register.rs:193-208 | core/binary_protocol/src/requests/users/login_register_with_pat.rs:99-114 | core/binary_protocol/src/requests/users/login_user.rs:101-116 — before extracting anything, compare `core/binary_protocol/src/requests/users/login_register.rs` and `core/binary_protocol/src/requests/users/login_register_with_pat.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 34 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/binary_protocol/src/requests/users/login_register.rs:193` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16 lines × 3) core/kafka_wire/src/bounds_guard.rs:1520— core/kafka_wire/src/bounds_guard.rs:1520-1535 | core/kafka_wire/src/bounds_guard.rs:1573-1588 | core/kafka_wire/src/bounds_guard.rs:1626-1641 — 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 `core/kafka_wire/src/bounds_guard.rs:1520` it does not close everything it opens, so those exact lines 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 × 3) foreign/python/src/config.rs:360— foreign/python/src/config.rs:360-375 | foreign/python/src/config.rs:726-741 | foreign/python/src/config.rs:1397-1412 — 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 `foreign/python/src/config.rs:360` it does not close everything it opens, so those 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, `foreign/python/src/config.rs:1415` calls `Some` and `foreign/python/src/config.rs:376` 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 × 4) core/message_bus/src/lifecycle/connection_registry.rs:643— core/message_bus/src/lifecycle/connection_registry.rs:643-650 | core/message_bus/src/lifecycle/connection_registry.rs:674-681 | core/message_bus/src/lifecycle/connection_registry.rs:983-990 | core/message_bus/src/lifecycle/connection_registry.rs:1010-1017 — 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 `core/message_bus/src/lifecycle/connection_registry.rs:643` 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 × 4) core/message_bus/src/client_listener/tcp.rs:68— core/message_bus/src/client_listener/tcp.rs:68-75 | core/message_bus/src/client_listener/tcp_tls.rs:110-119 | core/message_bus/src/client_listener/ws.rs:82-89 | core/message_bus/src/client_listener/wss.rs:104-113 — before extracting anything, compare `core/message_bus/src/client_listener/tcp.rs` and `core/message_bus/src/client_listener/tcp_tls.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 32 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 `core/message_bus/src/client_listener/tcp.rs:68` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (8 lines × 4) foreign/go/client/tcp/tcp_access_token_management.go:47— foreign/go/client/tcp/tcp_access_token_management.go:47-54 | foreign/go/client/tcp/tcp_clients_management.go:28-35 | foreign/go/client/tcp/tcp_stream_management.go:29-36 | foreign/go/client/tcp/tcp_user_management.go:41-48 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once.
Duplicated block (5 lines × 3) foreign/csharp/Iggy_SDK/IggyClient/IIggyOffset.cs:80— foreign/csharp/Iggy_SDK/IggyClient/IIggyOffset.cs:80-84 | foreign/csharp/Iggy_SDK/IggyClient/Implementations/HttpMessageStream.cs:676-680 | foreign/csharp/Iggy_SDK/IggyClient/Implementations/TcpMessageStream.cs:523-527 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (5 lines × 3) core/cli/src/commands/binary_users/change_password.rs:64— core/cli/src/commands/binary_users/change_password.rs:64-70 | core/cli/src/commands/binary_users/change_password.rs:77-83 | core/cli/src/credentials.rs:123-127 — 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 `core/cli/src/credentials.rs:123` 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 (5 lines × 3) foreign/java/java-sdk/src/main/java/org/apache/iggy/stream/StreamUpdate.java:94— foreign/java/java-sdk/src/main/java/org/apache/iggy/stream/StreamUpdate.java:94-98 | foreign/java/java-sdk/src/main/java/org/apache/iggy/topic/TopicUpdate.java:165-169 | foreign/java/java-sdk/src/main/java/org/apache/iggy/user/UserUpdate.java:113-117 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind `keys` to `Set<StreamOptionKey>` in one and `Set<TopicOptionKey>` 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 (24 lines × 2) examples/java/src/main/java/org/apache/iggy/examples/messageenvelope/producer/MessageEnvelopeProducer.java:61— examples/java/src/main/java/org/apache/iggy/examples/messageenvelope/producer/MessageEnvelopeProducer.java:61-84 | examples/java/src/main/java/org/apache/iggy/examples/messageheaders/producer/MessageHeadersProducer.java:61-84 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (24 lines × 2) examples/python/basic/producer.py:81— examples/python/basic/producer.py:81-104 | examples/python/getting-started/producer.py:191-214 — `examples/python/basic/producer.py` and `examples/python/getting-started/producer.py` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 3 separate duplicated blocks between them, totalling at least 53 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `examples/python/basic/producer.py: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 (24 lines × 2) examples/python/message-envelope/producer.py:75— examples/python/message-envelope/producer.py:75-98 | examples/python/message-headers/common.py:88-111 — before extracting anything, compare `examples/python/message-envelope/producer.py` and `examples/python/message-headers/common.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 77 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (7 lines × 2 locations) foreign/node/src/bdd/metadata-changes.ts:169— foreign/node/src/bdd/metadata-changes.ts:169 · foreign/node/src/bdd/resource-options.ts:148 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
Duplicated block (7 lines × 2 locations) foreign/node/src/wire/cluster/cluster.utils.ts:72— foreign/node/src/wire/cluster/cluster.utils.ts:72 · foreign/node/src/wire/cluster/cluster.utils.ts:137 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (7 lines × 2 locations) foreign/node/src/wire/message/iggy-header.utils.ts:87— foreign/node/src/wire/message/iggy-header.utils.ts:87 · foreign/node/src/wire/message/iggy-header.utils.ts:157 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
OperationDriver::attempt (cyclomatic 33) core/sdk/src/driver.rs:677— OperationDriver::attempt 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.
OperationDriver::settle (cyclomatic 23) core/sdk/src/driver.rs:1106— OperationDriver::settle 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.
partitions::segment_recovery::load_persisted_segments_with_checkpoint (cyclomatic 26) core/partitions/src/segment_recovery.rs:722— partitions::segment_recovery::load_persisted_segments_with_checkpoint 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.
partitions::persistence::merge_recovered_logs (cyclomatic 16) core/partitions/src/persistence.rs:2164— partitions::persistence::merge_recovered_logs 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.
simulator::replica::new_shard (cyclomatic 26) core/simulator/src/replica.rs:152— simulator::replica::new_shard 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.
simulator::bin::workload-fuzz::network_options (cyclomatic 17) core/simulator/src/bin/workload-fuzz.rs:487— simulator::bin::workload-fuzz::network_options 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.
VsrConsensus::tick_with_history_fence (cyclomatic 20) core/consensus/src/impls.rs:3369— VsrConsensus::tick_with_history_fence 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.
VsrConsensus::try_handle_start_view (cyclomatic 18) core/consensus/src/impls.rs:4859— VsrConsensus::try_handle_start_view 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.
DiskReadPlan::walk_segment (cyclomatic 20) core/partitions/src/poll_plan.rs:1133— DiskReadPlan::walk_segment 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.
DiskReadPlan::read_disk_with_limit (cyclomatic 16) core/partitions/src/poll_plan.rs:947— DiskReadPlan::read_disk_with_limit has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
ServerHandle::start (cyclomatic 19) core/integration/src/harness/handle/server.rs:1017— ServerHandle::start 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.
ServerHandle::set_protocol_addresses (cyclomatic 16) core/integration/src/harness/handle/server.rs:520— ServerHandle::set_protocol_addresses has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
PacketSimulator::step (cognitive 44) core/simulator/src/packet.rs:728— PacketSimulator::step has cognitive complexity 44 (threshold 15). Drivers by points: if/else 10 (37 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PacketSimulator::auto_partition_network (cognitive 23) core/simulator/src/packet.rs:886— PacketSimulator::auto_partition_network has cognitive complexity 23 (threshold 15). Drivers by points: loops 6 (11 pts), if/else 4 (9 pts), boolean chains 2, match/switch 1 (nesting depth added 10). 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.
DiskReadPlan::walk_segment (cognitive 37) core/partitions/src/poll_plan.rs:1133— DiskReadPlan::walk_segment has cognitive complexity 37 (threshold 15). Drivers by points: if/else 13 (28 pts), boolean chains 6, match/switch 1 (2 pts), loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DiskReadPlan::read_disk_with_limit (cognitive 20) core/partitions/src/poll_plan.rs:947— DiskReadPlan::read_disk_with_limit has cognitive complexity 20 (threshold 15). Drivers by points: match/switch 6 (9 pts), if/else 5 (8 pts), boolean chains 2, loops 1 (nesting depth added 6). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Logging::cleanup_log_files (cognitive 28) core/server_common/src/log/logger.rs:625— Logging::cleanup_log_files has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (19 pts), loops 4 (6 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Logging::read_log_files (cognitive 19) core/server_common/src/log/logger.rs:557— Logging::read_log_files has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (11 pts), match/switch 4 (7 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Coordination::lease_on (cognitive 21) gateways/kafka/src/coordinator/mod.rs:725— Coordination::lease_on has cognitive complexity 21 (threshold 15). Drivers by points: if/else 3 (12 pts), match/switch 3 (8 pts), loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Coordination::announce_on (cognitive 19) gateways/kafka/src/coordinator/mod.rs:948— Coordination::announce_on has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 2 (3 pts), match/switch 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PartitionReader.pump (cognitive 19) foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/reader/PartitionReader.java:823— PartitionReader.pump has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 5, loops 2 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PartitionReader.pump (cognitive 19) foreign/go/client/reader/reader.go:983— PartitionReader.pump has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 8, if/else 7 (8 pts), loops 2 (3 pts) (nesting depth added 2). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Streams::partition_replication (cognitive 17) core/metadata/src/stm/stream.rs:2721— Streams::partition_replication has cognitive complexity 17 (threshold 15). Drivers by points: loops 3 (6 pts), if/else 2 (5 pts), match/switch 1 (5 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Streams::request_lifecycle_blocked (cognitive 16) core/metadata/src/stm/lifecycle.rs:263— Streams::request_lifecycle_blocked has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (13 pts), match/switch 2 (3 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
ConsumerGroup::rebalance_members (cognitive 16) core/metadata/src/stm/consumer_group.rs:161— ConsumerGroup::rebalance_members has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 6, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ConsumerGroup::balanced_member_indices (cognitive 16) core/metadata/src/stm/consumer_group.rs:329— ConsumerGroup::balanced_member_indices has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D4 · Code Duplication· Edited copy of a member (42 corresponding lines) · ×2
Edited copy of a member (42 corresponding lines) core/server_common/src/send_messages.rs:309— core/server_common/src/send_messages.rs:309-350 | core/server_common/src/send_messages.rs:367-415 — 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) core/simulator/src/workload/ops/create_partitions.rs:53— core/simulator/src/workload/ops/create_partitions.rs:53-94 | core/simulator/src/workload/ops/create_topic.rs:52-93 — 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 (53 corresponding lines) · ×2
Edited copy of a member (53 corresponding lines) core/binary_protocol/src/requests/partitions/create_partitions_with_assignments.rs:76— core/binary_protocol/src/requests/partitions/create_partitions_with_assignments.rs:76-128 | core/binary_protocol/src/requests/topics/create_topic_with_assignments.rs:92-152 — These two members are one piece of code written twice and then edited apart: 53 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (53 corresponding lines) core/partitions/src/iggy_index_writer.rs:47— core/partitions/src/iggy_index_writer.rs:47-101 | core/partitions/src/messages_writer.rs:59-111 — These two members are one piece of code written twice and then edited apart: 53 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (50 corresponding lines) · ×2
Edited copy of a member (50 corresponding lines) core/integration/src/harness/handle/client_builder.rs:155— core/integration/src/harness/handle/client_builder.rs:155-204 | core/integration/src/harness/handle/client_builder.rs:273-326 — These two members are one piece of code written twice and then edited apart: 50 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (50 corresponding lines) gateways/kafka/src/protocol/handlers/create_topics.rs:186— gateways/kafka/src/protocol/handlers/create_topics.rs:186-235 | gateways/kafka/src/protocol/handlers/delete_topics.rs:237-290 — These two members are one piece of code written twice and then edited apart: 50 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (43 corresponding lines) · ×2
Edited copy of a member (43 corresponding lines) core/cli/src/commands/binary_streams/get_streams.rs:59— core/cli/src/commands/binary_streams/get_streams.rs:59-115 | core/cli/src/commands/binary_users/get_users.rs:58-100 — 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.
Edited copy of a member (43 corresponding lines) foreign/csharp/Iggy_SDK/JsonConverters/UserHeadersConverter.cs:93— foreign/csharp/Iggy_SDK/JsonConverters/UserHeadersConverter.cs:93-135 | foreign/csharp/Iggy_SDK/JsonConverters/UserHeadersConverter.cs:138-180 — 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 (39 corresponding lines) · ×2
Edited copy of a member (39 corresponding lines) core/binary_protocol/src/primitives/permissions.rs:105— core/binary_protocol/src/primitives/permissions.rs:105-143 | core/binary_protocol/src/primitives/permissions.rs:216-263 — 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) examples/python/message-envelope/consumer.py:126— examples/python/message-envelope/consumer.py:126-164 | examples/python/message-headers/common.py:181-219 — 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 (30 corresponding lines) · ×2
Edited copy of a member (30 corresponding lines) core/configs/src/configs_impl/parsing.rs:23— core/configs/src/configs_impl/parsing.rs:23-54 | core/configs/src/configs_impl/parsing.rs:57-86 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (30 corresponding lines) core/server/src/dispatch/session_ops.rs:494— core/server/src/dispatch/session_ops.rs:494-526 | core/server/src/dispatch/session_ops.rs:762-791 — 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 copy of a member (34 corresponding lines) · ×2
Edited copy of a member (34 corresponding lines) gateways/kafka/src/protocol/handlers/join_group.rs:56— gateways/kafka/src/protocol/handlers/join_group.rs:56-89 | gateways/kafka/src/protocol/handlers/leave_group.rs:49-83 — 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) core/server/src/dispatch/submit.rs:466— core/server/src/dispatch/submit.rs:466-507 | core/server/src/dispatch/submit.rs:636-669 — These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (5 members, 23+ corresponding lines) · ×2
Edited copies of one member (5 members, 23+ corresponding lines) foreign/cpp/src/client.rs:1106— foreign/cpp/src/client.rs:1106-1135 | foreign/cpp/src/client.rs:1145-1167 | foreign/cpp/src/client.rs:1177-1199 | foreign/cpp/src/client.rs:1208-1239 | foreign/cpp/src/client.rs:1249-1277 — These 5 members are one piece of code written 5 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 5 times and the copies will drift further apart.
Edited copies of one member (5 members, 23+ corresponding lines) core/binary_protocol/src/consensus/header.rs:433— core/binary_protocol/src/consensus/header.rs:433-460 | core/binary_protocol/src/consensus/header.rs:464-489 | core/binary_protocol/src/consensus/header.rs:687-712 | core/binary_protocol/src/consensus/header.rs:1131-1158 | core/binary_protocol/src/consensus/header.rs:1376-1398 — These 5 members are one piece of code written 5 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 5 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (26 corresponding lines) · ×2
Edited copy of a member (26 corresponding lines) foreign/csharp/Iggy_SDK/IggyClient/Implementations/HttpMessageStream.cs:1214— foreign/csharp/Iggy_SDK/IggyClient/Implementations/HttpMessageStream.cs:1214-1241 | foreign/csharp/Iggy_SDK/IggyClient/Implementations/HttpMessageStream.cs:1300-1325 — 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) gateways/kafka/src/protocol/handlers/offset_delete.rs:92— gateways/kafka/src/protocol/handlers/offset_delete.rs:92-123 | gateways/kafka/src/protocol/handlers/sync_group.rs:45-70 — 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 (27 corresponding lines) · ×2
Edited copy of a member (27 corresponding lines) core/sdk/src/session_owner.rs:473— core/sdk/src/session_owner.rs:473-507 | core/sdk/src/session_owner.rs:509-535 — 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) gateways/kafka/src/protocol/handlers/create_partitions.rs:309— gateways/kafka/src/protocol/handlers/create_partitions.rs:309-338 | gateways/kafka/src/protocol/handlers/delete_topics.rs:177-203 — 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 (31 corresponding lines) · ×2
Edited copy of a member (31 corresponding lines) core/binary_protocol/src/requests/users/login_register.rs:183— core/binary_protocol/src/requests/users/login_register.rs:183-213 | core/binary_protocol/src/requests/users/login_user.rs:83-120 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (31 corresponding lines) gateways/kafka/src/protocol/handlers/describe_cluster.rs:73— gateways/kafka/src/protocol/handlers/describe_cluster.rs:73-105 | gateways/kafka/src/protocol/handlers/heartbeat.rs:48-78 — 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 (25 corresponding lines) · ×2
Edited copy of a member (25 corresponding lines) core/metadata/src/stm/stream.rs:2147— core/metadata/src/stm/stream.rs:2147-2172 | core/metadata/src/stm/stream.rs:2200-2224 — 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) foreign/csharp/Iggy_SDK/Mappers/BinaryMapper.cs:1019— foreign/csharp/Iggy_SDK/Mappers/BinaryMapper.cs:1019-1044 | foreign/csharp/Iggy_SDK/Mappers/BinaryMapper.cs:945-969 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (5 members, 9+ corresponding lines) · ×2
Edited copies of one member (5 members, 9+ corresponding lines) core/sdk/src/client_wrappers/client_wrapper.rs:50— core/sdk/src/client_wrappers/client_wrapper.rs:50-58 | core/sdk/src/client_wrappers/client_wrapper.rs:140-148 | core/sdk/src/client_wrappers/client_wrapper.rs:150-158 | core/sdk/src/client_wrappers/client_wrapper.rs:160-168 | core/sdk/src/client_wrappers/client_wrapper.rs:171-180 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
Edited copies of one member (5 members, 9+ corresponding lines) foreign/cpp/src/client.rs:1759— foreign/cpp/src/client.rs:1759-1767 | foreign/cpp/src/client.rs:1773-1781 | foreign/cpp/src/client.rs:1808-1816 | foreign/cpp/src/client.rs:1821-1829 | foreign/cpp/src/client.rs:1834-1842 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 12+ corresponding lines) · ×2
Edited copies of one member (4 members, 12+ corresponding lines) foreign/python/src/client.rs:1976— foreign/python/src/client.rs:1976-1988 | foreign/python/src/client.rs:2004-2015 | foreign/python/src/client.rs:2059-2070 | foreign/python/src/client.rs:2089-2101 — 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.
Edited copies of one member (4 members, 12+ corresponding lines) foreign/go/internal/codec/reader.go:62— foreign/go/internal/codec/reader.go:62-73 | foreign/go/internal/codec/reader.go:75-86 | foreign/go/internal/codec/reader.go:88-99 | foreign/go/internal/codec/reader.go:101-112 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 8+ corresponding lines) · ×2
Edited copies of one member (4 members, 8+ corresponding lines) core/simulator/src/client.rs:570— core/simulator/src/client.rs:570-577 | core/simulator/src/client.rs:586-593 | core/simulator/src/client.rs:602-609 | core/simulator/src/client.rs:618-625 — 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.
Edited copies of one member (4 members, 8+ corresponding lines) foreign/java/java-sdk/src/main/java/org/apache/iggy/message/HeaderKind.java:47— foreign/java/java-sdk/src/main/java/org/apache/iggy/message/HeaderKind.java:47-54 | foreign/java/java-sdk/src/main/java/org/apache/iggy/message/MessageState.java:36-43 | foreign/java/java-sdk/src/main/java/org/apache/iggy/topic/CompressionAlgorithm.java:34-41 | foreign/java/java-sdk/src/main/java/org/apache/iggy/user/UserStatus.java:37-44 — 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 copies of one member (5 members, 8+ corresponding lines) · ×2
Edited copies of one member (5 members, 8+ corresponding lines) foreign/java/java-sdk/src/main/java/org/apache/iggy/system/MetadataChangeBody.java:62— foreign/java/java-sdk/src/main/java/org/apache/iggy/system/MetadataChangeBody.java:62-69 | foreign/java/java-sdk/src/main/java/org/apache/iggy/system/MetadataChangeGroup.java:55-62 | foreign/java/java-sdk/src/main/java/org/apache/iggy/system/MetadataChangeKind.java:60-67 | foreign/java/java-sdk/src/main/java/org/apache/iggy/system/MetadataChangePhase.java:40-47 | foreign/java/java-sdk/src/main/java/org/apache/iggy/system/MetadataChangeStatus.java:44-51 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
Edited copies of one member (5 members, 8+ corresponding lines) core/binary_protocol/src/responses/clients/get_client.rs:38— core/binary_protocol/src/responses/clients/get_client.rs:38-45 | core/binary_protocol/src/responses/consumer_groups/get_consumer_group.rs:92-99 | core/binary_protocol/src/responses/streams/get_stream.rs:123-130 | core/binary_protocol/src/responses/system/get_cluster_metadata.rs:119-127 | core/binary_protocol/src/responses/topics/get_topic.rs:138-145 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
Duplicated block (29 lines × 2) core/message_bus/src/transports/ws.rs:187— core/message_bus/src/transports/ws.rs:187-215 | core/message_bus/src/transports/wss.rs:335-363 — before extracting anything, compare `core/message_bus/src/transports/ws.rs` and `core/message_bus/src/transports/wss.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 96 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 `core/message_bus/src/transports/ws.rs:187` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (29 lines × 2) examples/python/message-envelope/consumer.py:126— examples/python/message-envelope/consumer.py:126-154 | examples/python/message-headers/common.py:181-209 — before extracting anything, compare `examples/python/message-envelope/consumer.py` and `examples/python/message-headers/common.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 50 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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 `consumer_name` to `str = "message-envelope-consumer"` in one and `str` 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 (26 lines × 2) core/binary_protocol/src/responses/streams/get_stream.rs:79— core/binary_protocol/src/responses/streams/get_stream.rs:79-104 | core/binary_protocol/src/responses/streams/stream_response.rs:75-100 — 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 (26 lines × 2) core/common/src/types/consumer/consumer_group_offsets.rs:25— core/common/src/types/consumer/consumer_group_offsets.rs:25-50 | core/common/src/types/consumer/consumer_offsets.rs:24-49 — 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 `core/common/src/types/consumer/consumer_group_offsets.rs:25` 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 (20 lines × 3) foreign/csharp/Iggy_SDK/Contracts/MetadataChangeBodies.cs:303— foreign/csharp/Iggy_SDK/Contracts/MetadataChangeBodies.cs:303-322 | foreign/csharp/Iggy_SDK/Contracts/MetadataChangeBodies.cs:334-353 | foreign/csharp/Iggy_SDK/Contracts/MetadataChangeBodies.cs:390-409 — 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 (20 lines × 3) core/kafka_wire/src/bounds_guard.rs:1102— core/kafka_wire/src/bounds_guard.rs:1102-1121 | core/kafka_wire/src/bounds_guard.rs:1186-1205 | core/kafka_wire/src/bounds_guard.rs:1249-1268 — 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 (17–21 lines × 2) core/consensus/src/impls.rs:3546— core/consensus/src/impls.rs:3546-3566 | core/consensus/src/impls.rs:3980-3996 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/consensus/src/impls.rs:3546` 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–21 lines × 2) gateways/kafka/src/protocol/handlers/alter_configs.rs:279— gateways/kafka/src/protocol/handlers/alter_configs.rs:279-299 | gateways/kafka/src/protocol/handlers/incremental_alter_configs.rs:298-314 — before extracting anything, compare `gateways/kafka/src/protocol/handlers/alter_configs.rs` and `gateways/kafka/src/protocol/handlers/incremental_alter_configs.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 112 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 `gateways/kafka/src/protocol/handlers/alter_configs.rs:279` 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) core/server/src/responses.rs:638— core/server/src/responses.rs:638-651 | core/server/src/responses.rs:953-967 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/server/src/responses.rs:638` it does not close everything it opens, so those exact lines 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) examples/java/src/main/java/org/apache/iggy/examples/async/AsyncConsumer.java:153— examples/java/src/main/java/org/apache/iggy/examples/async/AsyncConsumer.java:153-167 | examples/java/src/main/java/org/apache/iggy/examples/async/AsyncProducer.java:93-106 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `examples/java/src/main/java/org/apache/iggy/examples/async/AsyncConsumer.java:153` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 5) core/binary_protocol/src/codec.rs:85— core/binary_protocol/src/codec.rs:85-98 | core/binary_protocol/src/codec.rs:111-124 | core/binary_protocol/src/codec.rs:137-150 | core/binary_protocol/src/codec.rs:188-201 | core/binary_protocol/src/codec.rs:214-227 — 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 (14 lines × 5) core/binary_protocol/src/requests/consumer_groups/delete_consumer_group.rs:49— core/binary_protocol/src/requests/consumer_groups/delete_consumer_group.rs:49-62 | core/binary_protocol/src/requests/consumer_groups/get_consumer_group.rs:49-62 | core/binary_protocol/src/requests/consumer_groups/join_consumer_group.rs:49-62 | core/binary_protocol/src/requests/consumer_groups/leave_consumer_group.rs:49-62 | core/binary_protocol/src/requests/consumer_groups/sync_consumer_group.rs:52-65 — before extracting anything, compare `core/binary_protocol/src/requests/consumer_groups/delete_consumer_group.rs` and `core/binary_protocol/src/requests/consumer_groups/join_consumer_group.rs` as WHOLE FILES: 82% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 3 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/binary_protocol/src/requests/consumer_groups/delete_consumer_group.rs:49` 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 × 3) core/binary_protocol/src/primitives/options.rs:155— core/binary_protocol/src/primitives/options.rs:155-168 | core/binary_protocol/src/responses/system/describe_options.rs:77-90 | core/binary_protocol/src/responses/system/describe_options.rs:95-108 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (14 lines × 3) core/binary_protocol/src/requests/streams/delete_stream.rs:30— core/binary_protocol/src/requests/streams/delete_stream.rs:30-43 | core/binary_protocol/src/requests/streams/get_stream.rs:30-43 | core/binary_protocol/src/requests/topics/get_topics.rs:30-43 — 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 `core/binary_protocol/src/requests/streams/delete_stream.rs:30` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (13 lines × 3) core/integration/src/harness/disk.rs:267— core/integration/src/harness/disk.rs:267-279 | core/integration/src/harness/disk.rs:448-460 | core/integration/src/harness/disk.rs:564-576 — 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 `core/integration/src/harness/disk.rs:267` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 3) foreign/java/external-processors/iggy-connector-flink/iggy-flink-examples/src/main/java/org/apache/iggy/flink/example/MultiStreamJoinJob.java:148— foreign/java/external-processors/iggy-connector-flink/iggy-flink-examples/src/main/java/org/apache/iggy/flink/example/MultiStreamJoinJob.java:148-160 | foreign/java/external-processors/iggy-connector-flink/iggy-flink-examples/src/main/java/org/apache/iggy/flink/example/StreamTransformJob.java:128-140 | foreign/java/external-processors/iggy-connector-flink/iggy-flink-examples/src/main/java/org/apache/iggy/flink/example/WordCountJob.java:123-135 — 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 `foreign/java/external-processors/iggy-connector-flink/iggy-flink-examples/src/main/java/org/apache/iggy/flink/example/MultiStreamJoinJob.java:148` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 4) core/binary_protocol/src/requests/consumer_offsets/delete_consumer_offset.rs:57— core/binary_protocol/src/requests/consumer_offsets/delete_consumer_offset.rs:57-66 | core/binary_protocol/src/requests/consumer_offsets/get_consumer_offset.rs:51-60 | core/binary_protocol/src/requests/consumer_offsets/store_consumer_offset.rs:59-68 | core/binary_protocol/src/requests/messages/poll_messages.rs:123-132 — before extracting anything, compare `core/binary_protocol/src/requests/consumer_offsets/delete_consumer_offset.rs` and `core/binary_protocol/src/requests/consumer_offsets/get_consumer_offset.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 32 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, `core/binary_protocol/src/requests/consumer_offsets/delete_consumer_offset.rs:67` calls `put_u8`, `as_u8` and `core/binary_protocol/src/requests/consumer_offsets/get_consumer_offset.rs:61` 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 (10 lines × 4) core/message_bus/src/client_listener/tcp.rs:64— core/message_bus/src/client_listener/tcp.rs:64-74 | core/message_bus/src/client_listener/tcp_tls.rs:106-116 | core/message_bus/src/client_listener/wss.rs:100-110 | core/message_bus/src/replica/listener.rs:148-157 — before extracting anything, compare `core/message_bus/src/client_listener/tcp.rs` and `core/message_bus/src/client_listener/tcp_tls.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 32 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 `core/message_bus/src/client_listener/tcp.rs:64` 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) foreign/cpp/src/type_conversion.rs:1799— foreign/cpp/src/type_conversion.rs:1799-1808 | foreign/cpp/src/type_conversion.rs:1818-1827 | foreign/cpp/src/type_conversion.rs:1853-1862 — 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 `foreign/cpp/src/type_conversion.rs:1799` it does not close everything it opens, so those 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 `body` to `MetadataMemberJoined` in one and `MetadataMemberLeft` 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, `foreign/cpp/src/type_conversion.rs:1829` calls `from`, `as_u8` and `foreign/cpp/src/type_conversion.rs:1864` 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 × 3) foreign/python/src/config.rs:259— foreign/python/src/config.rs:259-268 | foreign/python/src/config.rs:569-578 | foreign/python/src/config.rs:1135-1144 — 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 `foreign/python/src/config.rs:259` 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 × 5) foreign/java/external-processors/iggy-connector-flink/iggy-connector-library/src/main/java/org/apache/iggy/connector/flink/sink/IggySinkWriter.java:248— foreign/java/external-processors/iggy-connector-flink/iggy-connector-library/src/main/java/org/apache/iggy/connector/flink/sink/IggySinkWriter.java:248-254 | foreign/java/external-processors/iggy-connector-flink/iggy-connector-library/src/main/java/org/apache/iggy/connector/flink/source/IggyPartitionSplitReader.java:250-256 | foreign/java/external-processors/iggy-connector-flink/iggy-connector-library/src/main/java/org/apache/iggy/connector/flink/source/IggySourceSplitEnumerator.java:259-265 | foreign/java/external-processors/iggy-connector-pinot/src/main/java/org/apache/iggy/connector/pinot/consumer/IggyPartitionGroupConsumer.java:229-235 | foreign/java/external-processors/iggy-connector-pinot/src/main/java/org/apache/iggy/connector/pinot/metadata/IggyStreamMetadataProvider.java:261-267 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 5 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 5 times.
Duplicated block (7 lines × 5) foreign/java/external-processors/iggy-connector-flink/iggy-connector-library/src/main/java/org/apache/iggy/connector/flink/sink/IggySinkWriter.java:259— foreign/java/external-processors/iggy-connector-flink/iggy-connector-library/src/main/java/org/apache/iggy/connector/flink/sink/IggySinkWriter.java:259-265 | foreign/java/external-processors/iggy-connector-flink/iggy-connector-library/src/main/java/org/apache/iggy/connector/flink/source/IggyPartitionSplitReader.java:261-267 | foreign/java/external-processors/iggy-connector-flink/iggy-connector-library/src/main/java/org/apache/iggy/connector/flink/source/IggySourceSplitEnumerator.java:270-276 | foreign/java/external-processors/iggy-connector-pinot/src/main/java/org/apache/iggy/connector/pinot/consumer/IggyPartitionGroupConsumer.java:240-246 | foreign/java/external-processors/iggy-connector-pinot/src/main/java/org/apache/iggy/connector/pinot/metadata/IggyStreamMetadataProvider.java:272-278 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 5 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 5 times.
Duplicated block (36 lines × 2) examples/csharp/src/MessageEnvelope/Iggy_SDK.Examples.MessageEnvelope.Producer/Utils.cs:49— examples/csharp/src/MessageEnvelope/Iggy_SDK.Examples.MessageEnvelope.Producer/Utils.cs:49-84 | examples/csharp/src/MessageHeaders/Iggy_SDK.Examples.MessageHeaders.Producer/Utils.cs:50-85 — before extracting anything, compare `examples/csharp/src/MessageEnvelope/Iggy_SDK.Examples.MessageEnvelope.Producer/Utils.cs` and `examples/csharp/src/MessageHeaders/Iggy_SDK.Examples.MessageHeaders.Producer/Utils.cs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 81 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 `examples/csharp/src/MessageEnvelope/Iggy_SDK.Examples.MessageEnvelope.Producer/Utils.cs:49` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (36 lines × 2) foreign/java/bench/src/main/java/org/apache/iggy/bench/report/IndividualMetricsCalculator.java:189— foreign/java/bench/src/main/java/org/apache/iggy/bench/report/IndividualMetricsCalculator.java:189-224 | foreign/java/bench/src/main/java/org/apache/iggy/bench/report/IndividualMetricsCalculator.java:255-290 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `foreign/java/bench/src/main/java/org/apache/iggy/bench/report/IndividualMetricsCalculator.java:189` 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.
Low cohesion: Users (LCOM4 4) gateways/kafka/src/bridge/iggy_bridge/change_log.rs:126— Users'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: GatewayState (LCOM4 4) gateways/kafka/src/protocol/api.rs:305— GatewayState'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.
R10 · Code Duplication· Duplicated block with local edits (11 matched lines × 2 locations) · ×2
Duplicated block with local edits (11 matched lines × 2 locations) foreign/node/src/client/client.frame.ts:140— foreign/node/src/client/client.frame.ts:140 · foreign/node/src/client/client.frame.ts:158 — the two spans are one implementation copied and then locally edited — 78 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Duplicated block with local edits (11 matched lines × 2 locations) web/src/lib/auth/authStore.svelte.ts:58— web/src/lib/auth/authStore.svelte.ts:58 · web/src/lib/auth/authStore.svelte.ts:75 — the two spans are one implementation copied and then locally edited — 65 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Duplicated block (11 lines × 2 locations) foreign/node/src/wire/session/login-with-token.command.ts:37— foreign/node/src/wire/session/login-with-token.command.ts:37 · foreign/node/src/wire/session/login.command.ts:34 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
Duplicated block (11 lines × 2 locations) web/src/lib/api/clientApi.ts:35— web/src/lib/api/clientApi.ts:35 · web/src/lib/api/fetchRouteApi.ts:28 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
Duplicated block (10 lines × 2 locations) foreign/node/src/wire/session/login.utils.ts:90— foreign/node/src/wire/session/login.utils.ts:90 · foreign/node/src/wire/token/delete-token.command.ts:38 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
Duplicated block (10 lines × 2 locations) foreign/node/src/wire/token/token.utils.ts:100— foreign/node/src/wire/token/token.utils.ts:100 · foreign/node/src/wire/user/user.utils.ts:142 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
Complex function onUpdate (cyclomatic 14, cognitive 19) web/src/lib/components/Modals/AddPartitionsModal.svelte:49— onUpdate has cyclomatic complexity 14 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function onUpdate (cyclomatic 14, cognitive 19) web/src/lib/components/Modals/DeletePartitionsModal.svelte:65— onUpdate has cyclomatic complexity 14 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function (anonymous) (cyclomatic 13, cognitive 18) foreign/node/src/client/client.socket.test.ts:750— (anonymous) has cyclomatic complexity 13 and cognitive complexity 18; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function (anonymous) (cyclomatic 13, cognitive 18) foreign/node/src/client/client.socket.test.ts:5912— (anonymous) has cyclomatic complexity 13 and cognitive complexity 18; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Dead file (~28 LoC) web/src/lib/components/PreventEventsPropagation.svelte— no import path from any entry point (40 application, 10 tooling, 91 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~28 LoC) web/src/lib/utils/addWindowEventListener.ts— no import path from any entry point (40 application, 10 tooling, 91 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~22 LoC) web/src/env.ts— no import path from any entry point (40 application, 10 tooling, 91 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~22 LoC) web/src/lib/utils/arrayMax.ts— no import path from any entry point (40 application, 10 tooling, 91 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~18 LoC) foreign/node/src/wire/segment/index.ts— no import path from any entry point (40 application, 10 tooling, 91 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~18 LoC) web/src/lib/utils/NonNullable.ts— no import path from any entry point (40 application, 10 tooling, 91 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
CommandResponseStream.drive (cyclomatic 210) foreign/node/src/client/client.socket.ts:371— CommandResponseStream.drive has cyclomatic complexity 210 (threshold 15). Of this number, 208 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.
TcpMessageStream.RunClientOperationAsync (cyclomatic 178) foreign/csharp/Iggy_SDK/IggyClient/Implementations/TcpMessageStream.PollRouting.cs:267— TcpMessageStream.RunClientOperationAsync has cyclomatic complexity 178 (threshold 15). Of this number, 177 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.
IggyTcpClient.driveOperation (cyclomatic 156) foreign/go/client/tcp/tcp_driver.go:251— IggyTcpClient.driveOperation has cyclomatic complexity 156 (threshold 15). Of this number, 141 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.
IggyTcpClient.drive (cyclomatic 64) foreign/go/client/tcp/tcp_driver.go:37— IggyTcpClient.drive has cyclomatic complexity 64 (threshold 15). Of this number, 62 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.
ClusterConfig::validate (cyclomatic 53) core/configs/src/server_config/cluster.rs:1049— ClusterConfig::validate has cyclomatic complexity 53 (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.
iggy_cli::get_command (cyclomatic 49) core/cli/src/main.rs:114— iggy_cli::get_command has cyclomatic complexity 49 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
StreamsSnapshot::validate_ownership_history (cyclomatic 43) core/metadata/src/stm/lifecycle.rs:631— StreamsSnapshot::validate_ownership_history 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.
PartitionReader.complete (cyclomatic 43) foreign/node/src/stream/partition-reader.ts:1600— PartitionReader.complete has cyclomatic complexity 43 (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.
Projection::project (cyclomatic 42) core/metadata/src/change_log/current.rs:179— Projection::project has cyclomatic complexity 42 (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.
PartitionReader.prepareRead (cyclomatic 42) foreign/go/client/reader/reader.go:1333— PartitionReader.prepareRead has cyclomatic complexity 42 (threshold 15). Of this number, 39 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
IggyTcpClient.consumerRoute (cyclomatic 41) foreign/go/client/tcp/tcp_poll_routing.go:260— IggyTcpClient.consumerRoute has cyclomatic complexity 41 (threshold 15). Of this number, 39 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.
PartitionReader.Complete (cyclomatic 40) foreign/csharp/Iggy_SDK/Consumers/PartitionReader.cs:2083— PartitionReader.Complete has cyclomatic complexity 40 (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.
PartitionReader.writeSeek (cyclomatic 40) foreign/go/client/reader/reader.go:682— PartitionReader.writeSeek has cyclomatic complexity 40 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
TransferFileJob::execute (cyclomatic 39) core/partitions/src/io.rs:999— TransferFileJob::execute has cyclomatic complexity 39 (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.
PollRouter.exchange (cyclomatic 39) foreign/swift/Sources/Iggy/Client/PollRouter.swift:904— PollRouter.exchange has cyclomatic complexity 39 (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.
PartitionReader.StartReads (cyclomatic 37) foreign/csharp/Iggy_SDK/Consumers/PartitionReader.cs:1293— PartitionReader.StartReads has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ClientCore.exchangeWithCommit (cyclomatic 37) foreign/swift/Sources/Iggy/Client/ClientCore.swift:193— ClientCore.exchangeWithCommit has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ServerConfig::validate (cyclomatic 36) core/configs/src/server_config/validators.rs:51— ServerConfig::validate has cyclomatic complexity 36 (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.
IggyTcpClient.register (cyclomatic 36) foreign/go/client/tcp/tcp_session_management.go:75— IggyTcpClient.register has cyclomatic complexity 36 (threshold 15). Of this number, 24 points are the body's own statements and 12 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
TcpMessageStream.GetPartitionRouteAsync (cyclomatic 35) foreign/csharp/Iggy_SDK/IggyClient/Implementations/TcpMessageStream.PollRouting.cs:1042— TcpMessageStream.GetPartitionRouteAsync has cyclomatic complexity 35 (threshold 15). Of this number, 33 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.
ClientCore.exchangeLocked (cyclomatic 35) foreign/swift/Sources/Iggy/Client/ClientCore.swift:725— ClientCore.exchangeLocked has cyclomatic complexity 35 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
PartitionReader.received (cyclomatic 35) foreign/swift/Sources/Iggy/Consumer/PartitionReader.swift:2128— PartitionReader.received 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.
VsrConnection.ReadRepliesAsync (cyclomatic 34) foreign/csharp/Iggy_SDK/Vsr/VsrConnection.cs:385— VsrConnection.ReadRepliesAsync 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.
PartitionReader.receiveLocked (cyclomatic 34) foreign/go/client/reader/reader.go:1490— PartitionReader.receiveLocked has cyclomatic complexity 34 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
PartitionReader.startReads (cyclomatic 34) foreign/node/src/stream/partition-reader.ts:1247— PartitionReader.startReads 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.
TcpMessageStream.RunReplicaLinkAsync (cyclomatic 31) foreign/csharp/Iggy_SDK/IggyClient/Implementations/TcpMessageStream.ReplicaLinks.cs:100— TcpMessageStream.RunReplicaLinkAsync has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
AsyncTcpConnection.completeAttempt (cyclomatic 31) foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/tcp/AsyncTcpConnection.java:1303— AsyncTcpConnection.completeAttempt has cyclomatic complexity 31 (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.
update-resource.command.checkPatch (cyclomatic 31) foreign/node/src/wire/system/update-resource.command.ts:123— update-resource.command.checkPatch has cyclomatic complexity 31 (threshold 15). Of this number, 29 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.
Args::from (cyclomatic 30) core/common/src/types/args/mod.rs:424— Args::from has cyclomatic complexity 30 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ShardingConfig::validate (cyclomatic 30) core/configs/src/server_config/sharding.rs:235— ShardingConfig::validate has cyclomatic complexity 30 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
shard::dispatch_vsr_actions (cyclomatic 30) core/shard/src/lib.rs:14995— shard::dispatch_vsr_actions 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.
MutationLanes.enter (cyclomatic 30) foreign/node/src/client/client.operation.ts:273— MutationLanes.enter has cyclomatic complexity 30 (threshold 15). Of this number, 29 points are the body's own statements and 1 belongs to one function item 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.
TcpMessageStream.LoginRegisterCoreAsync (cyclomatic 29) foreign/csharp/Iggy_SDK/IggyClient/Implementations/TcpMessageStream.Vsr.cs:179— TcpMessageStream.LoginRegisterCoreAsync has cyclomatic complexity 29 (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.
iggy_cpp::type_conversion::decode_field (cyclomatic 29) foreign/cpp/src/type_conversion.rs:1097— iggy_cpp::type_conversion::decode_field has cyclomatic complexity 29 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
replicaLinks.connect (cyclomatic 28) REDACTED:107— replicaLinks.connect 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.
PartitionReader.prepare (cyclomatic 28) foreign/swift/Sources/Iggy/Consumer/PartitionReader.swift:1137— PartitionReader.prepare 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.
PartitionReader.PollAsync (cyclomatic 27) foreign/csharp/Iggy_SDK/Consumers/PartitionReader.cs:1896— PartitionReader.PollAsync 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.
PrimaryRebalanceHeader::validate (cyclomatic 27) core/binary_protocol/src/consensus/primary_rebalance.rs:120— PrimaryRebalanceHeader::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.
QuicConnectionStringOptions::parse_options (cyclomatic 27) core/common/src/types/configuration/quic_config/quic_connection_string_options.rs:96— QuicConnectionStringOptions::parse_options has cyclomatic complexity 27 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
vsr.DecodeReplyFor (cyclomatic 27) foreign/go/internal/vsr/reply.go:37— vsr.DecodeReplyFor 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.
PartitionReader.poll (cyclomatic 27) foreign/node/src/stream/partition-reader.ts:1492— PartitionReader.poll 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.
iggy_common::types::options::catalog::admit (cyclomatic 26) core/common/src/types/options/catalog.rs:735— iggy_common::types::options::catalog::admit 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.
Workload::on_reply (cyclomatic 26) core/simulator/src/workload/mod.rs:662— Workload::on_reply 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.
PartitionReader.rewind (cyclomatic 26) foreign/go/client/reader/reader.go:2103— PartitionReader.rewind has cyclomatic complexity 26 (threshold 15). Of this number, 25 points are the body's own statements and 1 belongs to one function literal inside it that branches. 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.
PartitionReader.seek (cyclomatic 26) foreign/swift/Sources/Iggy/Consumer/PartitionReader.swift:862— PartitionReader.seek 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.
get-metadata-changes.command.checkQuery (cyclomatic 26) foreign/node/src/wire/system/get-metadata-changes.command.ts:209— get-metadata-changes.command.checkQuery 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.
PartitionReader.seekOnce (cyclomatic 26) foreign/node/src/stream/partition-reader.ts:610— PartitionReader.seekOnce 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.
PartitionReader.refuse (cyclomatic 26) foreign/node/src/stream/partition-reader.ts:1721— PartitionReader.refuse has cyclomatic complexity 26 (threshold 15). Of this number, 22 points are the body's own statements and 4 belong 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.
IggyPublisherBuilder.Validate (cyclomatic 25) foreign/csharp/Iggy_SDK/Publishers/IggyPublisherBuilder.cs:385— IggyPublisherBuilder.Validate 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.
PartitionIoJob::execute (cyclomatic 25) core/partitions/src/io.rs:715— PartitionIoJob::execute has cyclomatic complexity 25 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
Mirror::apply (cyclomatic 25) core/simulator/src/workload/change_log_oracle.rs:214— Mirror::apply has cyclomatic complexity 25 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
PartitionReader.rewind (cyclomatic 25) foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/reader/PartitionReader.java:595— PartitionReader.rewind 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.
PartitionReader.received (cyclomatic 25) foreign/swift/Sources/Iggy/Consumer/PartitionReader.swift:1981— PartitionReader.received 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.
ConsensusSession.acquireWhenAvailable (cyclomatic 24) foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/tcp/vsr/ConsensusSession.java:576— ConsensusSession.acquireWhenAvailable 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.
tcpLink.exchange (cyclomatic 24) foreign/go/client/tcp/tcp_link.go:69— tcpLink.exchange has cyclomatic complexity 24 (threshold 15). Of this number, 22 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
ClientCore.sendRaw (cyclomatic 24) foreign/swift/Sources/Iggy/Client/ClientCore.swift:550— ClientCore.sendRaw 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.
CommandResponseStream.routeFor (cyclomatic 24) foreign/node/src/client/client.socket.ts:921— CommandResponseStream.routeFor 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.
IggyConsumerBuilder.Validate (cyclomatic 23) foreign/csharp/Iggy_SDK/Consumers/IggyConsumerBuilder.cs:299— IggyConsumerBuilder.Validate 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.
TopicOptions.ToDictionary (cyclomatic 23) foreign/csharp/Iggy_SDK/Contracts/TopicOptions.cs:153— TopicOptions.ToDictionary has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
iggy_kafka_wire::bounds_guard::validate_fetch_shape (cyclomatic 23) core/kafka_wire/src/bounds_guard.rs:548— iggy_kafka_wire::bounds_guard::validate_fetch_shape 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.
Progress::rewind (cyclomatic 23) core/sdk/src/clients/reader/progress.rs:930— Progress::rewind 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.
Shadow::apply (cyclomatic 23) core/simulator/src/workload/shadow.rs:743— Shadow::apply 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.
PartitionReader.pump (cyclomatic 23) foreign/go/client/reader/reader.go:983— PartitionReader.pump has cyclomatic complexity 23 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
CreateTopic.typedOptions (cyclomatic 23) foreign/go/internal/command/topic.go:99— CreateTopic.typedOptions has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ClientCore.sweep (cyclomatic 23) foreign/swift/Sources/Iggy/Client/ClientCore.swift:925— ClientCore.sweep 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.
client.connection-string.parseConnectionString (cyclomatic 23) REDACTED:59— client.connection-string.parseConnectionString has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
poll-messages.command.syncAssignment (cyclomatic 23) foreign/node/src/wire/message/poll-messages.command.ts:215— poll-messages.command.syncAssignment 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.
PartitionReader.rewind (cyclomatic 23) foreign/node/src/stream/partition-reader.ts:1038— PartitionReader.rewind 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.
PartitionReader.SeekOnceAsync (cyclomatic 22) foreign/csharp/Iggy_SDK/Consumers/PartitionReader.cs:490— PartitionReader.SeekOnceAsync 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.
CompleteLifecycleRequest::apply (cyclomatic 22) core/metadata/src/stm/lifecycle.rs:522— CompleteLifecycleRequest::apply 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.
TopicKey::check_rule (cyclomatic 22) gateways/kafka/src/protocol/handlers/topic_config/keys.rs:424— TopicKey::check_rule 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.
PartitionReader.readLocked (cyclomatic 22) foreign/go/client/reader/reader.go:1168— PartitionReader.readLocked has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 7 of the 22 points are its own statements and the rest belongs to one function literal inside it that branches (line 1191). 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.
TopicCreateOptions.toResourceOptions (cyclomatic 22) foreign/swift/Sources/Iggy/Models/TopicOptions.swift:157— TopicCreateOptions.toResourceOptions has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CommandResponseStream.connectBootstrap (cyclomatic 22) foreign/node/src/client/client.socket.ts:1263— CommandResponseStream.connectBootstrap has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 7 of the 22 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 1269, 1307). 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.
WebSocketConnectionStringOptions::parse_options (cyclomatic 21) core/common/src/types/configuration/websocket_config/websocket_connection_string_options.rs:107— WebSocketConnectionStringOptions::parse_options has cyclomatic complexity 21 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
PartitionConfig::validate (cyclomatic 21) core/configs/src/server_config/partition.rs:301— PartitionConfig::validate 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.
JournalState::decode (cyclomatic 21) core/journal/src/partition_journal.rs:1792— JournalState::decode has cyclomatic complexity 21 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
client.parseConnectionOptions (cyclomatic 21) foreign/go/client/connection_string.go:215— client.parseConnectionOptions 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.
IggyTcpClient.signIn (cyclomatic 21) foreign/go/client/tcp/tcp_session_management.go:222— IggyTcpClient.signIn 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.
replicaLinks.runSlot (cyclomatic 21) REDACTED:314— replicaLinks.runSlot has cyclomatic complexity 21 (threshold 15). Of this number, 19 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
PollRouter.exchange (cyclomatic 21) foreign/swift/Sources/Iggy/Client/PollRouter.swift:768— PollRouter.exchange 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.
IggyConnection.exchange (cyclomatic 21) foreign/node/src/client/client.connection.ts:187— IggyConnection.exchange 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.
PartitionState::apply (cyclomatic 20) gateways/kafka/src/coordinator/replay.rs:132— PartitionState::apply has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
PartitionReader.receive (cyclomatic 20) foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/reader/PartitionReader.java:1278— PartitionReader.receive 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.
PollRouter.failedAttempt (cyclomatic 20) foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/tcp/PollRouter.java:1080— PollRouter.failedAttempt 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.
PartitionReader.fetchAhead (cyclomatic 20) foreign/swift/Sources/Iggy/Consumer/PartitionReader.swift:1653— PartitionReader.fetchAhead has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
PartitionReader.accept (cyclomatic 20) foreign/swift/Sources/Iggy/Consumer/PartitionReader.swift:2067— PartitionReader.accept 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.
PartitionReader.failed (cyclomatic 20) foreign/swift/Sources/Iggy/Consumer/PartitionReader.swift:2344— PartitionReader.failed has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
CommandResponseStream.runReplica (cyclomatic 20) foreign/node/src/client/client.socket.ts:1171— CommandResponseStream.runReplica 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.
ConnectionString.ParseOptions (cyclomatic 19) foreign/csharp/Iggy_SDK/Configuration/ConnectionString.cs:133— ConnectionString.ParseOptions has cyclomatic complexity 19 (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.
HttpMessageStream.SendDeferredPollAsync (cyclomatic 19) foreign/csharp/Iggy_SDK/IggyClient/Implementations/HttpMessageStream.cs:460— HttpMessageStream.SendDeferredPollAsync has cyclomatic complexity 19 (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.
AdvertisedAddress::from_str (cyclomatic 19) core/configs/src/server_config/cluster.rs:762— AdvertisedAddress::from_str 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.
TestHarness::start_internal (cyclomatic 19) core/integration/src/harness/orchestrator/harness.rs:113— TestHarness::start_internal has cyclomatic complexity 19 (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.
PrepareJournal::scan (cyclomatic 19) core/journal/src/prepare_journal.rs:602— PrepareJournal::scan 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.
LaneTicket::drop (cyclomatic 19) core/sdk/src/session_owner/lanes.rs:706— LaneTicket::drop 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.
AsyncIggyTcpClient.loginOnLeader (cyclomatic 19) foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/tcp/AsyncIggyTcpClient.java:1381— AsyncIggyTcpClient.loginOnLeader 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.
client.ParseConnectionString (cyclomatic 19) foreign/go/client/connection_string.go:86— client.ParseConnectionString 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.
IggyTcpClient.establishSession (cyclomatic 19) foreign/go/client/tcp/tcp_session_management.go:303— IggyTcpClient.establishSession 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.
laneTicket.finish (cyclomatic 19) foreign/go/client/tcp/tcp_pending.go:506— laneTicket.finish 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.
replicaLinks.install (cyclomatic 19) REDACTED:229— replicaLinks.install 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.
ConnectionString.parseOptions (cyclomatic 19) foreign/swift/Sources/Iggy/Client/ConnectionString.swift:156— ConnectionString.parseOptions has cyclomatic complexity 19 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
HumantimeParser.parse (cyclomatic 19) foreign/swift/Sources/Iggy/Client/ConnectionString.swift:259— HumantimeParser.parse 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.
IggyClient.routedPartitionRequest (cyclomatic 19) foreign/swift/Sources/Iggy/Client/IggyClient+Messages.swift:425— IggyClient.routedPartitionRequest 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.
client.connection-string.parseConnectionOptions (cyclomatic 19) REDACTED:156— client.connection-string.parseConnectionOptions 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.
PartitionReader.refreshAssignment (cyclomatic 19) foreign/node/src/stream/partition-reader.ts:1137— PartitionReader.refreshAssignment 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.
consumer-stream.readerStream (cyclomatic 19) foreign/node/src/stream/consumer-stream.ts:111— consumer-stream.readerStream has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 5 of the 19 points are its own statements and the rest belongs to 5 function items inside it that branch (read, a function literal at line 131, signInAgain, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
BackgroundMessageProcessor.SendWithRetry (cyclomatic 18) foreign/csharp/Iggy_SDK/Publishers/BackgroundMessageProcessor.cs:485— BackgroundMessageProcessor.SendWithRetry 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.
VsrConnection.SendAttemptAsync (cyclomatic 18) foreign/csharp/Iggy_SDK/Vsr/VsrConnection.cs:119— VsrConnection.SendAttemptAsync has cyclomatic complexity 18 (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.
VsrConnection.ExchangeAsync (cyclomatic 18) foreign/csharp/Iggy_SDK/Vsr/VsrConnection.cs:173— VsrConnection.ExchangeAsync 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.
CreatePartitionsWithAssignmentsRequest::apply (cyclomatic 18) core/metadata/src/stm/stream.rs:3845— CreatePartitionsWithAssignmentsRequest::apply 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.
ConsumerOffsetsWire::decode (cyclomatic 18) core/partitions/src/state_transfer.rs:747— ConsumerOffsetsWire::decode 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: PartitionInstallError::fmt (cyclomatic 20) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
server_common::diagnostics::report_io_uring_environment (cyclomatic 18) core/server_common/src/diagnostics.rs:280— server_common::diagnostics::report_io_uring_environment 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.
QuicConfig::new (cyclomatic 18) foreign/python/src/config.rs:669— QuicConfig::new 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.
PartitionReader.readGroupsLocked (cyclomatic 18) foreign/go/client/reader/reader.go:1065— PartitionReader.readGroupsLocked 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.
tcp.partitionQuery (cyclomatic 18) foreign/go/client/tcp/tcp_messaging.go:358— tcp.partitionQuery 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.
IggyTcpClient.waitForRecovery (cyclomatic 18) foreign/go/client/tcp/tcp_driver.go:821— IggyTcpClient.waitForRecovery 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.
MetadataChangesQuery.Validate (cyclomatic 18) foreign/go/contracts/metadata_changes.go:598— MetadataChangesQuery.Validate 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.
PollRouter.send (cyclomatic 18) foreign/swift/Sources/Iggy/Client/PollRouter.swift:419— PollRouter.send 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.
PartitionReader.drain (cyclomatic 18) foreign/swift/Sources/Iggy/Consumer/PartitionReader.swift:645— PartitionReader.drain has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
MetadataChangesQuery.validate (cyclomatic 18) foreign/swift/Sources/Iggy/Models/MetadataChanges.swift:474— MetadataChangesQuery.validate 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: MetadataChange.decode (cyclomatic 25) 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.
CommandResponseStream.exchange (cyclomatic 18) foreign/node/src/client/client.socket.ts:869— CommandResponseStream.exchange 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.
CommandResponseStream.readyLink (cyclomatic 18) foreign/node/src/client/client.socket.ts:1092— CommandResponseStream.readyLink 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 cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
PartitionReader.Spread (cyclomatic 17) foreign/csharp/Iggy_SDK/Consumers/PartitionReader.cs:1501— PartitionReader.Spread has cyclomatic complexity 17 (threshold 15). Of this number, 14 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.
PartitionReader.Refuse (cyclomatic 17) foreign/csharp/Iggy_SDK/Consumers/PartitionReader.cs:2265— PartitionReader.Refuse 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.
CreateTopicWithAssignmentsRequest::apply (cyclomatic 17) core/metadata/src/stm/stream.rs:3322— CreateTopicWithAssignmentsRequest::apply 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.
UpdateUserResolvedRequest::apply (cyclomatic 17) core/metadata/src/stm/user.rs:636— UpdateUserResolvedRequest::apply 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.
TopicCreateOptions::to_option_map (cyclomatic 17) core/common/src/types/options/mod.rs:1631— TopicCreateOptions::to_option_map 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. This is NOT this file's highest cyclomatic complexity: iggy_common::types::options::resource_options_json::decode_value (cyclomatic 18) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
harness_derive::codegen::generate_harness_setup (cyclomatic 17) core/harness_derive/src/codegen.rs:389— harness_derive::codegen::generate_harness_setup 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.
StreamContext::serve (cyclomatic 17) core/message_bus/src/transports/quic.rs:480— StreamContext::serve 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.
Streams::request_lifecycle_blocked (cyclomatic 17) core/metadata/src/stm/lifecycle.rs:263— Streams::request_lifecycle_blocked 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.
reader.NewPartitionReader (cyclomatic 17) foreign/go/client/reader/reader.go:385— reader.NewPartitionReader 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.
PartitionReader.settleOnCloseLocked (cyclomatic 17) foreign/go/client/reader/reader.go:1608— PartitionReader.settleOnCloseLocked 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.
IggyTcpClient.bindLink (cyclomatic 17) foreign/go/client/tcp/tcp_session_management.go:383— IggyTcpClient.bindLink 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.
vsr.StampRequestHeader (cyclomatic 17) foreign/go/internal/vsr/envelope.go:44— vsr.StampRequestHeader 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.
ClientCore.signIn (cyclomatic 17) foreign/swift/Sources/Iggy/Client/ClientCore.swift:1315— ClientCore.signIn 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.
IggyClient.fetch (cyclomatic 17) foreign/swift/Sources/Iggy/Client/IggyClient+Messages.swift:236— IggyClient.fetch 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.
CommandResponseStream.installRoster (cyclomatic 17) foreign/node/src/client/client.socket.ts:1127— CommandResponseStream.installRoster 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.
client.socket.partitionRoute (cyclomatic 17) foreign/node/src/client/client.socket.ts:1693— client.socket.partitionRoute 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.
PartitionReader.RewindAsync (cyclomatic 16) foreign/csharp/Iggy_SDK/Consumers/PartitionReader.cs:978— PartitionReader.RewindAsync 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.
OptionKeys.Patch (cyclomatic 16) foreign/csharp/Iggy_SDK/Contracts/OptionKeys.cs:172— OptionKeys.Patch 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, 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: OptionKeys.Describe (cyclomatic 18) 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.
TcpContracts.CreateMessage (cyclomatic 16) foreign/csharp/Iggy_SDK/Contracts/Tcp/TcpContracts.cs:485— TcpContracts.CreateMessage 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: TcpContracts.HeaderKindToByte (cyclomatic 17) 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.
HttpMessageStream.PollAsync (cyclomatic 16) foreign/csharp/Iggy_SDK/IggyClient/Implementations/HttpMessageStream.cs:357— HttpMessageStream.PollAsync has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
TcpMessageStream.TryEstablishConnectionAsync (cyclomatic 16) foreign/csharp/Iggy_SDK/IggyClient/Implementations/TcpMessageStream.cs:1225— TcpMessageStream.TryEstablishConnectionAsync 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.
TcpMessageStream.RecoverSessionAsync (cyclomatic 16) foreign/csharp/Iggy_SDK/IggyClient/Implementations/TcpMessageStream.ReplicaLinks.cs:519— TcpMessageStream.RecoverSessionAsync 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.
UpdateTopicResolvedRequest::apply (cyclomatic 16) core/metadata/src/stm/stream.rs:3568— UpdateTopicResolvedRequest::apply has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
SendMessages::deserialize_recording (cyclomatic 16) core/common/src/http/messages/send_messages.rs:164— SendMessages::deserialize_recording 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.
consensus::dvc_merge::merge_dvc_quorum (cyclomatic 16) core/consensus/src/dvc_merge.rs:582— consensus::dvc_merge::merge_dvc_quorum 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.
QuicLink::send (cyclomatic 16) core/sdk/src/links/quic.rs:67— QuicLink::send has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
LinksShared::sweep (cyclomatic 16) core/sdk/src/links/replicas.rs:581— LinksShared::sweep has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
Logging::cleanup_log_files (cyclomatic 16) core/server_common/src/log/logger.rs:625— Logging::cleanup_log_files 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.
Slot.attach (cyclomatic 16) foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/tcp/PollRouter.java:1598— Slot.attach has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
IggyTcpClient.SendMessages (cyclomatic 16) foreign/go/client/tcp/tcp_messaging.go:43— IggyTcpClient.SendMessages 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.
iggcon.DeserializeHeaders (cyclomatic 16) foreign/go/contracts/user_headers.go:154— iggcon.DeserializeHeaders 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.
command.encodeOptions (cyclomatic 16) foreign/go/internal/command/update_resource.go:266— command.encodeOptions has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
ClientCore.requireAuthenticated (cyclomatic 16) foreign/swift/Sources/Iggy/Client/ClientCore.swift:467— ClientCore.requireAuthenticated 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.
PartitionReader.start (cyclomatic 16) foreign/swift/Sources/Iggy/Consumer/PartitionReader.swift:545— PartitionReader.start has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
PartitionReader.open (cyclomatic 16) foreign/node/src/stream/partition-reader.ts:408— PartitionReader.open has cyclomatic complexity 16 (threshold 15). Of this number, 15 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.
CommandResponseStream.sendCommand (cyclomatic 16) foreign/node/src/client/client.socket.ts:241— CommandResponseStream.sendCommand has cyclomatic complexity 16 (threshold 15). Of this number, 14 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: 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.
IggyTcpClient.driveOperation (cognitive 320) foreign/go/client/tcp/tcp_driver.go:251— IggyTcpClient.driveOperation has cognitive complexity 320 (threshold 15). Drivers by points: if/else 94 (271 pts), boolean chains 45, match/switch 2 (3 pts), loops 1 (nesting depth added 178). Of this number, 307 points are the body's own statements and 13 belong to 2 function literals inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
CommandResponseStream.drive (cognitive 315) foreign/node/src/client/client.socket.ts:371— CommandResponseStream.drive has cognitive complexity 315 (threshold 15). Drivers by points: if/else 76 (182 pts), boolean chains 69, ternaries 22 (44 pts), error handling 5 (12 pts), loops 3 (8 pts) (nesting depth added 140). Of this number, 314 points are the body's own statements and 1 belongs 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.
TcpMessageStream.RunClientOperationAsync (cognitive 306) foreign/csharp/Iggy_SDK/IggyClient/Implementations/TcpMessageStream.PollRouting.cs:267— TcpMessageStream.RunClientOperationAsync has cognitive complexity 306 (threshold 15). Of this number, 305 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.
IggyTcpClient.drive (cognitive 117) foreign/go/client/tcp/tcp_driver.go:37— IggyTcpClient.drive has cognitive complexity 117 (threshold 15). Drivers by points: if/else 42 (97 pts), boolean chains 11, match/switch 3 (8 pts), loops 1 (nesting depth added 60). Of this number, 115 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Projection::project (cognitive 115) core/metadata/src/change_log/current.rs:179— Projection::project has cognitive complexity 115 (threshold 15). Drivers by points: if/else 23 (81 pts), loops 10 (27 pts), boolean chains 4, match/switch 2 (3 pts) (nesting depth added 76). 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.
StreamsSnapshot::validate_ownership_history (cognitive 95) core/metadata/src/stm/lifecycle.rs:631— StreamsSnapshot::validate_ownership_history has cognitive complexity 95 (threshold 15). Drivers by points: if/else 18 (55 pts), loops 10 (24 pts), boolean chains 13, match/switch 1 (3 pts) (nesting depth added 53). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ClientCore.exchangeWithCommit (cognitive 90) foreign/swift/Sources/Iggy/Client/ClientCore.swift:193— ClientCore.exchangeWithCommit has cognitive complexity 90 (threshold 15). Drivers by points: if/else 20 (53 pts), ternaries 7 (24 pts), boolean chains 7, error handling 2 (5 pts), loops 1 (nesting depth added 53). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ClusterConfig::validate (cognitive 87) core/configs/src/server_config/cluster.rs:1049— ClusterConfig::validate has cognitive complexity 87 (threshold 15). Drivers by points: if/else 41 (68 pts), loops 7 (15 pts), boolean chains 4 (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TransferFileJob::execute (cognitive 70) core/partitions/src/io.rs:999— TransferFileJob::execute has cognitive complexity 70 (threshold 15). Drivers by points: if/else 19 (45 pts), match/switch 6 (16 pts), loops 3 (7 pts), boolean chains 2 (nesting depth added 40). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
PartitionReader.prepare (cognitive 63) foreign/swift/Sources/Iggy/Consumer/PartitionReader.swift:1137— PartitionReader.prepare has cognitive complexity 63 (threshold 15). Drivers by points: if/else 14 (40 pts), error handling 4 (10 pts), boolean chains 7, loops 1 (3 pts), ternaries 1 (3 pts) (nesting depth added 36). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
PollRouter.exchange (cognitive 62) foreign/swift/Sources/Iggy/Client/PollRouter.swift:904— PollRouter.exchange has cognitive complexity 62 (threshold 15). Drivers by points: if/else 17 (37 pts), boolean chains 17, error handling 3 (6 pts), loops 1, ternaries 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IggyTcpClient.consumerRoute (cognitive 60) foreign/go/client/tcp/tcp_poll_routing.go:260— IggyTcpClient.consumerRoute has cognitive complexity 60 (threshold 15). Drivers by points: if/else 27 (53 pts), boolean chains 6, loops 1 (nesting depth added 26). Of this number, 58 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.
ClientCore.exchangeLocked (cognitive 58) foreign/swift/Sources/Iggy/Client/ClientCore.swift:725— ClientCore.exchangeLocked has cognitive complexity 58 (threshold 15). Drivers by points: if/else 13 (25 pts), boolean chains 14, error handling 6 (12 pts), match/switch 2 (6 pts), loops 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CommandResponseStream.connectBootstrap (cognitive 54) foreign/node/src/client/client.socket.ts:1263— CommandResponseStream.connectBootstrap has cognitive complexity 54 (threshold 15). Drivers by points: if/else 12 (39 pts), boolean chains 5, error handling 2 (5 pts), loops 2 (5 pts) (nesting depth added 33). Most of this is not in the body itself: 7 of the 54 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 1269, 1307). 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.
PartitionReader.StartReads (cognitive 51) foreign/csharp/Iggy_SDK/Consumers/PartitionReader.cs:1293— PartitionReader.StartReads has cognitive complexity 51 (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.
VsrConnection.ReadRepliesAsync (cognitive 51) foreign/csharp/Iggy_SDK/Vsr/VsrConnection.cs:385— VsrConnection.ReadRepliesAsync has cognitive complexity 51 (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.
PartitionReader.prepareRead (cognitive 51) foreign/go/client/reader/reader.go:1333— PartitionReader.prepareRead has cognitive complexity 51 (threshold 15). Drivers by points: if/else 12 (26 pts), boolean chains 12, match/switch 3 (10 pts), loops 3 (nesting depth added 21). Of this number, 45 points are the body's own statements and 6 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.
ClientCore.sweep (cognitive 48) foreign/swift/Sources/Iggy/Client/ClientCore.swift:925— ClientCore.sweep has cognitive complexity 48 (threshold 15). Drivers by points: if/else 10 (29 pts), error handling 3 (10 pts), boolean chains 4, loops 2 (3 pts), match/switch 1 (2 pts) (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PartitionReader.received (cognitive 48) foreign/swift/Sources/Iggy/Consumer/PartitionReader.swift:2128— PartitionReader.received has cognitive complexity 48 (threshold 15). Drivers by points: if/else 20 (33 pts), boolean chains 13, error handling 1, match/switch 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MutationLanes.enter (cognitive 47) foreign/node/src/client/client.operation.ts:273— MutationLanes.enter has cognitive complexity 47 (threshold 15). Drivers by points: if/else 10 (24 pts), boolean chains 8, ternaries 4 (6 pts), loops 3 (5 pts), error handling 2 (4 pts) (nesting depth added 20). Of this number, 46 points are the body's own statements and 1 belongs to one function item 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.
ClientCore.sendRaw (cognitive 46) foreign/swift/Sources/Iggy/Client/ClientCore.swift:550— ClientCore.sendRaw has cognitive complexity 46 (threshold 15). Drivers by points: if/else 10 (26 pts), boolean chains 7, ternaries 2 (6 pts), error handling 1 (3 pts), match/switch 2 (3 pts), loops 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TcpMessageStream.GetPartitionRouteAsync (cognitive 45) foreign/csharp/Iggy_SDK/IggyClient/Implementations/TcpMessageStream.PollRouting.cs:1042— TcpMessageStream.GetPartitionRouteAsync has cognitive complexity 45 (threshold 15). Of this number, 43 points are the body's own statements and 2 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.
PartitionReader.writeSeek (cognitive 44) foreign/go/client/reader/reader.go:682— PartitionReader.writeSeek has cognitive complexity 44 (threshold 15). Drivers by points: if/else 13 (22 pts), boolean chains 14, match/switch 3 (7 pts), loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IggyTcpClient.establishSession (cognitive 44) foreign/go/client/tcp/tcp_session_management.go:303— IggyTcpClient.establishSession has cognitive complexity 44 (threshold 15). Drivers by points: if/else 18 (41 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 24). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
IggyPublisherBuilder.Validate (cognitive 43) foreign/csharp/Iggy_SDK/Publishers/IggyPublisherBuilder.cs:385— IggyPublisherBuilder.Validate 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.
ServerConfig::validate (cognitive 43) core/configs/src/server_config/validators.rs:51— ServerConfig::validate has cognitive complexity 43 (threshold 15). Drivers by points: if/else 21 (26 pts), boolean chains 11, loops 3 (6 pts) (nesting depth added 8). 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.
PartitionReader.received (cognitive 43) foreign/swift/Sources/Iggy/Consumer/PartitionReader.swift:1981— PartitionReader.received has cognitive complexity 43 (threshold 15). Drivers by points: if/else 16 (34 pts), boolean chains 8, loops 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TcpContracts.CreateMessage (cognitive 41) foreign/csharp/Iggy_SDK/Contracts/Tcp/TcpContracts.cs:485— TcpContracts.CreateMessage has cognitive complexity 41 (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.
TcpMessageStream.RunReplicaLinkAsync (cognitive 41) foreign/csharp/Iggy_SDK/IggyClient/Implementations/TcpMessageStream.ReplicaLinks.cs:100— TcpMessageStream.RunReplicaLinkAsync has cognitive complexity 41 (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.
IggyTcpClient.register (cognitive 41) foreign/go/client/tcp/tcp_session_management.go:75— IggyTcpClient.register has cognitive complexity 41 (threshold 15). Drivers by points: if/else 28 (35 pts), boolean chains 4, match/switch 2 (nesting depth added 7). Of this number, 31 points are the body's own statements and 10 belong to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
CommandResponseStream.routeFor (cognitive 41) foreign/node/src/client/client.socket.ts:921— CommandResponseStream.routeFor has cognitive complexity 41 (threshold 15). Drivers by points: if/else 10 (25 pts), boolean chains 6, error handling 2 (5 pts), ternaries 1 (4 pts), loops 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PartitionReader.SeekOnceAsync (cognitive 40) foreign/csharp/Iggy_SDK/Consumers/PartitionReader.cs:490— PartitionReader.SeekOnceAsync has cognitive complexity 40 (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.
replicaLinks.connect (cognitive 40) REDACTED:107— replicaLinks.connect has cognitive complexity 40 (threshold 15). Drivers by points: if/else 16 (28 pts), boolean chains 5, loops 3 (4 pts), match/switch 2 (3 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PartitionReader.startReads (cognitive 40) foreign/node/src/stream/partition-reader.ts:1247— PartitionReader.startReads has cognitive complexity 40 (threshold 15). Drivers by points: if/else 9 (20 pts), boolean chains 13, loops 4 (5 pts), ternaries 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CommandResponseStream.runReplica (cognitive 40) foreign/node/src/client/client.socket.ts:1171— CommandResponseStream.runReplica has cognitive complexity 40 (threshold 15). Drivers by points: if/else 10 (28 pts), boolean chains 4, error handling 2 (4 pts), loops 2 (4 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PartitionReader.Complete (cognitive 37) foreign/csharp/Iggy_SDK/Consumers/PartitionReader.cs:2083— PartitionReader.Complete 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.
TcpMessageStream.TryEstablishConnectionAsync (cognitive 37) foreign/csharp/Iggy_SDK/IggyClient/Implementations/TcpMessageStream.cs:1225— TcpMessageStream.TryEstablishConnectionAsync 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.
SendMessages::deserialize_recording (cognitive 37) core/common/src/http/messages/send_messages.rs:164— SendMessages::deserialize_recording has cognitive complexity 37 (threshold 15). Drivers by points: if/else 11 (30 pts), loops 2 (4 pts), match/switch 2 (3 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PartitionReader.rewind (cognitive 37) foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/reader/PartitionReader.java:595— PartitionReader.rewind has cognitive complexity 37 (threshold 15). Drivers by points: ternaries 6 (15 pts), boolean chains 11, if/else 6 (9 pts), loops 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ConsensusSession.acquireWhenAvailable (cognitive 37) foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/tcp/vsr/ConsensusSession.java:576— ConsensusSession.acquireWhenAvailable has cognitive complexity 37 (threshold 15). Drivers by points: if/else 15 (23 pts), boolean chains 8, loops 3 (6 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AsyncTcpConnection.completeAttempt (cognitive 37) foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/tcp/AsyncTcpConnection.java:1303— AsyncTcpConnection.completeAttempt has cognitive complexity 37 (threshold 15). Drivers by points: boolean chains 18, if/else 12 (15 pts), error handling 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 5). 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.
Workload::on_reply (cognitive 36) core/simulator/src/workload/mod.rs:662— Workload::on_reply has cognitive complexity 36 (threshold 15). Drivers by points: if/else 24 (30 pts), boolean chains 5, match/switch 1 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
PartitionReader.complete (cognitive 36) foreign/node/src/stream/partition-reader.ts:1600— PartitionReader.complete has cognitive complexity 36 (threshold 15). Drivers by points: if/else 16 (22 pts), boolean chains 14 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IggyTcpClient.signIn (cognitive 35) foreign/go/client/tcp/tcp_session_management.go:222— IggyTcpClient.signIn has cognitive complexity 35 (threshold 15). Drivers by points: if/else 16 (32 pts), boolean chains 2, loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
replicaLinks.runSlot (cognitive 35) REDACTED:314— replicaLinks.runSlot has cognitive complexity 35 (threshold 15). Drivers by points: if/else 11 (25 pts), boolean chains 6, match/switch 1 (3 pts), loops 1 (nesting depth added 16). Of this number, 33 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.
IggyClient.fetch (cognitive 35) foreign/swift/Sources/Iggy/Client/IggyClient+Messages.swift:236— IggyClient.fetch has cognitive complexity 35 (threshold 15). Drivers by points: if/else 6 (16 pts), ternaries 2 (6 pts), loops 1 (5 pts), boolean chains 4, error handling 3 (4 pts) (nesting depth added 19). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
update-resource.command.checkPatch (cognitive 35) foreign/node/src/wire/system/update-resource.command.ts:123— update-resource.command.checkPatch has cognitive complexity 35 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 10, ternaries 3 (7 pts), loops 1 (nesting depth added 8). Of this number, 33 points are the body's own statements and 2 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.
PartitionReader.seekOnce (cognitive 35) foreign/node/src/stream/partition-reader.ts:610— PartitionReader.seekOnce has cognitive complexity 35 (threshold 15). Drivers by points: if/else 10 (20 pts), boolean chains 9, ternaries 2 (3 pts), error handling 1 (2 pts), loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BackgroundMessageProcessor.SendWithRetry (cognitive 34) foreign/csharp/Iggy_SDK/Publishers/BackgroundMessageProcessor.cs:485— BackgroundMessageProcessor.SendWithRetry 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.
TestHarness::start_internal (cognitive 34) core/integration/src/harness/orchestrator/harness.rs:113— TestHarness::start_internal has cognitive complexity 34 (threshold 15). Drivers by points: loops 7 (16 pts), if/else 8 (15 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 17). 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.
QuicTransportConn::run (cognitive 33) core/message_bus/src/transports/quic.rs:638— QuicTransportConn::run has cognitive complexity 33 (threshold 15). Drivers by points: if/else 7 (18 pts), match/switch 4 (12 pts), loops 2 (3 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Progress::rewind (cognitive 33) core/sdk/src/clients/reader/progress.rs:930— Progress::rewind has cognitive complexity 33 (threshold 15). Drivers by points: if/else 10 (20 pts), boolean chains 7, loops 4, match/switch 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PartitionReader.receiveLocked (cognitive 33) foreign/go/client/reader/reader.go:1490— PartitionReader.receiveLocked has cognitive complexity 33 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 13, match/switch 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HumantimeParser.parse (cognitive 33) foreign/swift/Sources/Iggy/Client/ConnectionString.swift:259— HumantimeParser.parse has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (26 pts), loops 3 (5 pts), match/switch 1 (2 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PartitionReader.seek (cognitive 33) foreign/swift/Sources/Iggy/Consumer/PartitionReader.swift:862— PartitionReader.seek has cognitive complexity 33 (threshold 15). Drivers by points: if/else 17 (24 pts), boolean chains 6, error handling 1, loops 1, ternaries 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PartitionReader.PollAsync (cognitive 32) foreign/csharp/Iggy_SDK/Consumers/PartitionReader.cs:1896— PartitionReader.PollAsync 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.
FileScanner::probe_for_survivor (cognitive 32) core/partitions/src/segment_recovery.rs:3266— FileScanner::probe_for_survivor has cognitive complexity 32 (threshold 15). Drivers by points: if/else 7 (27 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PartitionReader.drain (cognitive 32) foreign/swift/Sources/Iggy/Consumer/PartitionReader.swift:645— PartitionReader.drain has cognitive complexity 32 (threshold 15). Drivers by points: if/else 8 (14 pts), error handling 4 (10 pts), loops 4 (6 pts), boolean chains 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
poll-messages.command.syncAssignment (cognitive 32) foreign/node/src/wire/message/poll-messages.command.ts:215— poll-messages.command.syncAssignment has cognitive complexity 32 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 8, error handling 3 (5 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IggyConsumerBuilder.Validate (cognitive 31) foreign/csharp/Iggy_SDK/Consumers/IggyConsumerBuilder.cs:299— IggyConsumerBuilder.Validate has cognitive complexity 31 (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.
iggy_common::types::options::catalog::admit (cognitive 31) core/common/src/types/options/catalog.rs:735— iggy_common::types::options::catalog::admit has cognitive complexity 31 (threshold 15). Drivers by points: if/else 12 (19 pts), boolean chains 5, match/switch 3 (4 pts), loops 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CompleteLifecycleRequest::apply (cognitive 31) core/metadata/src/stm/lifecycle.rs:522— CompleteLifecycleRequest::apply has cognitive complexity 31 (threshold 15). Drivers by points: if/else 12 (23 pts), loops 4 (5 pts), match/switch 2 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LaneTicket::drop (cognitive 31) core/sdk/src/session_owner/lanes.rs:706— LaneTicket::drop has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (23 pts), boolean chains 6, loops 1 (2 pts) (nesting depth added 13). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
client.parseConnectionOptions (cognitive 31) foreign/go/client/connection_string.go:215— client.parseConnectionOptions has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (25 pts), boolean chains 3, match/switch 1 (2 pts), loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PollRouter.exchange (cognitive 31) foreign/swift/Sources/Iggy/Client/PollRouter.swift:768— PollRouter.exchange has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (19 pts), error handling 6 (9 pts), boolean chains 3 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PartitionReader.poll (cognitive 31) foreign/node/src/stream/partition-reader.ts:1492— PartitionReader.poll has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 8, ternaries 5 (6 pts), error handling 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Args::from (cognitive 30) core/common/src/types/args/mod.rs:424— Args::from has cognitive complexity 30 (threshold 15). Drivers by points: if/else 28 (29 pts), loops 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
PartitionReader.readGroupsLocked (cognitive 30) foreign/go/client/reader/reader.go:1065— PartitionReader.readGroupsLocked has cognitive complexity 30 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 6 (9 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ClientCore.signIn (cognitive 30) foreign/swift/Sources/Iggy/Client/ClientCore.swift:1315— ClientCore.signIn has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (21 pts), error handling 2 (4 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MutationLanes.RestartAsync (cognitive 29) foreign/csharp/Iggy_SDK/Vsr/MutationLanes.cs:219— MutationLanes.RestartAsync 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.
iggy_cli::get_command (cognitive 29) core/cli/src/main.rs:114— iggy_cli::get_command has cognitive complexity 29 (threshold 15). Drivers by points: match/switch 15 (29 pts) (nesting depth added 14). 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.
ShardingConfig::validate (cognitive 29) core/configs/src/server_config/sharding.rs:235— ShardingConfig::validate has cognitive complexity 29 (threshold 15). Drivers by points: if/else 22, boolean chains 7. 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.
PollReadResult::limit_bytes (cognitive 29) core/partitions/src/poll_plan.rs:324— PollReadResult::limit_bytes has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (23 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
client.parseIggyDuration (cognitive 29) foreign/go/client/connection_string.go:294— client.parseIggyDuration has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (23 pts), match/switch 2 (4 pts), boolean chains 1, loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Batch.decodeMessages (cognitive 29) foreign/swift/Sources/Iggy/Protocol/Batch.swift:250— Batch.decodeMessages has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (23 pts), loops 2 (3 pts), ternaries 1 (3 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DurationParser.parse (cognitive 29) foreign/node/src/duration.utils.ts:159— DurationParser.parse has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (24 pts), loops 3 (5 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IggyConnection.exchange (cognitive 29) foreign/node/src/client/client.connection.ts:187— IggyConnection.exchange has cognitive complexity 29 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 6, ternaries 2 (6 pts), error handling 2, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PrimaryRebalanceHeader::validate (cognitive 28) core/binary_protocol/src/consensus/primary_rebalance.rs:120— PrimaryRebalanceHeader::validate has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 13, match/switch 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
replicaLinks.install (cognitive 28) REDACTED:229— replicaLinks.install has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (21 pts), boolean chains 4, loops 3 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PollRouter.send (cognitive 28) foreign/swift/Sources/Iggy/Client/PollRouter.swift:419— PollRouter.send has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 6, error handling 1 (2 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PartitionReader.receive (cognitive 27) foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/reader/PartitionReader.java:1278— PartitionReader.receive has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 9, ternaries 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ClientCore.requireAuthenticated (cognitive 27) foreign/swift/Sources/Iggy/Client/ClientCore.swift:467— ClientCore.requireAuthenticated has cognitive complexity 27 (threshold 15). Drivers by points: if/else 6 (17 pts), boolean chains 3, error handling 1 (3 pts), match/switch 2, ternaries 1 (2 pts) (nesting depth added 14). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
PartitionReader.accept (cognitive 27) foreign/swift/Sources/Iggy/Consumer/PartitionReader.swift:2067— PartitionReader.accept has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 8, ternaries 2 (5 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TcpMessageStream.LoginRegisterCoreAsync (cognitive 26) foreign/csharp/Iggy_SDK/IggyClient/Implementations/TcpMessageStream.Vsr.cs:179— TcpMessageStream.LoginRegisterCoreAsync 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.
harness_derive::codegen::generate_harness_setup (cognitive 26) core/harness_derive/src/codegen.rs:389— harness_derive::codegen::generate_harness_setup has cognitive complexity 26 (threshold 15). Drivers by points: if/else 21 (23 pts), match/switch 2 (3 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
tools::data-seeder::seeder::send_messages (cognitive 26) core/tools/src/data-seeder/seeder.rs:119— tools::data-seeder::seeder::send_messages has cognitive complexity 26 (threshold 15). Drivers by points: if/else 3 (10 pts), loops 4 (10 pts), match/switch 1 (5 pts), boolean chains 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TopicCreateOptions.toResourceOptions (cognitive 26) foreign/swift/Sources/Iggy/Models/TopicOptions.swift:157— TopicCreateOptions.toResourceOptions has cognitive complexity 26 (threshold 15). Drivers by points: if/else 16 (21 pts), boolean chains 4, loops 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
get-metadata-changes.command.checkQuery (cognitive 26) foreign/node/src/wire/system/get-metadata-changes.command.ts:209— get-metadata-changes.command.checkQuery has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 7, loops 1, match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PartitionReader.rewind (cognitive 26) foreign/node/src/stream/partition-reader.ts:1038— PartitionReader.rewind has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 7, error handling 1 (2 pts), loops 2, ternaries 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PartitionReader.refuse (cognitive 26) foreign/node/src/stream/partition-reader.ts:1721— PartitionReader.refuse has cognitive complexity 26 (threshold 15). Drivers by points: if/else 15 (17 pts), boolean chains 8, ternaries 1 (nesting depth added 2). Of this number, 22 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
CommandResponseStream.readyLink (cognitive 26) foreign/node/src/client/client.socket.ts:1092— CommandResponseStream.readyLink has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 5, loops 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 11). Of this number, 25 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.
BinaryMapper.MapRentedRecords (cognitive 25) foreign/csharp/Iggy_SDK/Mappers/BinaryMapper.cs:313— BinaryMapper.MapRentedRecords 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.
Parser.Parse (cognitive 25) foreign/csharp/Iggy_SDK/Utils/IggyDurationParser.cs:170— Parser.Parse 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.
ChangeLogSnapshot::validate (cognitive 25) core/metadata/src/change_log/snapshot.rs:65— ChangeLogSnapshot::validate has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
server_common::diagnostics::report_io_uring_environment (cognitive 25) core/server_common/src/diagnostics.rs:280— server_common::diagnostics::report_io_uring_environment has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 5, match/switch 3 (4 pts), loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Invariants::check (cognitive 25) core/simulator/src/workload/invariants.rs:128— Invariants::check has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (22 pts), loops 2 (3 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
binaryserialization.decodeRecords (cognitive 25) foreign/go/binary_serialization/binary_response_deserializer.go:306— binaryserialization.decodeRecords has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (19 pts), loops 2 (3 pts), match/switch 1 (3 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
laneTicket.finish (cognitive 25) foreign/go/client/tcp/tcp_pending.go:506— laneTicket.finish has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 5, loops 2 (4 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
iggcon.DeserializeHeaders (cognitive 25) foreign/go/contracts/user_headers.go:154— iggcon.DeserializeHeaders has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (20 pts), boolean chains 4, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PartitionReader.start (cognitive 25) foreign/swift/Sources/Iggy/Consumer/PartitionReader.swift:545— PartitionReader.start has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 3 (6 pts), boolean chains 4 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PartitionReader.fetchAhead (cognitive 25) foreign/swift/Sources/Iggy/Consumer/PartitionReader.swift:1653— PartitionReader.fetchAhead has cognitive complexity 25 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 6 (8 pts), boolean chains 6, match/switch 1 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PartitionReader.failed (cognitive 25) foreign/swift/Sources/Iggy/Consumer/PartitionReader.swift:2344— PartitionReader.failed has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 6 (11 pts), boolean chains 1, match/switch 1, ternaries 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PartitionReader.RewindAsync (cognitive 24) foreign/csharp/Iggy_SDK/Consumers/PartitionReader.cs:978— PartitionReader.RewindAsync 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.
UserHeadersConverter.Read (cognitive 24) foreign/csharp/Iggy_SDK/JsonConverters/UserHeadersConverter.cs:26— UserHeadersConverter.Read 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.
VsrConnection.ExchangeAsync (cognitive 24) foreign/csharp/Iggy_SDK/Vsr/VsrConnection.cs:173— VsrConnection.ExchangeAsync 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.
JwksClient::refresh_keys (cognitive 24) core/server/src/http/jwks.rs:182— JwksClient::refresh_keys has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (18 pts), match/switch 1 (3 pts), loops 2, boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TopicKey::check_rule (cognitive 24) gateways/kafka/src/protocol/handlers/topic_config/keys.rs:424— TopicKey::check_rule has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (13 pts), match/switch 4 (6 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 10). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
PollRouter.failedAttempt (cognitive 24) foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/tcp/PollRouter.java:1080— PollRouter.failedAttempt has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 11, if/else 9 (10 pts), ternaries 1 (3 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
CreateTopic.typedOptions (cognitive 24) foreign/go/internal/command/topic.go:99— CreateTopic.typedOptions has cognitive complexity 24 (threshold 15). Drivers by points: if/else 17 (19 pts), boolean chains 5 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
PartitionReader.Spread (cognitive 23) foreign/csharp/Iggy_SDK/Consumers/PartitionReader.cs:1501— PartitionReader.Spread has cognitive complexity 23 (threshold 15). Of this number, 19 points are the body's own statements and 4 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.
HttpMessageStream.SendDeferredPollAsync (cognitive 23) foreign/csharp/Iggy_SDK/IggyClient/Implementations/HttpMessageStream.cs:460— HttpMessageStream.SendDeferredPollAsync has cognitive complexity 23 (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.
MutationLanes.EnterAsync (cognitive 23) foreign/csharp/Iggy_SDK/Vsr/MutationLanes.cs:144— MutationLanes.EnterAsync 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.
VsrConnection.ReadFirstReplyByteAsync (cognitive 23) foreign/csharp/Iggy_SDK/Vsr/VsrConnection.cs:519— VsrConnection.ReadFirstReplyByteAsync 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.
OffsetDirectoriesIoJob::execute (cognitive 23) core/partitions/src/io.rs:1488— OffsetDirectoriesIoJob::execute has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 3 (4 pts), match/switch 2 (4 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Shard::new (cognitive 23) core/sdk/src/clients/producer_sharding.rs:207— Shard::new has cognitive complexity 23 (threshold 15). Drivers by points: if/else 3 (11 pts), match/switch 2 (5 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PollReadback::assert_served_committed (cognitive 23) core/simulator/src/workload/readback.rs:292— PollReadback::assert_served_committed has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (18 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PollRouter.invalidateRoute (cognitive 23) foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/tcp/PollRouter.java:1131— PollRouter.invalidateRoute has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 4 (15 pts), boolean chains 4, if/else 3 (4 pts) (nesting depth added 12). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
client.ParseConnectionString (cognitive 23) foreign/go/client/connection_string.go:86— client.ParseConnectionString has cognitive complexity 23 (threshold 15). Drivers by points: if/else 17 (22 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
PartitionReader.readLocked (cognitive 23) foreign/go/client/reader/reader.go:1168— PartitionReader.readLocked has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 5, match/switch 3 (4 pts), loops 2 (nesting depth added 5). Most of this is not in the body itself: 7 of the 23 points are its own statements and the rest belongs to one function literal inside it that branches (line 1191). 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.
replicaLinks.startHeartbeat (cognitive 23) REDACTED:526— replicaLinks.startHeartbeat has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 3 (5 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 11). Most of this is not in the body itself: 2 of the 23 points are its own statements and the rest belongs to one function literal inside it that branches (line 536). 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.
client.connection-string.parseConnectionString (cognitive 23) REDACTED:59— client.connection-string.parseConnectionString has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13, ternaries 5 (6 pts), boolean chains 4 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
PartitionReader.refreshAssignment (cognitive 23) foreign/node/src/stream/partition-reader.ts:1137— PartitionReader.refreshAssignment has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 4, error handling 2 (3 pts), loops 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CreatePartitionsWithAssignmentsRequest::apply (cognitive 22) core/metadata/src/stm/stream.rs:3845— CreatePartitionsWithAssignmentsRequest::apply has cognitive complexity 22 (threshold 15). Drivers by points: if/else 16 (20 pts), loops 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
TypedEnvProvider::warn_unknown_env_vars_inner (cognitive 22) core/configs/src/configs_impl/typed_env_provider.rs:266— TypedEnvProvider::warn_unknown_env_vars_inner has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (14 pts), match/switch 3 (5 pts), boolean chains 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
StreamContext::serve (cognitive 22) core/message_bus/src/transports/quic.rs:480— StreamContext::serve has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (19 pts), match/switch 2, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Rewrapper::sweep (cognitive 22) core/server/src/stream_key_rewrapper.rs:103— Rewrapper::sweep has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (12 pts), match/switch 2 (6 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AsyncIggyTcpClient.loginOnLeader (cognitive 22) foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/tcp/AsyncIggyTcpClient.java:1381— AsyncIggyTcpClient.loginOnLeader has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 5 (8 pts), boolean chains 7, if/else 7 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
MessagesHttpClient.pollMessagesDeferred (cognitive 22) foreign/java/java-sdk/src/main/java/org/apache/iggy/client/blocking/http/MessagesHttpClient.java:148— MessagesHttpClient.pollMessagesDeferred has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (11 pts), ternaries 2 (5 pts), boolean chains 3, error handling 1 (2 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PartitionReader.settleOnCloseLocked (cognitive 22) foreign/go/client/reader/reader.go:1608— PartitionReader.settleOnCloseLocked has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (12 pts), boolean chains 5, loops 2 (3 pts), match/switch 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Permissions.MarshalBinary (cognitive 22) foreign/go/contracts/users.go:50— Permissions.MarshalBinary has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 2 (6 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
vsr.StampRequestHeader (cognitive 22) foreign/go/internal/vsr/envelope.go:44— vsr.StampRequestHeader has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 5, loops 1 (2 pts), match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ShardWorker.run (cognitive 22) foreign/swift/Sources/Iggy/Producer/ProducerDispatcher.swift:324— ShardWorker.run has cognitive complexity 22 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 3 (7 pts), boolean chains 5 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
client.socket.partitionRoute (cognitive 22) foreign/node/src/client/client.socket.ts:1693— client.socket.partitionRoute has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 5 (11 pts), if/else 6 (7 pts), boolean chains 4 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PollMessagesCmd::receive_group_messages (cognitive 21) core/cli/src/commands/binary_message/poll_messages.rs:175— PollMessagesCmd::receive_group_messages has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (12 pts), match/switch 4 (7 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IggyMessagesBatch::validate (cognitive 21) core/common/src/types/message/messages_batch.rs:170— IggyMessagesBatch::validate has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (20 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PartitionPersistence::run_inner (cognitive 21) core/partitions/src/persistence.rs:1540— PartitionPersistence::run_inner has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 2, match/switch 1 (2 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PartitionReader.accept (cognitive 21) foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/reader/PartitionReader.java:1209— PartitionReader.accept has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 4, loops 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
reader.NewPartitionReader (cognitive 21) foreign/go/client/reader/reader.go:385— reader.NewPartitionReader has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (15 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
tcp.sendTarget (cognitive 21) foreign/go/client/tcp/tcp_messaging.go:295— tcp.sendTarget has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (15 pts), match/switch 2 (3 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 11). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
IggyClient.routedPartitionRequest (cognitive 21) foreign/swift/Sources/Iggy/Client/IggyClient+Messages.swift:425— IggyClient.routedPartitionRequest has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 9, if/else 6 (8 pts), error handling 2, ternaries 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
consumer-stream.readerStream::read (cognitive 21) foreign/node/src/stream/consumer-stream.ts:138— consumer-stream.readerStream::read has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (16 pts), error handling 1 (2 pts), ternaries 1 (2 pts), loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AdvertisedAddress::from_str (cognitive 20) core/configs/src/server_config/cluster.rs:762— AdvertisedAddress::from_str has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 6, loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
PartitionConfig::validate (cognitive 20) core/configs/src/server_config/partition.rs:301— PartitionConfig::validate has cognitive complexity 20 (threshold 15). Drivers by points: if/else 14, boolean chains 6. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
OffsetIoJob::execute (cognitive 20) core/partitions/src/io.rs:1407— OffsetIoJob::execute has cognitive complexity 20 (threshold 15). Drivers by points: match/switch 4 (11 pts), if/else 5 (8 pts), boolean chains 1 (nesting depth added 10). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
VsrRequestEncoder.encode (cognitive 20) foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/tcp/vsr/VsrRequestEncoder.java:83— VsrRequestEncoder.encode has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (10 pts), ternaries 3 (8 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PartitionReader.assignLocked (cognitive 20) foreign/go/client/reader/reader.go:2273— PartitionReader.assignLocked has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 3, match/switch 1 (3 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IggyTcpClient.waitForRecovery (cognitive 20) foreign/go/client/tcp/tcp_driver.go:821— IggyTcpClient.waitForRecovery has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 4, match/switch 1 (2 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IggyTcpClient.SendMessages (cognitive 20) foreign/go/client/tcp/tcp_messaging.go:43— IggyTcpClient.SendMessages has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 3, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IggyTcpClient.bindLink (cognitive 20) foreign/go/client/tcp/tcp_session_management.go:383— IggyTcpClient.bindLink has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 2, loops 1, match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IggyConsumer.consumeMessages (cognitive 20) foreign/swift/Sources/Iggy/Consumer/IggyConsumer.swift:231— IggyConsumer.consumeMessages has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (11 pts), boolean chains 4, error handling 2 (4 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CommandResponseStream.signIn (cognitive 20) foreign/node/src/client/client.socket.ts:1552— CommandResponseStream.signIn has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (11 pts), ternaries 2 (4 pts), boolean chains 3, error handling 1 (2 pts) (nesting depth added 8). Most of this is not in the body itself: 2 of the 20 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 1557, 1572). 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.
PartitionReader.FetchOnceAsync (cognitive 19) foreign/csharp/Iggy_SDK/Consumers/PartitionReader.cs:1808— PartitionReader.FetchOnceAsync 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.
TcpMessageStream.PollGroupMessagesRentedAsync (cognitive 19) foreign/csharp/Iggy_SDK/IggyClient/Implementations/TcpMessageStream.Vsr.cs:455— TcpMessageStream.PollGroupMessagesRentedAsync 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.
BackgroundMessageProcessor.RunBackgroundProcessor (cognitive 19) foreign/csharp/Iggy_SDK/Publishers/BackgroundMessageProcessor.cs:255— BackgroundMessageProcessor.RunBackgroundProcessor 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.
WriterLease::acquire (cognitive 19) core/partitions/src/persistence.rs:383— WriterLease::acquire has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (15 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ConsumerOffsetsWire::decode (cognitive 19) core/partitions/src/state_transfer.rs:747— ConsumerOffsetsWire::decode has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13 (14 pts), match/switch 3, boolean chains 2 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
PartitionState::apply (cognitive 19) gateways/kafka/src/coordinator/replay.rs:132— PartitionState::apply has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 3, match/switch 2 (3 pts), loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GroupState::tick (cognitive 19) gateways/kafka/src/group/state.rs:564— GroupState::tick has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 3 (5 pts), boolean chains 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AsyncTcpConnection.sendAdmittedFrame (cognitive 19) foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/tcp/AsyncTcpConnection.java:1143— AsyncTcpConnection.sendAdmittedFrame has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (8 pts), error handling 3 (6 pts), boolean chains 3, ternaries 2 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
PollRouter.applyTopology (cognitive 19) foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/tcp/PollRouter.java:648— PollRouter.applyTopology has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 3, loops 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PollRouter.attempt (cognitive 19) foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/tcp/PollRouter.java:1032— PollRouter.attempt has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (12 pts), loops 1 (3 pts), boolean chains 2, error handling 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PartitionReader.acceptLocked (cognitive 19) foreign/go/client/reader/reader.go:1450— PartitionReader.acceptLocked has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 5, loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
tcpLink.exchange (cognitive 19) foreign/go/client/tcp/tcp_link.go:69— tcpLink.exchange has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (10 pts), match/switch 6 (8 pts), boolean chains 1 (nesting depth added 5). Of this number, 17 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
main.types (cognitive 19) foreign/go/errors/generator/main.go:101— main.types has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 3 (7 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
util.CheckAndRedirectToLeader (cognitive 19) foreign/go/internal/util/leader_aware.go:62— util.CheckAndRedirectToLeader has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (12 pts), match/switch 2 (5 pts), boolean chains 1, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MetadataChangesQuery.validate (cognitive 19) foreign/swift/Sources/Iggy/Models/MetadataChanges.swift:474— MetadataChangesQuery.validate has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 5, match/switch 1, ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ProducerCore.initialize (cognitive 19) foreign/swift/Sources/Iggy/Producer/IggyProducer.swift:207— ProducerCore.initialize has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (11 pts), error handling 2 (4 pts), ternaries 2 (4 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CommandResponseStream.routesOf (cognitive 19) foreign/node/src/client/client.socket.ts:824— CommandResponseStream.routesOf has cognitive complexity 19 (threshold 15). Drivers by points: error handling 2 (5 pts), if/else 2 (5 pts), boolean chains 3, loops 2 (3 pts), ternaries 1 (3 pts) (nesting depth added 9). Of this number, 13 points are the body's own statements and 6 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.
MutationLanes.TryReserve (cognitive 18) foreign/csharp/Iggy_SDK/Vsr/MutationLanes.cs:624— MutationLanes.TryReserve 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.
CreateTopicWithAssignmentsRequest::apply (cognitive 18) core/metadata/src/stm/stream.rs:3322— CreateTopicWithAssignmentsRequest::apply has cognitive complexity 18 (threshold 15). Drivers by points: if/else 14 (15 pts), loops 2 (3 pts) (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
IggyCredentials::new (cognitive 18) core/cli/src/credentials.rs:60— IggyCredentials::new has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
QuicConnectionStringOptions::parse_options (cognitive 18) core/common/src/types/configuration/quic_config/quic_connection_string_options.rs:96— QuicConnectionStringOptions::parse_options has cognitive complexity 18 (threshold 15). Drivers by points: match/switch 10 (15 pts), if/else 1 (2 pts), loops 1 (nesting depth added 6). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
iggy_object_store::store::check_key (cognitive 18) core/object_store/src/store.rs:557— iggy_object_store::store::check_key has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 4, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Mirror::apply (cognitive 18) core/simulator/src/workload/change_log_oracle.rs:214— Mirror::apply has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 2 (4 pts), match/switch 1 (nesting depth added 10). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
QuicConfig::new (cognitive 18) foreign/python/src/config.rs:669— QuicConfig::new has cognitive complexity 18 (threshold 15). Drivers by points: if/else 17 (18 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
PartitionReader.assign (cognitive 18) foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/reader/PartitionReader.java:1631— PartitionReader.assign has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 2, loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PartitionReader.handOver (cognitive 18) foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/reader/PartitionReader.java:1671— PartitionReader.handOver has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 3, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PartitionReader.readGroups (cognitive 18) foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/reader/PartitionReader.java:874— PartitionReader.readGroups has cognitive complexity 18 (threshold 15). Drivers by points: loops 4 (6 pts), if/else 2 (5 pts), boolean chains 4, ternaries 1 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AsyncTcpConnection.completeFailedRequest (cognitive 18) foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/tcp/AsyncTcpConnection.java:775— AsyncTcpConnection.completeFailedRequest has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 8, if/else 7 (8 pts), ternaries 1 (2 pts) (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
Slot.attach (cognitive 18) foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/tcp/PollRouter.java:1598— Slot.attach has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 4, ternaries 1 (2 pts) (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
Poll.endPending (cognitive 18) foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/tcp/PollRouter.java:1888— Poll.endPending has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 5 (15 pts), boolean chains 3 (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
binaryserialization.deserializePermissions (cognitive 18) foreign/go/binary_serialization/binary_response_deserializer.go:808— binaryserialization.deserializePermissions has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 2 (6 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
binaryserialization.DeserializeMetadataChanges (cognitive 18) foreign/go/binary_serialization/metadata_changes_deserializer.go:54— binaryserialization.DeserializeMetadataChanges has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (15 pts), loops 2, boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PartitionReader.next (cognitive 18) foreign/go/client/reader/reader.go:476— PartitionReader.next has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (3 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PartitionReader.rewind (cognitive 18) foreign/go/client/reader/reader.go:2103— PartitionReader.rewind has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 10, if/else 2 (3 pts), loops 3, match/switch 1 (2 pts) (nesting depth added 2). 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, 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.
IggyTcpClient.pollGroup (cognitive 18) foreign/go/client/tcp/tcp_group_polling.go:181— IggyTcpClient.pollGroup has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IggyTcpClient.ensureAssignment (cognitive 18) foreign/go/client/tcp/tcp_group_polling.go:253— IggyTcpClient.ensureAssignment has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
command.validatePatch (cognitive 18) foreign/go/internal/command/update_resource.go:133— command.validatePatch has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
client.connection-string.parseConnectionOptions (cognitive 18) REDACTED:156— client.connection-string.parseConnectionOptions has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (11 pts), ternaries 1 (3 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CommandResponseStream.exchange (cognitive 18) foreign/node/src/client/client.socket.ts:869— CommandResponseStream.exchange has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 6, ternaries 1 (2 pts), error handling 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CommandResponseStream.replicaLink (cognitive 18) foreign/node/src/client/client.socket.ts:1069— CommandResponseStream.replicaLink has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (14 pts), error handling 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CommandResponseStream.installRoster (cognitive 18) foreign/node/src/client/client.socket.ts:1127— CommandResponseStream.installRoster has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (8 pts), boolean chains 6, loops 2, ternaries 1 (2 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
metadataChanges.scanRecentMetadataChanges (cognitive 18) web/src/lib/api/metadataChanges.ts:177— metadataChanges.scanRecentMetadataChanges has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 5, ternaries 1 (3 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TcpMessageStream.RecoverSessionAsync (cognitive 17) foreign/csharp/Iggy_SDK/IggyClient/Implementations/TcpMessageStream.ReplicaLinks.cs:519— TcpMessageStream.RecoverSessionAsync 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.
VsrConnection.SendAttemptAsync (cognitive 17) foreign/csharp/Iggy_SDK/Vsr/VsrConnection.cs:119— VsrConnection.SendAttemptAsync 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.
UpdateUserResolvedRequest::apply (cognitive 17) core/metadata/src/stm/user.rs:636— UpdateUserResolvedRequest::apply has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 4, match/switch 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
ConnectionString::new (cognitive 17) core/common/src/types/configuration/auth_config/connection_string.rs:50— ConnectionString::new has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13 (15 pts), boolean chains 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
TopicCreateOptions::to_option_map (cognitive 17) core/common/src/types/options/mod.rs:1631— TopicCreateOptions::to_option_map has cognitive complexity 17 (threshold 15). Drivers by points: if/else 14 (15 pts), boolean chains 1, loops 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
RemoveConsumerGroupMembersRequest::apply (cognitive 17) core/metadata/src/stm/consumer_group.rs:939— RemoveConsumerGroupMembersRequest::apply has cognitive complexity 17 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 2 (7 pts) (nesting depth added 11). 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.
PartitionJournal::repair_headers_in (cognitive 17) core/partitions/src/journal.rs:1005— PartitionJournal::repair_headers_in has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 4 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ConsumerGroupLiveness::receive (cognitive 17) core/server/src/consumer_group/lease.rs:268— ConsumerGroupLiveness::receive has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 3, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Follower::follow (cognitive 17) gateways/kafka/src/bridge/iggy_bridge/change_log.rs:363— Follower::follow has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 4 (9 pts), if/else 3 (7 pts), loops 1 (nesting depth added 9). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Fetch::wait (cognitive 17) gateways/kafka/src/protocol/handlers/fetch.rs:494— Fetch::wait has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 2 (3 pts), match/switch 1 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PartitionReader.scheduleWake (cognitive 17) foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/reader/PartitionReader.java:1889— PartitionReader.scheduleWake has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (6 pts), boolean chains 5, ternaries 3 (5 pts), loops 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PollRouter.lookupConnection (cognitive 17) foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/tcp/PollRouter.java:1339— PollRouter.lookupConnection has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 4, loops 1 (2 pts) (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
tcpLink.readLoop (cognitive 17) foreign/go/client/tcp/tcp_link.go:261— tcpLink.readLoop has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
operationRegistry.enterLane (cognitive 17) foreign/go/client/tcp/tcp_pending.go:198— operationRegistry.enterLane has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 3, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
operationRegistry.resume (cognitive 17) foreign/go/client/tcp/tcp_pending.go:594— operationRegistry.resume has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 2, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MetadataChangesQuery.Validate (cognitive 17) foreign/go/contracts/metadata_changes.go:598— MetadataChangesQuery.Validate has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 5, match/switch 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
vsr.DecodeReplyFor (cognitive 17) foreign/go/internal/vsr/reply.go:37— vsr.DecodeReplyFor has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 9, if/else 7 (8 pts) (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
HumantimeParser.fractionalPart (cognitive 17) foreign/swift/Sources/Iggy/Client/ConnectionString.swift:326— HumantimeParser.fractionalPart has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PollRouter.lookUpInCluster (cognitive 17) foreign/swift/Sources/Iggy/Client/PollRouter.swift:1089— PollRouter.lookUpInCluster has cognitive complexity 17 (threshold 15). Drivers by points: error handling 5 (9 pts), if/else 5 (8 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IggyConnection.onData (cognitive 17) foreign/node/src/client/client.connection.ts:280— IggyConnection.onData has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (11 pts), ternaries 1 (3 pts), boolean chains 1, error handling 1, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
poll.utils.deserializeBatchMessages (cognitive 17) foreign/node/src/wire/message/poll.utils.ts:280— poll.utils.deserializeBatchMessages has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PartitionReader.open (cognitive 17) foreign/node/src/stream/partition-reader.ts:408— PartitionReader.open has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (6 pts), boolean chains 5, error handling 1 (2 pts), loops 2, ternaries 1 (2 pts) (nesting depth added 3). Of this number, 16 points are the body's own statements and 1 belongs to one function item 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.
CommandResponseStream.rememberRoute (cognitive 17) foreign/node/src/client/client.socket.ts:1008— CommandResponseStream.rememberRoute has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 3, loops 2, ternaries 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ConnectionString.ParseOptions (cognitive 16) foreign/csharp/Iggy_SDK/Configuration/ConnectionString.cs:133— ConnectionString.ParseOptions 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.
PartitionReader.Refuse (cognitive 16) foreign/csharp/Iggy_SDK/Consumers/PartitionReader.cs:2265— PartitionReader.Refuse 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.
TopicOptions.ToDictionary (cognitive 16) foreign/csharp/Iggy_SDK/Contracts/TopicOptions.cs:153— TopicOptions.ToDictionary has cognitive complexity 16 (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.
BackgroundMessageProcessor.SendWithRecovery (cognitive 16) foreign/csharp/Iggy_SDK/Publishers/BackgroundMessageProcessor.cs:583— BackgroundMessageProcessor.SendWithRecovery 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.
VsrState::try_from (cognitive 16) core/consensus/src/vsr_state.rs:440— VsrState::try_from has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 1 (3 pts), match/switch 2 (3 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MaterializationIoJob::execute (cognitive 16) core/partitions/src/io.rs:575— MaterializationIoJob::execute has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (13 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
HttpClient::get_deferred_poll (cognitive 16) core/sdk/src/http/http_client.rs:279— HttpClient::get_deferred_poll has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Inner::admit (cognitive 16) core/shard/src/tier_service/mod.rs:319— Inner::admit has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 4 (5 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
iggy_cpp::type_conversion::decode_field (cognitive 16) foreign/cpp/src/type_conversion.rs:1097— iggy_cpp::type_conversion::decode_field has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 14 (16 pts) (nesting depth added 2). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
PartitionReader.refuseLocked (cognitive 16) foreign/go/client/reader/reader.go:1696— PartitionReader.refuseLocked has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (7 pts), loops 4 (6 pts), boolean chains 3 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
tcp.partitionQuery (cognitive 16) foreign/go/client/tcp/tcp_messaging.go:358— tcp.partitionQuery has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 4, match/switch 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
command.admitUpdate (cognitive 16) foreign/go/internal/command/update_resource.go:167— command.admitUpdate has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 5, boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
fakevsr.Listen (cognitive 16) foreign/go/internal/fakevsr/fakevsr.go:198— fakevsr.Listen has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 2 (3 pts), match/switch 1 (3 pts) (nesting depth added 9). None of this is in the body itself: all 16 points belong to one function literal inside it that branches (line 206). 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.
ClientCore.establishSession (cognitive 16) foreign/swift/Sources/Iggy/Client/ClientCore.swift:1040— ClientCore.establishSession has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (7 pts), error handling 3 (5 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ConnectionString.parseOptions (cognitive 16) foreign/swift/Sources/Iggy/Client/ConnectionString.swift:156— ConnectionString.parseOptions has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 3, match/switch 1 (2 pts), loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IggyClient.pollGroup (cognitive 16) foreign/swift/Sources/Iggy/Client/IggyClient+Messages.swift:542— IggyClient.pollGroup has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (12 pts), error handling 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ShardWorker.flush (cognitive 16) foreign/swift/Sources/Iggy/Producer/ProducerDispatcher.swift:379— ShardWorker.flush has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), error handling 2 (4 pts), ternaries 1 (3 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PartitionReader.take (cognitive 16) foreign/node/src/stream/partition-reader.ts:490— PartitionReader.take has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 2 (3 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CommandResponseStream.sendCommand (cognitive 16) foreign/node/src/client/client.socket.ts:241— CommandResponseStream.sendCommand has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 3, ternaries 2 (nesting depth added 2). Of this number, 12 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
CommandResponseStream.primaryLink (cognitive 16) foreign/node/src/client/client.socket.ts:1046— CommandResponseStream.primaryLink has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 2, error handling 1 (2 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CommandResponseStream._rememberCredentials (cognitive 16) foreign/node/src/client/client.socket.ts:1463— CommandResponseStream._rememberCredentials has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 3, loops 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D22 · Internal API Consistency· `IIggyClient.AbandonOperationAsync` has no CancellationToken; its 3 sibling async members take one · ×1
`IIggyClient.AbandonOperationAsync` has no CancellationToken; its 3 sibling async members take one foreign/csharp/Iggy_SDK/IggyClient/IIggyClient.cs:125— 3 of 4 awaitable members of `IIggyClient` take a CancellationToken (3 of 4). Siblings: IIggyClient.SendBinaryRequestAsync (foreign/csharp/Iggy_SDK/IggyClient/IIggyClient.cs:76); IIggyClient.SendBinaryRequestToReplicaAsync (foreign/csharp/Iggy_SDK/IggyClient/IIggyClient.cs:95); IIggyClient.ResolveOperationAsync (foreign/csharp/Iggy_SDK/IggyClient/IIggyClient.cs:113). Add a trailing `CancellationToken cancellationToken = default` and pass it on. [rule A1]
Near-duplicate member pair (78 shared lines) core/message_bus/src/transports/ws.rs:186— core/message_bus/src/transports/ws.rs:186-293 | core/message_bus/src/transports/wss.rs:334-445 — These two members are variants of one another: 78 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 (66 shared lines) core/message_bus/src/installer/replica.rs:398— core/message_bus/src/installer/replica.rs:398-655 | core/message_bus/src/installer/tcp.rs:84-252 — These two members are variants of one another: 66 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 (31 shared lines) gateways/kafka/src/protocol/handlers/alter_configs.rs:63— gateways/kafka/src/protocol/handlers/alter_configs.rs:63-131 | gateways/kafka/src/protocol/handlers/incremental_alter_configs.rs:74-149 — These two members are variants of one another: 31 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication· Members sharing a duplicated core (13 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (13 members, 50+ identical tokens) core/consensus/src/observability.rs:540— core/consensus/src/observability.rs:540-577 | core/consensus/src/observability.rs:579-616 | core/consensus/src/observability.rs:618-655 | core/consensus/src/observability.rs:657-694 | core/consensus/src/observability.rs:696-733 | core/consensus/src/observability.rs:810-829 | core/consensus/src/observability.rs:836-857 | core/consensus/src/observability.rs:860-883 | core/consensus/src/observability.rs:887-914 | core/consensus/src/observability.rs:918-944 | core/consensus/src/observability.rs:948-973 | core/consensus/src/observability.rs:977-1002 | core/consensus/src/observability.rs:1006-1031 — These 13 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 13 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 13 times.
D4 · Code Duplication· Members sharing a duplicated core (10 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (10 members, 50+ identical tokens) core/binary_protocol/src/requests/consumer_groups/create_consumer_group.rs:47— core/binary_protocol/src/requests/consumer_groups/create_consumer_group.rs:47-63 | core/binary_protocol/src/requests/consumer_groups/delete_consumer_group.rs:46-62 | core/binary_protocol/src/requests/consumer_groups/get_consumer_group.rs:46-62 | core/binary_protocol/src/requests/consumer_groups/join_consumer_group.rs:46-62 | core/binary_protocol/src/requests/consumer_groups/leave_consumer_group.rs:46-62 | core/binary_protocol/src/requests/consumer_groups/sync_consumer_group.rs:49-65 | core/binary_protocol/src/requests/consumer_offsets/delete_consumer_offset.rs:72-102 | core/binary_protocol/src/requests/consumer_offsets/get_consumer_offset.rs:65-91 | core/binary_protocol/src/requests/consumer_offsets/store_consumer_offset.rs:75-108 | core/binary_protocol/src/requests/messages/poll_messages.rs:140-178 — These 10 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 10 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 10 times.
D4 · Code Duplication· Edited copy of a member (96 corresponding lines) · ×1
Edited copy of a member (96 corresponding lines) core/shard/src/lib.rs:2340— core/shard/src/lib.rs:2340-2435 | core/shard/src/lib.rs:3294-3402 — These two members are one piece of code written twice and then edited apart: 96 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (90 corresponding lines) · ×1
Edited copy of a member (90 corresponding lines) gateways/kafka/src/protocol/handlers/create_topics.rs:68— gateways/kafka/src/protocol/handlers/create_topics.rs:68-160 | gateways/kafka/src/protocol/handlers/delete_topics.rs:79-168 — These two members are one piece of code written twice and then edited apart: 90 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (76 corresponding lines) · ×1
Edited copy of a member (76 corresponding lines) gateways/kafka/src/protocol/handlers/alter_configs.rs:224— gateways/kafka/src/protocol/handlers/alter_configs.rs:224-306 | gateways/kafka/src/protocol/handlers/incremental_alter_configs.rs:246-321 — These two members are one piece of code written twice and then edited apart: 76 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (59 corresponding lines) · ×1
Edited copy of a member (59 corresponding lines) core/web_ui/src/pages/streams.rs:75— core/web_ui/src/pages/streams.rs:75-135 | core/web_ui/src/pages/topic.rs:25-83 — These two members are one piece of code written twice and then edited apart: 59 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (55 corresponding lines) · ×1
Edited copy of a member (55 corresponding lines) core/cli/src/commands/binary_client/get_client.rs:41— core/cli/src/commands/binary_client/get_client.rs:41-95 | core/cli/src/commands/binary_consumer_groups/get_consumer_group.rs:51-108 — These two members are one piece of code written twice and then edited apart: 55 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (47 corresponding lines) · ×1
Edited copy of a member (47 corresponding lines) core/integration/src/harness/handle/connectors_runtime.rs:175— core/integration/src/harness/handle/connectors_runtime.rs:175-222 | core/integration/src/harness/handle/mcp.rs:157-203 — These two members are one piece of code written twice and then edited apart: 47 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (54 corresponding lines) · ×1
Edited copy of a member (54 corresponding lines) core/common/src/types/message/message_header.rs:55— core/common/src/types/message/message_header.rs:55-108 | core/common/src/types/message/message_header.rs:132-199 — These two members are one piece of code written twice and then edited apart: 54 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (45 corresponding lines) · ×1
Edited copy of a member (45 corresponding lines) foreign/python/src/config.rs:350— foreign/python/src/config.rs:350-394 | foreign/python/src/config.rs:1387-1431 — 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 (44 corresponding lines) · ×1
Edited copy of a member (44 corresponding lines) core/common/src/traits/binary_impls/messages.rs:601— core/common/src/traits/binary_impls/messages.rs:601-644 | core/server/src/http/wire.rs:51-95 — These two members are one piece of code written twice and then edited apart: 44 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (33 corresponding lines) · ×1
Edited copy of a member (33 corresponding lines) core/server_common/src/consensus_message.rs:573— core/server_common/src/consensus_message.rs:573-605 | core/server_common/src/consensus_message.rs:614-656 — 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 copies of one member (3 members, 27+ corresponding lines) · ×1
Edited copies of one member (3 members, 27+ corresponding lines) foreign/csharp/Iggy_SDK/Mappers/BinaryMapper.cs:972— foreign/csharp/Iggy_SDK/Mappers/BinaryMapper.cs:972-999 | foreign/csharp/Iggy_SDK/Mappers/BinaryMapper.cs:1047-1073 | foreign/csharp/Iggy_SDK/Mappers/BinaryMapper.cs:1077-1107 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 27 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 25+ corresponding lines) · ×1
Edited copies of one member (4 members, 25+ corresponding lines) core/server/src/http/handlers.rs:352— core/server/src/http/handlers.rs:352-381 | core/server/src/http/handlers.rs:391-415 | core/server/src/http/handlers.rs:425-454 | core/server/src/http/handlers.rs:534-561 — 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 (4 members, 39+ corresponding lines) · ×1
Edited copies of one member (4 members, 39+ corresponding lines) core/kafka_wire/src/bounds_guard.rs:1137— core/kafka_wire/src/bounds_guard.rs:1137-1175 | core/kafka_wire/src/bounds_guard.rs:1518-1559 | core/kafka_wire/src/bounds_guard.rs:1571-1612 | core/kafka_wire/src/bounds_guard.rs:1624-1667 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 39 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, 26+ corresponding lines) · ×1
Edited copies of one member (3 members, 26+ corresponding lines) foreign/python/src/config.rs:207— foreign/python/src/config.rs:207-232 | foreign/python/src/config.rs:517-542 | foreign/python/src/config.rs:1083-1108 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 26 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 (1 corresponding lines) · ×1
Edited copy of a member (1 corresponding lines) core/metadata/src/stm/stream.rs:4359— core/metadata/src/stm/stream.rs:4359-4359 | core/metadata/src/stm/user.rs:1320-1320 — 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 (6 members, 17+ corresponding lines) · ×1
Edited copies of one member (6 members, 17+ corresponding lines) core/server/src/http/handlers.rs:1083— core/server/src/http/handlers.rs:1083-1099 | core/server/src/http/handlers.rs:1111-1129 | core/server/src/http/handlers.rs:1139-1157 | core/server/src/http/handlers.rs:1173-1191 | core/server/src/http/handlers.rs:1945-1963 | core/server/src/http/handlers.rs:1971-1989 — These 6 members are one piece of code written 6 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 6 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (6 members, 21+ corresponding lines) · ×1
Edited copies of one member (6 members, 21+ corresponding lines) foreign/cpp/src/client.rs:724— foreign/cpp/src/client.rs:724-744 | foreign/cpp/src/client.rs:797-823 | foreign/cpp/src/client.rs:947-969 | foreign/cpp/src/client.rs:1038-1062 | foreign/cpp/src/client.rs:1070-1094 | foreign/cpp/src/client.rs:1393-1417 — These 6 members are one piece of code written 6 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 6 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 21+ corresponding lines) · ×1
Edited copies of one member (4 members, 21+ corresponding lines) foreign/cpp/src/client.rs:859— foreign/cpp/src/client.rs:859-880 | foreign/cpp/src/client.rs:888-909 | foreign/cpp/src/client.rs:918-939 | foreign/cpp/src/client.rs:1639-1659 — These 4 members are one piece of code written 4 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 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 11+ corresponding lines) · ×1
Edited copies of one member (4 members, 11+ corresponding lines) foreign/swift/Sources/Iggy/Protocol/Responses.swift:39— foreign/swift/Sources/Iggy/Protocol/Responses.swift:39-52 | foreign/swift/Sources/Iggy/Protocol/Responses.swift:79-91 | foreign/swift/Sources/Iggy/Protocol/Responses.swift:93-108 | foreign/swift/Sources/Iggy/Protocol/Responses.swift:497-507 — 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 (5 members, 25+ corresponding lines) · ×1
Edited copies of one member (5 members, 25+ corresponding lines) core/message_bus/src/client_listener/tcp.rs:61— core/message_bus/src/client_listener/tcp.rs:61-87 | core/message_bus/src/client_listener/tcp_tls.rs:103-132 | core/message_bus/src/client_listener/ws.rs:74-101 | core/message_bus/src/client_listener/wss.rs:97-126 | core/message_bus/src/replica/listener.rs:145-169 — These 5 members are one piece of code written 5 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 5 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 16+ corresponding lines) · ×1
Edited copies of one member (4 members, 16+ corresponding lines) foreign/cpp/src/client.rs:351— foreign/cpp/src/client.rs:351-372 | foreign/cpp/src/client.rs:379-394 | foreign/cpp/src/client.rs:830-851 | foreign/cpp/src/client.rs:1616-1631 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 19+ corresponding lines) · ×1
Edited copies of one member (3 members, 19+ corresponding lines) gateways/kafka/src/group/state.rs:2117— gateways/kafka/src/group/state.rs:2117-2135 | gateways/kafka/src/group/state.rs:2146-2165 | gateways/kafka/src/group/state.rs:2169-2187 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 19 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 1+ corresponding lines) · ×1
Edited copies of one member (3 members, 1+ corresponding lines) core/sdk/src/quic/quic_client.rs:51— core/sdk/src/quic/quic_client.rs:51-51 | core/sdk/src/tcp/tcp_client.rs:42-42 | core/sdk/src/websocket/websocket_client.rs:40-40 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 1 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 13+ corresponding lines) · ×1
Edited copies of one member (4 members, 13+ corresponding lines) foreign/php/src/client.rs:685— foreign/php/src/client.rs:685-698 | foreign/php/src/client.rs:714-727 | foreign/php/src/client.rs:741-753 | foreign/php/src/client.rs:794-806 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 14+ corresponding lines) · ×1
Edited copies of one member (4 members, 14+ corresponding lines) foreign/csharp/Iggy_SDK/IggyClient/Implementations/HttpMessageStream.cs:104— foreign/csharp/Iggy_SDK/IggyClient/Implementations/HttpMessageStream.cs:104-120 | foreign/csharp/Iggy_SDK/IggyClient/Implementations/HttpMessageStream.cs:174-189 | foreign/csharp/Iggy_SDK/IggyClient/Implementations/HttpMessageStream.cs:798-812 | foreign/csharp/Iggy_SDK/IggyClient/Implementations/HttpMessageStream.cs:1153-1166 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (6 members, 6+ corresponding lines) · ×1
Edited copies of one member (6 members, 6+ corresponding lines) foreign/swift/Sources/Iggy/Models/MetadataChanges.swift:1255— foreign/swift/Sources/Iggy/Models/MetadataChanges.swift:1255-1260 | foreign/swift/Sources/Iggy/Models/MetadataChanges.swift:1265-1271 | foreign/swift/Sources/Iggy/Models/MetadataChanges.swift:1285-1290 | foreign/swift/Sources/Iggy/Models/MetadataChanges.swift:1295-1300 | foreign/swift/Sources/Iggy/Models/MetadataChanges.swift:1305-1310 | foreign/swift/Sources/Iggy/Models/MetadataChanges.swift:1315-1320 — These 6 members are one piece of code written 6 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 6 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (5 members, 15+ corresponding lines) · ×1
Edited copies of one member (5 members, 15+ corresponding lines) foreign/java/java-sdk/src/main/java/org/apache/iggy/serde/MetadataChangesReader.java:247— foreign/java/java-sdk/src/main/java/org/apache/iggy/serde/MetadataChangesReader.java:247-262 | foreign/java/java-sdk/src/main/java/org/apache/iggy/serde/MetadataChangesReader.java:312-326 | foreign/java/java-sdk/src/main/java/org/apache/iggy/serde/MetadataChangesReader.java:335-351 | foreign/java/java-sdk/src/main/java/org/apache/iggy/serde/MetadataChangesReader.java:353-369 | foreign/java/java-sdk/src/main/java/org/apache/iggy/serde/MetadataChangesReader.java:387-401 — These 5 members are one piece of code written 5 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 5 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (5 members, 10+ corresponding lines) · ×1
Edited copies of one member (5 members, 10+ corresponding lines) core/binary_protocol/src/responses/clients/get_clients.rs:47— core/binary_protocol/src/responses/clients/get_clients.rs:47-56 | core/binary_protocol/src/responses/consumer_groups/get_consumer_groups.rs:49-58 | core/binary_protocol/src/responses/personal_access_tokens/get_personal_access_tokens.rs:80-89 | core/binary_protocol/src/responses/streams/get_streams.rs:49-58 | core/binary_protocol/src/responses/users/get_users.rs:47-56 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 20+ corresponding lines) · ×1
Edited copies of one member (3 members, 20+ corresponding lines) gateways/kafka/src/protocol/handlers/list_offsets.rs:729— gateways/kafka/src/protocol/handlers/list_offsets.rs:729-748 | gateways/kafka/src/protocol/handlers/offset_commit.rs:520-540 | gateways/kafka/src/protocol/handlers/offset_delete.rs:353-373 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 20 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (6 members, 13+ corresponding lines) · ×1
Edited copies of one member (6 members, 13+ corresponding lines) foreign/python/src/client.rs:1192— foreign/python/src/client.rs:1192-1204 | foreign/python/src/client.rs:1555-1567 | foreign/python/src/client.rs:1590-1603 | foreign/python/src/client.rs:1660-1673 | foreign/python/src/client.rs:1698-1711 | foreign/python/src/client.rs:1738-1751 — These 6 members are one piece of code written 6 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 6 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) core/sdk/src/http/consumer_groups.rs:78— core/sdk/src/http/consumer_groups.rs:78-94 | core/sdk/src/http/topics.rs:57-74 | core/sdk/src/http/users.rs:70-88 — 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 (7 members, 11+ corresponding lines) · ×1
Edited copies of one member (7 members, 11+ corresponding lines) foreign/swift/Sources/Iggy/Models/MetadataChanges.swift:636— foreign/swift/Sources/Iggy/Models/MetadataChanges.swift:636-647 | foreign/swift/Sources/Iggy/Models/MetadataChanges.swift:677-687 | foreign/swift/Sources/Iggy/Models/MetadataChanges.swift:701-713 | foreign/swift/Sources/Iggy/Models/MetadataChanges.swift:748-761 | foreign/swift/Sources/Iggy/Models/MetadataChanges.swift:776-789 | foreign/swift/Sources/Iggy/Models/MetadataChanges.swift:802-812 | foreign/swift/Sources/Iggy/Models/MetadataChanges.swift:826-838 — These 7 members are one piece of code written 7 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 7 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (7 members, 10+ corresponding lines) · ×1
Edited copies of one member (7 members, 10+ corresponding lines) core/binary_protocol/src/primitives/metadata_changes/body.rs:942— core/binary_protocol/src/primitives/metadata_changes/body.rs:942-951 | core/binary_protocol/src/primitives/metadata_changes/body.rs:990-999 | core/binary_protocol/src/primitives/metadata_changes/body.rs:1017-1027 | core/binary_protocol/src/primitives/metadata_changes/body.rs:1070-1081 | core/binary_protocol/src/primitives/metadata_changes/body.rs:1100-1111 | core/binary_protocol/src/primitives/metadata_changes/body.rs:1128-1137 | core/binary_protocol/src/primitives/metadata_changes/body.rs:1155-1165 — These 7 members are one piece of code written 7 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 7 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (5 members, 11+ corresponding lines) · ×1
Edited copies of one member (5 members, 11+ corresponding lines) foreign/java/java-sdk/src/main/java/org/apache/iggy/client/blocking/http/MetadataChangesJson.java:183— foreign/java/java-sdk/src/main/java/org/apache/iggy/client/blocking/http/MetadataChangesJson.java:183-196 | foreign/java/java-sdk/src/main/java/org/apache/iggy/client/blocking/http/MetadataChangesJson.java:254-264 | foreign/java/java-sdk/src/main/java/org/apache/iggy/client/blocking/http/MetadataChangesJson.java:276-287 | foreign/java/java-sdk/src/main/java/org/apache/iggy/client/blocking/http/MetadataChangesJson.java:289-300 | foreign/java/java-sdk/src/main/java/org/apache/iggy/client/blocking/http/MetadataChangesJson.java:314-324 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 5+ corresponding lines) · ×1
Edited copies of one member (4 members, 5+ corresponding lines) foreign/swift/Sources/Iggy/Models/MetadataChanges.swift:1188— foreign/swift/Sources/Iggy/Models/MetadataChanges.swift:1188-1192 | foreign/swift/Sources/Iggy/Models/MetadataChanges.swift:1197-1201 | foreign/swift/Sources/Iggy/Models/MetadataChanges.swift:1216-1221 | foreign/swift/Sources/Iggy/Models/MetadataChanges.swift:1226-1231 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 5 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (5 members, 13+ corresponding lines) · ×1
Edited copies of one member (5 members, 13+ corresponding lines) foreign/cpp/src/type_conversion.rs:1707— foreign/cpp/src/type_conversion.rs:1707-1719 | foreign/cpp/src/type_conversion.rs:1723-1735 | foreign/cpp/src/type_conversion.rs:1767-1780 | foreign/cpp/src/type_conversion.rs:1836-1848 | foreign/cpp/src/type_conversion.rs:1852-1866 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (8 members, 9+ corresponding lines) · ×1
Edited copies of one member (8 members, 9+ corresponding lines) core/binary_protocol/src/requests/partitions/create_partitions_with_assignments.rs:66— core/binary_protocol/src/requests/partitions/create_partitions_with_assignments.rs:66-74 | core/binary_protocol/src/requests/partitions/install_consumer_group_owner.rs:52-60 | core/binary_protocol/src/requests/partitions/retire_consumer_group_owners.rs:69-77 | core/binary_protocol/src/requests/partitions/transition_partition_history.rs:48-56 | core/binary_protocol/src/requests/system/finalize_session.rs:72-80 | core/binary_protocol/src/requests/topics/create_topic_with_assignments.rs:82-90 | core/binary_protocol/src/responses/messages/partition_route.rs:77-85 | core/metadata/src/stm/lifecycle.rs:216-224 — These 8 members are one piece of code written 8 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 8 times and the copies 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) foreign/java/java-sdk/src/main/java/org/apache/iggy/stream/StreamDetails.java:44— foreign/java/java-sdk/src/main/java/org/apache/iggy/stream/StreamDetails.java:44-47 | foreign/java/java-sdk/src/main/java/org/apache/iggy/topic/TopicDetails.java:45-48 | foreign/java/java-sdk/src/main/java/org/apache/iggy/user/UserInfoDetails.java:37-40 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 10+ corresponding lines) · ×1
Edited copies of one member (4 members, 10+ corresponding lines) foreign/csharp/Iggy_SDK/Headers/HeaderKey.cs:45— foreign/csharp/Iggy_SDK/Headers/HeaderKey.cs:45-54 | foreign/csharp/Iggy_SDK/Headers/HeaderValue.cs:65-74 | foreign/csharp/Iggy_SDK/Identifier.cs:102-111 | foreign/csharp/Iggy_SDK/Kinds/Partitioning.cs:114-123 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
Duplicated block (38–44 lines × 2) foreign/csharp/Iggy_SDK/Consumers/IggyConsumerConfig.cs:47— foreign/csharp/Iggy_SDK/Consumers/IggyConsumerConfig.cs:47-84 | foreign/csharp/Iggy_SDK/Publishers/IggyPublisherConfig.cs:44-87 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `foreign/csharp/Iggy_SDK/Consumers/IggyConsumerConfig.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. 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 (31 lines × 2) foreign/csharp/Iggy_SDK/JsonConverters/UserHeadersConverter.cs:94— foreign/csharp/Iggy_SDK/JsonConverters/UserHeadersConverter.cs:94-124 | foreign/csharp/Iggy_SDK/JsonConverters/UserHeadersConverter.cs:139-169 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `foreign/csharp/Iggy_SDK/JsonConverters/UserHeadersConverter.cs:94` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (13–31 lines × 2) core/message_bus/src/installer/replica.rs:445— core/message_bus/src/installer/replica.rs:445-475 | core/message_bus/src/installer/tcp.rs:98-110 — before extracting anything, compare `core/message_bus/src/installer/replica.rs` and `core/message_bus/src/installer/tcp.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 87 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 (30 lines × 3) foreign/csharp/Iggy_SDK/Consumers/ReceivedMessage.cs:45— foreign/csharp/Iggy_SDK/Consumers/ReceivedMessage.cs:45-74 | foreign/csharp/Iggy_SDK/Consumers/ReceivedMessage.cs:85-114 | foreign/csharp/Iggy_SDK/Consumers/ReceivedRentedMessage.cs:37-67 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (25–27 lines × 2) core/simulator/src/lib.rs:501— core/simulator/src/lib.rs:501-527 | core/simulator/src/lib.rs:1602-1626 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/simulator/src/lib.rs:501` 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 (27 lines × 2) core/simulator/src/workload/ops/create_partitions.rs:58— core/simulator/src/workload/ops/create_partitions.rs:58-84 | core/simulator/src/workload/ops/delete_partitions.rs:72-98 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `core/simulator/src/workload/ops/create_partitions.rs: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 (11–27 lines × 2) foreign/php/src/metadata_changes.rs:1623— foreign/php/src/metadata_changes.rs:1623-1633 | foreign/python/src/metadata_changes.rs:1263-1289 — before extracting anything, compare `foreign/php/src/metadata_changes.rs` and `foreign/python/src/metadata_changes.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 62 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 `foreign/python/src/metadata_changes.rs:1263` 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 (25 lines × 2) core/metadata/src/impls/metadata.rs:3678— core/metadata/src/impls/metadata.rs:3678-3702 | core/metadata/src/impls/metadata.rs:3733-3757 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/metadata/src/impls/metadata.rs:3678` it does not close everything it opens, so those exact lines 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–24 lines × 3) core/message_bus/src/transports/tcp_tls.rs:560— core/message_bus/src/transports/tcp_tls.rs:560-583 | core/message_bus/src/transports/ws.rs:221-240 | core/message_bus/src/transports/wss.rs:369-391 — before extracting anything, compare `core/message_bus/src/transports/tcp_tls.rs` and `core/message_bus/src/transports/wss.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 68 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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 `core/message_bus/src/transports/tcp_tls.rs:560` 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 (21–22 lines × 2) foreign/csharp/Iggy_SDK/IggyClient/Implementations/HttpMessageStream.cs:1221— foreign/csharp/Iggy_SDK/IggyClient/Implementations/HttpMessageStream.cs:1221-1241 | foreign/csharp/Iggy_SDK/IggyClient/Implementations/HttpMessageStream.cs:1304-1325 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `foreign/csharp/Iggy_SDK/IggyClient/Implementations/HttpMessageStream.cs:1221` 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 (22 lines × 2) core/server_common/src/consensus_message.rs:323— core/server_common/src/consensus_message.rs:323-344 | core/server_common/src/consensus_message.rs:362-383 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11–22 lines × 2) foreign/php/src/metadata_changes.rs:1653— foreign/php/src/metadata_changes.rs:1653-1663 | foreign/python/src/metadata_changes.rs:1293-1314 — before extracting anything, compare `foreign/php/src/metadata_changes.rs` and `foreign/python/src/metadata_changes.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 62 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 `foreign/php/src/metadata_changes.rs:1653` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (19–21 lines × 2) core/binary_protocol/src/requests/partitions/create_partitions_with_assignments.rs:77— core/binary_protocol/src/requests/partitions/create_partitions_with_assignments.rs:77-95 | core/binary_protocol/src/requests/topics/create_topic_with_assignments.rs:93-113 — 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. 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–20 lines × 2) core/server/src/boot/handoff.rs:148— core/server/src/boot/handoff.rs:148-167 | core/server/src/boot/handoff.rs:188-204 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/server/src/boot/handoff.rs:148` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (18 lines × 5) core/consensus/src/observability.rs:560— core/consensus/src/observability.rs:560-577 | core/consensus/src/observability.rs:599-616 | core/consensus/src/observability.rs:638-655 | core/consensus/src/observability.rs:677-694 | core/consensus/src/observability.rs:716-733 — 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 `core/consensus/src/observability.rs:560` 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 × 4) core/kafka_wire/src/bounds_guard.rs:505— core/kafka_wire/src/bounds_guard.rs:505-522 | core/kafka_wire/src/bounds_guard.rs:567-584 | core/kafka_wire/src/bounds_guard.rs:662-679 | core/kafka_wire/src/bounds_guard.rs:1273-1290 — 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 `core/kafka_wire/src/bounds_guard.rs:505` it does not close everything it opens, so those 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, `core/kafka_wire/src/bounds_guard.rs:1291` calls `read_i64` and `core/kafka_wire/src/bounds_guard.rs:680` 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 (16–18 lines × 2) core/simulator/src/lib.rs:564— core/simulator/src/lib.rs:564-579 | core/simulator/src/lib.rs:1655-1672 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/simulator/src/lib.rs:564` 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–17 lines × 4) core/binary_protocol/src/requests/consumer_offsets/delete_consumer_offset.rs:73— core/binary_protocol/src/requests/consumer_offsets/delete_consumer_offset.rs:73-88 | core/binary_protocol/src/requests/consumer_offsets/get_consumer_offset.rs:66-81 | core/binary_protocol/src/requests/consumer_offsets/store_consumer_offset.rs:76-91 | core/binary_protocol/src/requests/messages/poll_messages.rs:141-157 — before extracting anything, compare `core/binary_protocol/src/requests/consumer_offsets/delete_consumer_offset.rs` and `core/binary_protocol/src/requests/consumer_offsets/get_consumer_offset.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 32 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, `core/binary_protocol/src/requests/consumer_offsets/delete_consumer_offset.rs:89` calls `read_u8`, `from_code` and `core/binary_protocol/src/requests/consumer_offsets/get_consumer_offset.rs:82` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (15–17 lines × 2) core/message_bus/src/installer/replica.rs:522— core/message_bus/src/installer/replica.rs:522-538 | core/message_bus/src/installer/tcp.rs:148-162 — before extracting anything, compare `core/message_bus/src/installer/replica.rs` and `core/message_bus/src/installer/tcp.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 87 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 `core/message_bus/src/installer/replica.rs:522` 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–16 lines × 4) core/sdk/src/http/consumer_groups.rs:42— core/sdk/src/http/consumer_groups.rs:42-56 | core/sdk/src/http/consumer_offsets.rs:100-115 | core/sdk/src/http/streams.rs:35-48 | core/sdk/src/http/users.rs:39-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 all 4 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `core/sdk/src/http/consumer_groups.rs:42` 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–16 lines × 2) core/server/src/dispatch/session_ops.rs:588— core/server/src/dispatch/session_ops.rs:588-603 | core/server/src/dispatch/session_ops.rs:809-818 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/server/src/dispatch/session_ops.rs:588` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (12–15 lines × 2) core/integration/src/harness/disk.rs:113— core/integration/src/harness/disk.rs:113-124 | core/integration/src/harness/disk.rs:683-697 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/integration/src/harness/disk.rs:113` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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–14 lines × 5) core/kafka_wire/src/bounds_guard.rs:713— core/kafka_wire/src/bounds_guard.rs:713-726 | core/kafka_wire/src/bounds_guard.rs:797-810 | core/kafka_wire/src/bounds_guard.rs:835-848 | core/kafka_wire/src/bounds_guard.rs:1378-1390 | core/kafka_wire/src/bounds_guard.rs:1444-1456 — 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 `core/kafka_wire/src/bounds_guard.rs:713` it does not close everything it opens, so those 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, `core/kafka_wire/src/bounds_guard.rs:813` calls `read_i32` and `core/kafka_wire/src/bounds_guard.rs:1458` 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 × 3) core/binary_protocol/src/responses/streams/get_stream.rs:84— core/binary_protocol/src/responses/streams/get_stream.rs:84-98 | core/binary_protocol/src/responses/streams/stream_response.rs:80-94 | core/binary_protocol/src/responses/users/user_response.rs:74-88 — 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 `core/binary_protocol/src/responses/streams/get_stream.rs:84` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13–14 lines × 3) core/kafka_wire/src/bounds_guard.rs:1058— core/kafka_wire/src/bounds_guard.rs:1058-1071 | core/kafka_wire/src/bounds_guard.rs:1583-1595 | core/kafka_wire/src/bounds_guard.rs:1636-1648 — 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 `core/kafka_wire/src/bounds_guard.rs:1058` it does not close everything it opens, so those 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, `core/kafka_wire/src/bounds_guard.rs:1596` calls `compact_string`, `tagged_fields` and `core/kafka_wire/src/bounds_guard.rs:1072` 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–14 lines × 2) core/common/src/types/permissions/permissions_global.rs:248— core/common/src/types/permissions/permissions_global.rs:248-261 | core/common/src/types/permissions/permissions_global.rs:302-314 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/common/src/types/permissions/permissions_global.rs:248` 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 `GlobalPermissions` in one and `&StreamPermissions` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `core/common/src/types/permissions/permissions_global.rs:301` calls `add_row`, `to_string`, `as_str` and `core/common/src/types/permissions/permissions_global.rs:248` 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 × 13) core/consensus/src/observability.rs:554— core/consensus/src/observability.rs:554-566 | core/consensus/src/observability.rs:593-605 | core/consensus/src/observability.rs:632-644 | core/consensus/src/observability.rs:671-683 | core/consensus/src/observability.rs:710-722 | core/consensus/src/observability.rs:815-827 | core/consensus/src/observability.rs:841-853 | core/consensus/src/observability.rs:866-878 | core/consensus/src/observability.rs:893-905 | core/consensus/src/observability.rs:924-936 | core/consensus/src/observability.rs:954-966 | core/consensus/src/observability.rs:985-997 | core/consensus/src/observability.rs:1012-1024 — all 13 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `core/consensus/src/observability.rs:814` calls `as_str` and `core/consensus/src/observability.rs:553` 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 × 5) core/consensus/src/observability.rs:541— core/consensus/src/observability.rs:541-552 | core/consensus/src/observability.rs:580-591 | core/consensus/src/observability.rs:619-630 | core/consensus/src/observability.rs:658-669 | core/consensus/src/observability.rs:697-708 — 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 `core/consensus/src/observability.rs:541` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11–12 lines × 2) core/server_common/src/iobuf.rs:495— core/server_common/src/iobuf.rs:495-506 | core/server_common/src/iobuf.rs:531-541 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/server_common/src/iobuf.rs:495` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 4) core/integration/src/harness/disk.rs:268— core/integration/src/harness/disk.rs:268-278 | core/integration/src/harness/disk.rs:449-459 | core/integration/src/harness/disk.rs:478-488 | core/integration/src/harness/disk.rs:565-575 — 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 `core/integration/src/harness/disk.rs:268` it does not close everything it opens, so those exact lines 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) core/partitions/src/journal.rs:1450— core/partitions/src/journal.rs:1450-1459 | core/partitions/src/journal.rs:2052-2062 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8–11 lines × 2) gateways/kafka/src/protocol/handlers/alter_configs.rs:187— gateways/kafka/src/protocol/handlers/alter_configs.rs:187-194 | gateways/kafka/src/protocol/handlers/incremental_alter_configs.rs:205-215 — before extracting anything, compare `gateways/kafka/src/protocol/handlers/alter_configs.rs` and `gateways/kafka/src/protocol/handlers/incremental_alter_configs.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 112 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 `gateways/kafka/src/protocol/handlers/alter_configs.rs:187` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. Note first that the copies are not typed on the same thing: the declarations holding them bind `req` to `&AlterConfigsRequest` in one and `&IncrementalAlterConfigsRequest` 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–10 lines × 2) core/bench/report/src/types/server_stats.rs:136— core/bench/report/src/types/server_stats.rs:136-145 | core/common/src/types/stats/mod.rs:149-157 — before extracting anything, compare `core/bench/report/src/types/server_stats.rs` and `core/common/src/types/stats/mod.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 31 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/bench/report/src/types/server_stats.rs:136` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8–10 lines × 2) core/consensus/src/vsr_timeout.rs:291— core/consensus/src/vsr_timeout.rs:291-300 | core/consensus/src/vsr_timeout.rs:317-324 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. 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–9 lines × 3) core/journal/src/partition_journal.rs:1996— core/journal/src/partition_journal.rs:1996-2001 | core/journal/src/partition_journal/segments.rs:1054-1062 | core/journal/src/partition_journal/segments.rs:1074-1079 — 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 `core/journal/src/partition_journal/segments.rs:1054` it does not close everything it opens, so those 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, `core/journal/src/partition_journal.rs:2003` calls `Ok` and `core/journal/src/partition_journal/segments.rs:1062` 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–9 lines × 3) core/server_common/src/send_messages.rs:146— core/server_common/src/send_messages.rs:146-150 | core/server_common/src/send_messages.rs:333-341 | core/server_common/src/send_messages.rs:396-404 — 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 `core/server_common/src/send_messages.rs:333` 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, `core/server_common/src/send_messages.rs:343` calls `freeze` and `core/server_common/src/send_messages.rs:406` 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 × 4) foreign/csharp/Iggy_SDK/Contracts/Tcp/TcpContracts.cs:745— foreign/csharp/Iggy_SDK/Contracts/Tcp/TcpContracts.cs:745-750 | foreign/csharp/Iggy_SDK/Contracts/Tcp/TcpContracts.cs:754-759 | foreign/csharp/Iggy_SDK/Contracts/Tcp/TcpContracts.cs:763-768 | foreign/csharp/Iggy_SDK/Contracts/Tcp/TcpContracts.cs:779-784 — 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. 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 (3–6 lines × 3) core/metadata/src/stm/stream.rs:1907— core/metadata/src/stm/stream.rs:1907-1909 | core/metadata/src/stm/stream.rs:2297-2302 | core/metadata/src/stm/stream.rs:2325-2330 — 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. 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, `core/metadata/src/stm/stream.rs:2297` calls `resolve_topic_id` and `core/metadata/src/stm/stream.rs:1907` 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 (3–6 lines × 4) core/shard/src/lib.rs:5849— core/shard/src/lib.rs:5849-5854 | core/shard/src/lib.rs:5911-5913 | core/shard/src/lib.rs:6019-6021 | core/shard/src/lib.rs:6419-6424 — 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 `core/shard/src/lib.rs:5849` 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. 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 × 9) core/binary_protocol/src/requests/consumer_groups/delete_consumer_group.rs:49— core/binary_protocol/src/requests/consumer_groups/delete_consumer_group.rs:49-53 | core/binary_protocol/src/requests/consumer_groups/get_consumer_group.rs:49-53 | core/binary_protocol/src/requests/consumer_groups/join_consumer_group.rs:49-53 | core/binary_protocol/src/requests/consumer_groups/leave_consumer_group.rs:49-53 | core/binary_protocol/src/requests/consumer_groups/sync_consumer_group.rs:52-56 | core/binary_protocol/src/requests/consumer_offsets/delete_consumer_offset.rs:75-79 | core/binary_protocol/src/requests/consumer_offsets/get_consumer_offset.rs:68-72 | core/binary_protocol/src/requests/consumer_offsets/store_consumer_offset.rs:78-82 | core/binary_protocol/src/requests/messages/poll_messages.rs:143-147 — before extracting anything, compare `core/binary_protocol/src/requests/consumer_groups/delete_consumer_group.rs` and `core/binary_protocol/src/requests/consumer_groups/join_consumer_group.rs` as WHOLE FILES: 82% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 3 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 6) core/binary_protocol/src/requests/consumer_groups/create_consumer_group.rs:48— core/binary_protocol/src/requests/consumer_groups/create_consumer_group.rs:48-52 | core/binary_protocol/src/requests/consumer_groups/delete_consumer_group.rs:47-51 | core/binary_protocol/src/requests/consumer_groups/get_consumer_group.rs:47-51 | core/binary_protocol/src/requests/consumer_groups/join_consumer_group.rs:47-51 | core/binary_protocol/src/requests/consumer_groups/leave_consumer_group.rs:47-51 | core/binary_protocol/src/requests/consumer_groups/sync_consumer_group.rs:50-54 — before extracting anything, compare `core/binary_protocol/src/requests/consumer_groups/delete_consumer_group.rs` and `core/binary_protocol/src/requests/consumer_groups/join_consumer_group.rs` as WHOLE FILES: 82% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 3 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (21 lines × 2) foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/TopicsClient.java:90— foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/TopicsClient.java:90-110 | foreign/java/java-sdk/src/main/java/org/apache/iggy/client/blocking/TopicsClient.java:36-87 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/TopicsClient.java:90` 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 first that the copies are not typed on the same thing: the declarations holding them bind `streamId` to `StreamId` in one and `Long` 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 (43 lines × 3) foreign/java/java-sdk/src/main/java/org/apache/iggy/stream/StreamBase.java:1— foreign/java/java-sdk/src/main/java/org/apache/iggy/stream/StreamBase.java:1-63 | foreign/java/java-sdk/src/main/java/org/apache/iggy/topic/Topic.java:1-84 | foreign/java/java-sdk/src/main/java/org/apache/iggy/user/UserInfo.java:1-43 — 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 `foreign/java/java-sdk/src/main/java/org/apache/iggy/stream/StreamBase.java:1` it does not close everything it opens, so those 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 (29 lines × 3) foreign/go/internal/command/offset.go:43— foreign/go/internal/command/offset.go:43-71 | foreign/go/internal/command/offset.go:89-117 | foreign/go/internal/command/offset.go:133-161 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `foreign/go/internal/command/offset.go:72` calls `PutUint64` and `foreign/go/internal/command/offset.go:118` 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 × 5) foreign/go/internal/command/offset.go:53— foreign/go/internal/command/offset.go:53-60 | foreign/go/internal/command/offset.go:99-106 | foreign/go/internal/command/offset.go:143-150 | foreign/go/internal/command/partition.go:37-44 | foreign/go/internal/command/partition.go:67-74 — there are 5 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 5 sites; resolving a subset leaves the remainder to drift apart. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Near-duplicate member pair (36 shared lines) examples/go/multi-tenant/consumer/main.go:47— examples/go/multi-tenant/consumer/main.go:47-105 | examples/go/multi-tenant/producer/main.go:49-102 — These two members are variants of one another: 36 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 (34 shared lines) core/bench/report/src/types/group_metrics.rs:42— core/bench/report/src/types/group_metrics.rs:42-123 | core/bench/report/src/types/individual_metrics.rs:43-121 — These two members are variants of one another: 34 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication· Edited copy of a member (85 corresponding lines) · ×1
Edited copy of a member (85 corresponding lines) core/bench/src/actors/consumer/benchmark_consumer.rs:333— core/bench/src/actors/consumer/benchmark_consumer.rs:333-417 | core/bench/src/actors/producer/benchmark_producer.rs:322-406 — 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 (77 corresponding lines) · ×1
Edited copy of a member (77 corresponding lines) examples/java/src/main/java/org/apache/iggy/examples/multitenant/consumer/MultiTenantConsumer.java:76— examples/java/src/main/java/org/apache/iggy/examples/multitenant/consumer/MultiTenantConsumer.java:76-152 | examples/java/src/main/java/org/apache/iggy/examples/multitenant/producer/MultiTenantProducer.java:58-152 — 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 (65 corresponding lines) · ×1
Edited copy of a member (65 corresponding lines) foreign/java/bench/src/main/java/org/apache/iggy/bench/report/IndividualMetricsCalculator.java:166— foreign/java/bench/src/main/java/org/apache/iggy/bench/report/IndividualMetricsCalculator.java:166-230 | foreign/java/bench/src/main/java/org/apache/iggy/bench/report/IndividualMetricsCalculator.java:232-296 — These two members are one piece of code written twice and then edited apart: 65 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (106 corresponding lines) · ×1
Edited copy of a member (106 corresponding lines) core/bench/src/actors/consumer/benchmark_consumer.rs:73— core/bench/src/actors/consumer/benchmark_consumer.rs:73-178 | core/bench/src/actors/producer/benchmark_producer.rs:74-183 — These two members are one piece of code written twice and then edited apart: 106 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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, 50+ corresponding lines) · ×1
Edited copies of one member (3 members, 50+ corresponding lines) core/bench/src/actors/consumer/benchmark_consumer.rs:276— core/bench/src/actors/consumer/benchmark_consumer.rs:276-325 | core/bench/src/actors/producer/benchmark_producer.rs:265-314 | core/bench/src/actors/producing_consumer/benchmark_producing_consumer.rs:356-405 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 50 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 (58 corresponding lines) · ×1
Edited copy of a member (58 corresponding lines) foreign/java/external-processors/iggy-connector-flink/iggy-flink-examples/src/main/java/org/apache/iggy/flink/example/MultiStreamJoinJob.java:93— foreign/java/external-processors/iggy-connector-flink/iggy-flink-examples/src/main/java/org/apache/iggy/flink/example/MultiStreamJoinJob.java:93-160 | foreign/java/external-processors/iggy-connector-flink/iggy-flink-examples/src/main/java/org/apache/iggy/flink/example/StreamTransformJob.java:83-140 — 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 (60 corresponding lines) · ×1
Edited copy of a member (60 corresponding lines) examples/go/getting-started/consumer/main.go:72— examples/go/getting-started/consumer/main.go:72-131 | examples/go/message-envelope/consumer/main.go:94-160 — These two members are one piece of code written twice and then edited apart: 60 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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, 43+ corresponding lines) · ×1
Edited copies of one member (3 members, 43+ corresponding lines) examples/csharp/src/GettingStarted/Iggy_SDK.Examples.GettingStarted.Producer/Utils.cs:47— examples/csharp/src/GettingStarted/Iggy_SDK.Examples.GettingStarted.Producer/Utils.cs:47-93 | examples/csharp/src/MessageHeaders/Iggy_SDK.Examples.MessageHeaders.Producer/Utils.cs:49-106 | examples/csharp/src/TcpTls/Iggy_SDK.Examples.TcpTls.Producer/Program.cs:100-142 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 43 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 35+ corresponding lines) · ×1
Edited copies of one member (3 members, 35+ corresponding lines) examples/python/basic/producer.py:81— examples/python/basic/producer.py:81-123 | examples/python/message-envelope/producer.py:128-164 | examples/python/message-headers/common.py:141-175 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 35 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, 34+ corresponding lines) · ×1
Edited copies of one member (3 members, 34+ corresponding lines) examples/csharp/src/MessageEnvelope/Iggy_SDK.Examples.MessageEnvelope.Consumer/Utils.cs:93— examples/csharp/src/MessageEnvelope/Iggy_SDK.Examples.MessageEnvelope.Consumer/Utils.cs:93-126 | examples/csharp/src/MessageHeaders/Iggy_SDK.Examples.MessageHeaders.Consumer/Utils.cs:94-127 | examples/csharp/src/NewSdk/Iggy_SDK.Examples.NewSdk.Consumer/Utils.cs:34-68 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 34 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 6+ corresponding lines) · ×1
Edited copies of one member (3 members, 6+ corresponding lines) foreign/java/external-processors/iggy-connector-flink/iggy-flink-examples/src/main/java/org/apache/iggy/flink/example/model/Alert.java:48— foreign/java/external-processors/iggy-connector-flink/iggy-flink-examples/src/main/java/org/apache/iggy/flink/example/model/Alert.java:48-54 | foreign/java/external-processors/iggy-connector-flink/iggy-flink-examples/src/main/java/org/apache/iggy/flink/example/model/SensorReading.java:46-51 | foreign/java/external-processors/iggy-connector-flink/iggy-flink-examples/src/main/java/org/apache/iggy/flink/example/model/UserActivity.java:46-51 — 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 (73 lines × 3) core/bench/src/actors/consumer/benchmark_consumer.rs:345— core/bench/src/actors/consumer/benchmark_consumer.rs:345-417 | core/bench/src/actors/producer/benchmark_producer.rs:334-406 | core/bench/src/actors/producing_consumer/benchmark_producing_consumer.rs:428-500 — `core/bench/src/actors/consumer/benchmark_consumer.rs` and `core/bench/src/actors/producer/benchmark_producer.rs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 6 separate duplicated blocks between them, totalling at least 212 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `core/bench/src/actors/consumer/benchmark_consumer.rs:345` 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 (52 lines × 3) examples/csharp/src/GettingStarted/Iggy_SDK.Examples.GettingStarted.Consumer/Utils.cs:37— examples/csharp/src/GettingStarted/Iggy_SDK.Examples.GettingStarted.Consumer/Utils.cs:37-88 | examples/csharp/src/MessageEnvelope/Iggy_SDK.Examples.MessageEnvelope.Consumer/Utils.cs:39-90 | examples/csharp/src/MessageHeaders/Iggy_SDK.Examples.MessageHeaders.Consumer/Utils.cs:40-91 — before extracting anything, compare `examples/csharp/src/GettingStarted/Iggy_SDK.Examples.GettingStarted.Consumer/Utils.cs` and `examples/csharp/src/MessageEnvelope/Iggy_SDK.Examples.MessageEnvelope.Consumer/Utils.cs` as WHOLE FILES: 89% 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 (29–31 lines × 2) core/bench/src/actors/consumer/benchmark_consumer.rs:124— core/bench/src/actors/consumer/benchmark_consumer.rs:124-154 | core/bench/src/actors/producer/benchmark_producer.rs:122-150 — `core/bench/src/actors/consumer/benchmark_consumer.rs` and `core/bench/src/actors/producer/benchmark_producer.rs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 6 separate duplicated blocks between them, totalling at least 212 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `core/bench/src/actors/consumer/benchmark_consumer.rs:124` 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 (41 lines × 3) core/bench/src/actors/consumer/benchmark_consumer.rs:285— core/bench/src/actors/consumer/benchmark_consumer.rs:285-325 | core/bench/src/actors/producer/benchmark_producer.rs:274-314 | core/bench/src/actors/producing_consumer/benchmark_producing_consumer.rs:365-405 — `core/bench/src/actors/consumer/benchmark_consumer.rs` and `core/bench/src/actors/producer/benchmark_producer.rs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 6 separate duplicated blocks between them, totalling at least 212 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `core/bench/src/actors/consumer/benchmark_consumer.rs:285` 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 (25 lines × 8) examples/csharp/src/GettingStarted/Iggy_SDK.Examples.GettingStarted.Consumer/Utils.cs:102— examples/csharp/src/GettingStarted/Iggy_SDK.Examples.GettingStarted.Consumer/Utils.cs:102-126 | examples/csharp/src/GettingStarted/Iggy_SDK.Examples.GettingStarted.Producer/Utils.cs:97-121 | examples/csharp/src/MessageEnvelope/Iggy_SDK.Examples.MessageEnvelope.Consumer/Utils.cs:130-154 | examples/csharp/src/MessageEnvelope/Iggy_SDK.Examples.MessageEnvelope.Producer/Utils.cs:105-129 | examples/csharp/src/MessageHeaders/Iggy_SDK.Examples.MessageHeaders.Consumer/Utils.cs:131-155 | examples/csharp/src/MessageHeaders/Iggy_SDK.Examples.MessageHeaders.Producer/Utils.cs:110-134 | examples/csharp/src/NewSdk/Iggy_SDK.Examples.NewSdk.Consumer/Utils.cs:72-96 | examples/csharp/src/NewSdk/Iggy_SDK.Examples.NewSdk.Producer/Utils.cs:85-109 — before extracting anything, compare `examples/csharp/src/GettingStarted/Iggy_SDK.Examples.GettingStarted.Consumer/Utils.cs` and `examples/csharp/src/MessageEnvelope/Iggy_SDK.Examples.MessageEnvelope.Consumer/Utils.cs` as WHOLE FILES: 89% 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 (46 lines × 3) core/bench/src/actors/consumer/benchmark_consumer.rs:223— core/bench/src/actors/consumer/benchmark_consumer.rs:223-268 | core/bench/src/actors/producer/benchmark_producer.rs:212-257 | core/bench/src/actors/producing_consumer/benchmark_producing_consumer.rs:303-348 — `core/bench/src/actors/consumer/benchmark_consumer.rs` and `core/bench/src/actors/producer/benchmark_producer.rs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 6 separate duplicated blocks between them, totalling at least 212 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (8–10 lines × 3) examples/csharp/src/Basic/Iggy_SDK.Examples.Basic.Producer/Program.cs:76— examples/csharp/src/Basic/Iggy_SDK.Examples.Basic.Producer/Program.cs:76-83 | examples/csharp/src/GettingStarted/Iggy_SDK.Examples.GettingStarted.Producer/Utils.cs:73-81 | examples/csharp/src/TcpTls/Iggy_SDK.Examples.TcpTls.Producer/Program.cs:119-128 — 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 `examples/csharp/src/Basic/Iggy_SDK.Examples.Basic.Producer/Program.cs:76` 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 (53 lines × 3) examples/java/src/main/java/org/apache/iggy/examples/gettingstarted/consumer/GettingStartedConsumer.java:63— examples/java/src/main/java/org/apache/iggy/examples/gettingstarted/consumer/GettingStartedConsumer.java:63-115 | examples/java/src/main/java/org/apache/iggy/examples/messageenvelope/consumer/MessageEnvelopeConsumer.java:72-124 | examples/java/src/main/java/org/apache/iggy/examples/tcptls/consumer/TcpTlsConsumer.java:84-136 — before extracting anything, compare `examples/java/src/main/java/org/apache/iggy/examples/gettingstarted/consumer/GettingStartedConsumer.java` and `examples/java/src/main/java/org/apache/iggy/examples/messageenvelope/consumer/MessageEnvelopeConsumer.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 86 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 (34 lines × 2) examples/java/src/main/java/org/apache/iggy/examples/gettingstarted/producer/GettingStartedProducer.java:68— examples/java/src/main/java/org/apache/iggy/examples/gettingstarted/producer/GettingStartedProducer.java:68-101 | examples/java/src/main/java/org/apache/iggy/examples/tcptls/producer/TcpTlsProducer.java:89-122 — before extracting anything, compare `examples/java/src/main/java/org/apache/iggy/examples/gettingstarted/producer/GettingStartedProducer.java` and `examples/java/src/main/java/org/apache/iggy/examples/tcptls/producer/TcpTlsProducer.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 50 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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 (24 lines × 4) examples/java/src/main/java/org/apache/iggy/examples/gettingstarted/consumer/GettingStartedConsumer.java:70— examples/java/src/main/java/org/apache/iggy/examples/gettingstarted/consumer/GettingStartedConsumer.java:70-93 | examples/java/src/main/java/org/apache/iggy/examples/messageenvelope/consumer/MessageEnvelopeConsumer.java:79-102 | examples/java/src/main/java/org/apache/iggy/examples/messageheaders/consumer/MessageHeadersConsumer.java:81-104 | examples/java/src/main/java/org/apache/iggy/examples/tcptls/consumer/TcpTlsConsumer.java:91-114 — before extracting anything, compare `examples/java/src/main/java/org/apache/iggy/examples/gettingstarted/consumer/GettingStartedConsumer.java` and `examples/java/src/main/java/org/apache/iggy/examples/messageenvelope/consumer/MessageEnvelopeConsumer.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 86 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 `examples/java/src/main/java/org/apache/iggy/examples/gettingstarted/consumer/GettingStartedConsumer.java:70` it does not close everything it opens, so those 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, `examples/java/src/main/java/org/apache/iggy/examples/gettingstarted/consumer/GettingStartedConsumer.java:94` calls `sleep` and `examples/java/src/main/java/org/apache/iggy/examples/messageheaders/consumer/MessageHeadersConsumer.java:105` 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 (38 lines × 2) examples/python/basic/consumer.py:69— examples/python/basic/consumer.py:69-106 | examples/python/getting-started/consumer.py:179-216 — 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 (35 lines × 2) examples/python/getting-started/consumer.py:72— examples/python/getting-started/consumer.py:72-106 | examples/python/getting-started/producer.py:69-103 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (15 lines × 4) examples/python/basic/producer.py:63— examples/python/basic/producer.py:63-77 | examples/python/getting-started/producer.py:173-187 | examples/python/message-envelope/producer.py:110-124 | examples/python/message-headers/common.py:123-137 — `examples/python/basic/producer.py` and `examples/python/getting-started/producer.py` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 3 separate duplicated blocks between them, totalling at least 53 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
Duplicated block (12–14 lines × 2) examples/python/message-envelope/producer.py:148— examples/python/message-envelope/producer.py:148-159 | examples/python/message-headers/common.py:157-170 — before extracting anything, compare `examples/python/message-envelope/producer.py` and `examples/python/message-headers/common.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 77 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 `examples/python/message-headers/common.py: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 (43 lines × 2) examples/python/getting-started/consumer.py:112— examples/python/getting-started/consumer.py:112-154 | examples/python/getting-started/producer.py:109-151 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (41 lines × 2) examples/go/getting-started/consumer/main.go:91— examples/go/getting-started/consumer/main.go:91-131 | examples/go/message-envelope/consumer/main.go:120-160 — 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 `examples/go/getting-started/consumer/main.go:91` 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, `examples/go/getting-started/consumer/main.go:89` calls `NewIdentifier` and `examples/go/message-envelope/consumer/main.go:118` 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 (28 lines × 3) examples/go/common/client.go:57— examples/go/common/client.go:57-84 | examples/go/getting-started/consumer/main.go:142-169 | examples/go/getting-started/producer/main.go:136-163 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplication concentrated across 11 sibling directories (19 clone groups) foreign/node/src/wire/client/get-clients.command.ts:23— 19 duplicated blocks under foreign/node/src/wire/ have copies in at least two of the sibling directories client, cluster, consumer-group, message, partition, session (+5 more sibling(s) not listed) — 12 of them are reported below, and 7 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 19 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 19 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 19 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
Duplicated block (65 lines × 2 locations) web/src/lib/components/Modals/AddPartitionsModal.svelte:49— web/src/lib/components/Modals/AddPartitionsModal.svelte:49 · web/src/lib/components/Modals/DeletePartitionsModal.svelte:65 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
Duplicated block (45 lines × 3 locations) web/src/lib/components/Modals/AddTopicModal.svelte:72— web/src/lib/components/Modals/AddTopicModal.svelte:72 · web/src/lib/components/Modals/AddUserModal.svelte:67 · web/src/lib/components/Modals/StreamSettingsModal.svelte:73 — the 3 copies are spread across 3 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (38 lines × 2 locations) web/src/lib/components/Modals/EditUserModal.svelte:50— web/src/lib/components/Modals/EditUserModal.svelte:50 · web/src/lib/components/Modals/StreamSettingsModal.svelte:58 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (37 lines × 2 locations) web/src/lib/components/Modals/AddStreamModal.svelte:74— web/src/lib/components/Modals/AddStreamModal.svelte:74 · web/src/lib/components/Modals/EditUserModal.svelte:65 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (35 lines × 3 locations) web/src/lib/components/Modals/AddTopicModal.svelte:72— web/src/lib/components/Modals/AddTopicModal.svelte:72 · web/src/lib/components/Modals/StreamSettingsModal.svelte:73 · web/src/lib/components/Modals/TopicSettingsModal.svelte:98 — the 3 copies are spread across 3 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (29 lines × 2 locations) web/src/lib/components/RouteComponents/Settings/UsersTab.svelte:46— web/src/lib/components/RouteComponents/Settings/UsersTab.svelte:46 · web/src/routes/dashboard/settings/users/+page.svelte:49 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication· Duplicated block with local edits (27 matched lines × 2 locations) · ×1
Duplicated block with local edits (27 matched lines × 2 locations) web/src/lib/components/SlimSortableList.svelte:24— web/src/lib/components/SlimSortableList.svelte:24 · web/src/lib/components/SortableList.svelte:28 — the two spans are one implementation copied and then locally edited — 213 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Duplicated block (20 lines × 2 locations) foreign/node/src/debug-send.ts:93— foreign/node/src/debug-send.ts:93 · foreign/node/src/debug.ts:91 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (19 lines × 2 locations) foreign/node/src/wire/topic/create-topic.command.ts:221— foreign/node/src/wire/topic/create-topic.command.ts:221 · foreign/node/src/wire/topic/update-topic.command.ts:114 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
Duplicated block (17 lines × 2 locations) foreign/node/src/wire/message/header.utils.ts:330— foreign/node/src/wire/message/header.utils.ts:330 · foreign/node/src/wire/message/header.utils.ts:349 — both copies are in the same file, so extract the 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 (16 lines × 2 locations) foreign/node/src/wire/client/get-clients.command.ts:23— foreign/node/src/wire/client/get-clients.command.ts:23 · foreign/node/src/wire/stream/get-streams.command.ts:27 — the 2 copies are spread across 2 files, and the CITED SPAN is a run of MODULE-LEVEL DECLARATIONS — bindings the module declares and exports — rather than statements with a call site. Do not read this as an extract-a-helper row: a call expression cannot stand where a declaration was, and putting one there would delete the names themselves, which are what the rest of the codebase imports. What actually repeats here is the INITIALISER — the same expression shape written once per binding. So give that expression one name (a small helper the initialisers call, or a shared base value they are each derived from) and keep every binding under the name it already has. Where the run is an enumeration — one binding per distinct thing, differing precisely in the thing each one names — the repetition IS the enumeration and collapsing it would delete entries; consider instead whether the set belongs in one exported table the individual names are read out of. Reported because the copies drift apart the first time only one of them is edited.
R10 · Code Duplication· Duplicated block with local edits (15 matched lines × 2 locations) · ×1
Duplicated block with local edits (15 matched lines × 2 locations) foreign/node/src/duration.utils.ts:175— foreign/node/src/duration.utils.ts:175 · foreign/node/src/duration.utils.ts:258 — the two spans are one implementation copied and then locally edited — 81 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Duplicated block (13 lines × 2 locations) foreign/node/src/debug-send.ts:52— foreign/node/src/debug-send.ts:52 · foreign/node/src/debug.ts:49 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (12 lines × 3 locations) foreign/node/src/wire/topic/create-topic.command.ts:178— foreign/node/src/wire/topic/create-topic.command.ts:178 · foreign/node/src/wire/topic/create-topic.command.ts:225 · foreign/node/src/wire/topic/update-topic.command.ts:109 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
Duplicated block (11 lines × 3 locations) foreign/node/src/wire/stream/get-stream.command.ts:21— foreign/node/src/wire/stream/get-stream.command.ts:21 · foreign/node/src/wire/topic/get-topics.command.ts:21 · foreign/node/src/wire/user/get-user.command.ts:21 — the 3 copies are spread across 3 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
Duplicated block (10 lines × 5 locations) foreign/node/src/wire/number.utils.ts:26— foreign/node/src/wire/number.utils.ts:26 · foreign/node/src/wire/number.utils.ts:50 · foreign/node/src/wire/number.utils.ts:74 · foreign/node/src/wire/number.utils.ts:98 · +1 more site(s) not listed — all 5 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (8 lines × 3 locations) foreign/node/src/wire/stream/stream.utils.ts:70— foreign/node/src/wire/stream/stream.utils.ts:70 · foreign/node/src/wire/topic/topic.utils.ts:171 · foreign/node/src/wire/topic/topic.utils.ts:240 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
Complex function drive (cyclomatic 212, cognitive 338) foreign/node/src/client/client.socket.ts:371— drive has cyclomatic complexity 212 and cognitive complexity 338; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function (anonymous) (cyclomatic 54, cognitive 60) foreign/node/src/stream/partition-reader.test.ts:764— (anonymous) has cyclomatic complexity 54 and cognitive complexity 60; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function answer (cyclomatic 38, cognitive 61) foreign/node/src/stream/partition-reader.test.ts:326— answer has cyclomatic complexity 38 and cognitive complexity 61; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function (anonymous) (cyclomatic 37, cognitive 63) foreign/node/src/client/client.socket.test.ts:3114— (anonymous) has cyclomatic complexity 37 and cognitive complexity 63; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity· Complex function enter (cyclomatic 31, cognitive 50) · ×1
Complex function enter (cyclomatic 31, cognitive 50) foreign/node/src/client/client.operation.ts:273— enter has cyclomatic complexity 31 and cognitive complexity 50; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function (anonymous) (cyclomatic 29, cognitive 34) foreign/node/src/wire/system/update-resource.command.ts:123— (anonymous) has cyclomatic complexity 29 and cognitive complexity 34; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function fetch (cyclomatic 28, cognitive 33) foreign/node/src/stream/partition-reader.test.ts:513— fetch has cyclomatic complexity 28 and cognitive complexity 33; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function (anonymous) (cyclomatic 27, cognitive 25) foreign/node/src/client/client.config.ts:38— (anonymous) has cyclomatic complexity 27 and cognitive complexity 25; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function (anonymous) (cyclomatic 26, cognitive 26) foreign/node/src/wire/system/get-metadata-changes.command.ts:212— (anonymous) has cyclomatic complexity 26 and cognitive complexity 26; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function serialize (cyclomatic 25, cognitive 29) foreign/node/src/wire/topic/create-topic.command.ts:135— serialize has cyclomatic complexity 25 and cognitive complexity 29; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function (anonymous) (cyclomatic 25, cognitive 24) REDACTED:59— (anonymous) has cyclomatic complexity 25 and cognitive complexity 24; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function routeFor (cyclomatic 24, cognitive 41) foreign/node/src/client/client.socket.ts:921— routeFor has cyclomatic complexity 24 and cognitive complexity 41; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function (anonymous) (cyclomatic 23, cognitive 32) foreign/node/src/wire/message/poll-messages.command.ts:220— (anonymous) has cyclomatic complexity 23 and cognitive complexity 32; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function exchange (cyclomatic 23, cognitive 31) foreign/node/src/client/client.connection.ts:187— exchange has cyclomatic complexity 23 and cognitive complexity 31; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function runReplica (cyclomatic 21, cognitive 41) foreign/node/src/client/client.socket.ts:1171— runReplica has cyclomatic complexity 21 and cognitive complexity 41; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function (anonymous) (cyclomatic 19, cognitive 21) REDACTED:158— (anonymous) has cyclomatic complexity 19 and cognitive complexity 21; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function readyLink (cyclomatic 18, cognitive 26) foreign/node/src/client/client.socket.ts:1092— readyLink has cyclomatic complexity 18 and cognitive complexity 26; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function exchange (cyclomatic 18, cognitive 19) foreign/node/src/client/client.socket.ts:869— exchange has cyclomatic complexity 18 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function sendCommand (cyclomatic 18, cognitive 15) foreign/node/src/client/client.socket.ts:241— sendCommand has cyclomatic complexity 18 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function (anonymous) (cyclomatic 17, cognitive 23) foreign/node/src/client/client.socket.test.ts:4590— (anonymous) has cyclomatic complexity 17 and cognitive complexity 23; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function (anonymous) (cyclomatic 17, cognitive 17) foreign/node/src/client/client.socket.test.ts:3642— (anonymous) has cyclomatic complexity 17 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function (anonymous) (cyclomatic 17, cognitive 16) foreign/node/src/client/client.socket.ts:1693— (anonymous) has cyclomatic complexity 17 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function (anonymous) (cyclomatic 16, cognitive 36) foreign/node/src/client/client.socket.ts:1269— (anonymous) has cyclomatic complexity 16 and cognitive complexity 36; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function installRoster (cyclomatic 16, cognitive 17) foreign/node/src/client/client.socket.ts:1127— installRoster has cyclomatic complexity 16 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function (anonymous) (cyclomatic 16, cognitive 15) foreign/node/src/client/client.socket.test.ts:3601— (anonymous) has cyclomatic complexity 16 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function parse (cyclomatic 15, cognitive 29) foreign/node/src/duration.utils.ts:159— parse has cyclomatic complexity 15 and cognitive complexity 29; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function rememberRoute (cyclomatic 15, cognitive 17) foreign/node/src/client/client.socket.ts:1008— rememberRoute has cyclomatic complexity 15 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function scanRecentMetadataChanges (cyclomatic 14, cognitive 19) web/src/lib/api/metadataChanges.ts:177— scanRecentMetadataChanges has cyclomatic complexity 14 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function (anonymous) (cyclomatic 14, cognitive 18) foreign/node/src/client/client.socket.test.ts:6758— (anonymous) has cyclomatic complexity 14 and cognitive complexity 18; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function _rememberCredentials (cyclomatic 14, cognitive 17) foreign/node/src/client/client.socket.ts:1463— _rememberCredentials has cyclomatic complexity 14 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function encode (cyclomatic 14, cognitive 17) foreign/node/src/wire/vsr/index.ts:90— encode has cyclomatic complexity 14 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function onUpdate (cyclomatic 14, cognitive 17) web/src/lib/components/Modals/TopicSettingsModal.svelte:75— onUpdate has cyclomatic complexity 14 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function (anonymous) (cyclomatic 14, cognitive 14) foreign/node/src/client/client.socket.test.ts:1475— (anonymous) has cyclomatic complexity 14 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function onUpdate (cyclomatic 13, cognitive 18) web/src/lib/components/Modals/StreamSettingsModal.svelte:63— onUpdate has cyclomatic complexity 13 and cognitive complexity 18; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function followStream (cyclomatic 12, cognitive 19) foreign/node/src/e2e/metadata-changes.suite.ts:73— followStream has cyclomatic complexity 12 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function onData (cyclomatic 12, cognitive 17) foreign/node/src/client/client.connection.ts:280— onData has cyclomatic complexity 12 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R3 · Large Files· foreign/node/src/client/client.socket.ts · ×1
foreign/node/src/client/client.socket.ts: 1820 lines of code foreign/node/src/client/client.socket.ts:1— foreign/node/src/client/client.socket.ts has 1820 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· foreign/node/src/stream/partition-reader.ts · ×1
foreign/node/src/stream/partition-reader.ts: 1809 lines of code foreign/node/src/stream/partition-reader.ts:1— foreign/node/src/stream/partition-reader.ts has 1809 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· foreign/node/src/wire/system/metadata-changes.utils.ts · ×1
foreign/node/src/wire/system/metadata-changes.utils.ts: 1041 lines of code foreign/node/src/wire/system/metadata-changes.utils.ts:1— foreign/node/src/wire/system/metadata-changes.utils.ts has 1041 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· web/src/routes/dashboard/changes/+page.svelte · ×1
web/src/routes/dashboard/changes/+page.svelte: 537 lines of code web/src/routes/dashboard/changes/+page.svelte:1— web/src/routes/dashboard/changes/+page.svelte has 537 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· foreign/node/src/wire/message/header.utils.ts · ×1
foreign/node/src/wire/message/header.utils.ts: 530 lines of code foreign/node/src/wire/message/header.utils.ts:1— foreign/node/src/wire/message/header.utils.ts has 530 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· foreign/node/src/client/client.operation.ts · ×1
foreign/node/src/client/client.operation.ts: 526 lines of code foreign/node/src/client/client.operation.ts:1— foreign/node/src/client/client.operation.ts has 526 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· foreign/node/src/wire/message/poll-messages.command.ts · ×1
foreign/node/src/wire/message/poll-messages.command.ts: 438 lines of code foreign/node/src/wire/message/poll-messages.command.ts:1— foreign/node/src/wire/message/poll-messages.command.ts has 438 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· web/src/lib/components/PermissionsManager.svelte · ×1
web/src/lib/components/PermissionsManager.svelte: 428 lines of code web/src/lib/components/PermissionsManager.svelte:1— web/src/lib/components/PermissionsManager.svelte has 428 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
Dead file (~145 LoC) web/src/lib/utils/addOnKeyDownListener.ts— no import path from any entry point (40 application, 10 tooling, 91 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~125 LoC) foreign/node/src/debug-send.ts— no import path from any entry point (40 application, 10 tooling, 91 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~120 LoC) foreign/node/src/debug.ts— no import path from any entry point (40 application, 10 tooling, 91 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~85 LoC) web/src/lib/components/RouteComponents/Settings/UsersTab.svelte— no import path from any entry point (40 application, 10 tooling, 91 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (web/src/lib/components/RouteComponents/Settings/UsersTabActions.svelte) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
Dead file (~80 LoC) web/src/lib/api/handleFetchErrors.ts— no import path from any entry point (40 application, 10 tooling, 91 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~54 LoC) web/src/lib/api/fetchApi.ts— no import path from any entry point (40 application, 10 tooling, 91 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~49 LoC) web/src/lib/components/DeleteButtonWithConfirmation.svelte— no import path from any entry point (40 application, 10 tooling, 91 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~46 LoC) web/src/lib/utils/queryParsers.ts— no import path from any entry point (40 application, 10 tooling, 91 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~43 LoC) web/src/lib/components/FixedSvelteComponent.svelte— no import path from any entry point (40 application, 10 tooling, 91 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~32 LoC) web/src/lib/hooks/useGoPrev.ts— no import path from any entry point (40 application, 10 tooling, 91 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~24 LoC) web/src/lib/utils/dataHas.ts— no import path from any entry point (40 application, 10 tooling, 91 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~23 LoC) web/src/lib/components/RouteComponents/Settings/UsersTabActions.svelte— no import path from any entry point (40 application, 10 tooling, 91 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~20 LoC) web/src/lib/queries.ts— no import path from any entry point (40 application, 10 tooling, 91 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~19 LoC) foreign/node/src/wire/cluster/index.ts— no import path from any entry point (40 application, 10 tooling, 91 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Unused dependency 'ccusage' — Declared in the root package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Unused dependency '@swc-node/register' — Declared in foreign/node/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Unused dependency 'd3-interpolate' — Declared in web/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Unused dependency 'svelte-popperjs' — Declared in web/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Unused dependency 'ts-toolbelt' — Declared in web/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Unused dependency 'tslib' — Declared in web/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Duplicated predicate foreign/csharp/Iggy_SDK/IggyClient/Implementations/TcpMessageStream.cs:1297— `!_configuration.ReconnectionSettings.Enabled || _configuration.ReconnectionSettings.MaxRetries > 0 && attempts >= _configuration.Reconnectio…` appears character-identically in 2 files — foreign/csharp/Iggy_SDK/IggyClient/Implementations/TcpMessageStream.ReplicaLinks.cs, foreign/csharp/Iggy_SDK/IggyClient/Implementations/TcpMessageStream.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 foreign/csharp/Iggy_SDK/IggyClient/Implementations/TcpMessageStream.cs:1242— `!token.IsCancellationRequested && !_disposed` appears character-identically in 2 files — foreign/csharp/Iggy_SDK/IggyClient/Implementations/TcpMessageStream.ReplicaLinks.cs, foreign/csharp/Iggy_SDK/IggyClient/Implementations/TcpMessageStream.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 foreign/csharp/Iggy_SDK/Contracts/TopicOptions.cs:229— `LocalRetentionAge is { } localRetentionAge && DurationHelpers.ToDuration(localRetentionAge) is not 0 and var localAgeMicros` appears character-identically in 2 files — foreign/csharp/Iggy_SDK/Contracts/TopicOptions.cs, foreign/csharp/Iggy_SDK/Contracts/TopicUpdate.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 foreign/csharp/Iggy_SDK/Contracts/TopicOptions.cs:168— `MessageExpiry is { } messageExpiry && DurationHelpers.ToDuration(messageExpiry) is not 0 and var micros` appears character-identically in 2 files — foreign/csharp/Iggy_SDK/Contracts/TopicOptions.cs, foreign/csharp/Iggy_SDK/Contracts/TopicUpdate.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 examples/csharp/src/GettingStarted/Iggy_SDK.Examples.GettingStarted.Consumer/Utils.cs:106— `argumentName is null && tcpServerAddr is null` appears character-identically in 8 files — examples/csharp/src/GettingStarted/Iggy_SDK.Examples.GettingStarted.Consumer/Utils.cs, examples/csharp/src/GettingStarted/Iggy_SDK.Examples.GettingStarted.Producer/Utils.cs, examples/csharp/src/MessageEnvelope/Iggy_SDK.Examples.MessageEnvelope.Consumer/Utils.cs, examples/csharp/src/MessageEnvelope/Iggy_SDK.Examples.MessageEnvelope.Producer/Utils.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 foreign/csharp/Iggy_SDK/IggyClient/IIggyConsumer.cs:203— `consumer.Type == ConsumerType.ConsumerGroup && partitionId is null` appears character-identically in 2 files — foreign/csharp/Iggy_SDK/IggyClient/IIggyConsumer.cs, foreign/csharp/Iggy_SDK/IggyClient/Implementations/TcpMessageStream.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 foreign/csharp/Iggy_SDK/Consumers/IggyConsumer.cs:193— `ct.IsCancellationRequested || IsDisposed` appears character-identically in 2 files — foreign/csharp/Iggy_SDK/Consumers/IggyConsumer.Rented.cs, foreign/csharp/Iggy_SDK/Consumers/IggyConsumer.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 foreign/java/java-sdk/src/main/java/org/apache/iggy/client/blocking/http/HttpOptionValue.java:125— `!"true".equals(value) && !"false".equals(value)` appears character-identically in 2 files — foreign/java/java-sdk/src/main/java/org/apache/iggy/client/blocking/http/HttpOptionValue.java, foreign/java/java-sdk/src/main/java/org/apache/iggy/config/TcpConnectionString.java. 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 foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/reader/IggyConsumer.java:218— `error instanceof CompletionException && error.getCause() != null` appears character-identically in 6 files — foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/reader/IggyConsumer.java, foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/tcp/AsyncIggyTcpClient.java, foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/tcp/AsyncTcpConnection.java, foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/tcp/MessagesTcpClient.java. 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 foreign/java/external-processors/iggy-connector-flink/iggy-connector-library/src/main/java/org/apache/iggy/connector/flink/sink/IggySinkBuilder.java:132— `flushInterval == null || flushInterval.isNegative()` appears character-identically in 2 files — foreign/java/external-processors/iggy-connector-flink/iggy-connector-library/src/main/java/org/apache/iggy/connector/flink/sink/IggySinkBuilder.java, foreign/java/external-processors/iggy-connector-flink/iggy-connector-library/src/main/java/org/apache/iggy/connector/flink/sink/IggySinkWriter.java. 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 foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/tcp/FetchMessages.java:315— `refusal != null && refusal.getRawErrorCode() == AsyncTcpConnection.NOT_PRIMARY` appears character-identically in 2 files — foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/tcp/FetchMessages.java, foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/tcp/PollRouter.java. 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 foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/tcp/AsyncIggyTcpClient.java:410— `username.isEmpty() || password.isEmpty()` appears character-identically in 2 files — foreign/java/java-sdk/src/main/java/org/apache/iggy/client/async/tcp/AsyncIggyTcpClient.java, foreign/java/java-sdk/src/main/java/org/apache/iggy/client/blocking/http/IggyHttpClient.java. 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 foreign/node/src/bdd/metadata-changes.ts:173— `Buffer.isBuffer(value) && this.streamKey?.equals(value)` appears character-identically in 2 files — foreign/node/src/bdd/metadata-changes.ts, foreign/node/src/bdd/resource-options.ts. 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 foreign/node/src/wire/session/login.utils.ts:60— `bPassword.length < 1 || bPassword.length > 255` appears character-identically in 2 files — foreign/node/src/wire/session/login.utils.ts, foreign/node/src/wire/user/create-user.command.ts. 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 foreign/node/src/wire/session/login.utils.ts:58— `bUsername.length < 1 || bUsername.length > 255` appears character-identically in 2 files — foreign/node/src/wire/session/login.utils.ts, foreign/node/src/wire/user/create-user.command.ts. 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 foreign/node/src/client/client.socket.ts:634— `error instanceof ResponseError && error.fromServer` appears character-identically in 2 files — foreign/node/src/client/client.socket.ts, foreign/node/src/wire/vsr/reply.ts. 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 foreign/csharp/Iggy_SDK/IggyClient/Implementations/HttpMessageStream.cs:378— `pollingStrategy.Context is { } context && context != default` appears character-identically in 2 files — foreign/csharp/Iggy_SDK/IggyClient/Implementations/HttpMessageStream.cs, foreign/csharp/Iggy_SDK/IggyClient/Implementations/TcpMessageStream.Vsr.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 core/metadata/src/impls/metadata.rs:3297— `!consensus.is_primary() || !consensus.is_normal() || consensus.is_transferring()` appears character-identically in 4 files — core/metadata/src/impls/metadata.rs, core/server/src/partition_reconciler.rs, core/shard/src/lib.rs, core/shard/src/poll.rs. 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 core/message_bus/src/installer/replica.rs:561— `aborted_dispatch_guard.get() || bus_token_dispatch_guard.is_triggered()` appears character-identically in 2 files — core/message_bus/src/installer/replica.rs, core/message_bus/src/installer/tcp.rs. 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 core/message_bus/src/installer/replica.rs:507— `aborted_transport.get() || bus_for_transport.is_shutting_down()` appears character-identically in 2 files — core/message_bus/src/installer/replica.rs, core/message_bus/src/installer/tcp.rs. 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 core/server/src/http/forward.rs:1427— `code == IggyError::TransientNotAccepted.as_code() || code == IggyError::NotPrimary.as_code()` appears character-identically in 2 files — core/server/src/http/forward.rs, core/simulator/src/workload/mod.rs. 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 core/server/src/consumer_group/liveness.rs:408— `consensus.is_normal() && !consensus.is_transferring()` appears character-identically in 2 files — core/server/src/consumer_group/liveness.rs, core/shard/src/lib.rs. 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 core/metadata/src/impls/metadata.rs:3004— `consensus.is_primary() && consensus.is_normal() && !consensus.is_transferring()` appears character-identically in 2 files — core/metadata/src/impls/metadata.rs, core/server/src/dispatch/submit.rs. 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 foreign/cpp/src/reader.rs:381— `deadline >= start + WRITE_TIMEOUT && deadline <= Instant::now() + WRITE_TIMEOUT` appears character-identically in 2 files — foreign/cpp/src/reader.rs, foreign/php/src/reader.rs. 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 gateways/kafka/src/protocol/handlers/alter_configs.rs:198— `deadline_exceeded || Instant::now() >= deadline` appears character-identically in 7 files — gateways/kafka/src/protocol/handlers/alter_configs.rs, gateways/kafka/src/protocol/handlers/create_partitions.rs, gateways/kafka/src/protocol/handlers/create_topics.rs, gateways/kafka/src/protocol/handlers/delete_topics.rs. 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.
Silent fallback default on Err core/common/src/types/message/user_headers.rs:585— `to_string_value` turns every `Err` into `"<malformed int8>".to_string()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
Silent fallback default on Err core/integration/src/harness/handle/server.rs:341— `stdout_plain` turns every `Err` into `String::new()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
Silent fallback default on Err core/metadata/src/stm/stream.rs:3508— `encode_create_topic_reply` turns every `Err` into `Bytes::new()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
Silent fallback default on Err core/sdk/src/driver.rs:1557— `late_uncertain` turns every `Err` into `Some(Vec::new())` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
Silent fallback default on Err core/server/src/dispatch/fetch.rs:1050— `split_fetch` turns every `Err` into `Vec::new()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
Silent fallback default on Err core/simulator/src/workload/oracle.rs:936— `assert_retired_owners_removed` turns every `Err` into `0` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
Silent fallback default on Err foreign/cpp/src/consumer.rs:77— `next` turns every `Err` into `Ok(Vec::new())` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
P10 · Library API & versioning· Public type used only inside its own library · ×4
Public type used only inside its own library foreign/csharp/Iggy_SDK/Contracts/Http/ErrorResponse.cs:24— `Apache.Iggy.Contracts.Http.ErrorResponse` (foreign/csharp/Iggy_SDK/Contracts/Http/ErrorResponse.cs:24) is public, and the library's own code uses it, but no other project in this repository uses it (read: `Benchmarks(net8.0)`, `Iggy_SDK.Tests.Integration(net8.0)`, `Iggy_SDK_Tests(net8.0)`, `Shared(net8.0)`) 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 foreign/csharp/Iggy_SDK/Contracts/Http/ErrorResponse.cs:24— `Apache.Iggy.Contracts.Http.ErrorResponse` (foreign/csharp/Iggy_SDK/Contracts/Http/ErrorResponse.cs:24) is public, and the library's own code uses it, but no other project in this repository uses it (read: `Benchmarks(net10.0)`, `Iggy_SDK.Examples.Basic.Consumer`, `Iggy_SDK.Examples.Basic.Producer`, `Iggy_SDK.Examples.GettingStarted.Consumer`, `Iggy_SDK.Examples.GettingStarted.Producer`, `Iggy_SDK.Examples.MessageEnvelope.Consumer`, `Iggy_SDK.Examples.MessageEnvelope.Producer`, `Iggy_SDK.Examples.MessageHeaders.Consumer`, `Iggy_SDK.Examples.MessageHeaders.Producer`, `Iggy_SDK.Examples.NewSdk.Consumer`, `Iggy_SDK.Examples.NewSdk.Producer`, `Iggy_SDK.Examples.Shared`, `Iggy_SDK.Examples.TcpTls.Consumer`, `Iggy_SDK.Examples.TcpTls.Producer`, `Iggy_SDK.Tests.BDD`, `Iggy_SDK.Tests.Integration(net10.0)`, `Iggy_SDK_Tests(net10.0)`, `Shared(net10.0)`) 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 foreign/csharp/Iggy_SDK/Errors/ErrorModel.cs:23— `Apache.Iggy.Errors.ErrorModel` (foreign/csharp/Iggy_SDK/Errors/ErrorModel.cs:23) is public, and the library's own code uses it, but no other project in this repository uses it (read: `Benchmarks(net8.0)`, `Iggy_SDK.Tests.Integration(net8.0)`, `Iggy_SDK_Tests(net8.0)`, `Shared(net8.0)`) 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 foreign/csharp/Iggy_SDK/Errors/ErrorModel.cs:23— `Apache.Iggy.Errors.ErrorModel` (foreign/csharp/Iggy_SDK/Errors/ErrorModel.cs:23) is public, and the library's own code uses it, but no other project in this repository uses it (read: `Benchmarks(net10.0)`, `Iggy_SDK.Examples.Basic.Consumer`, `Iggy_SDK.Examples.Basic.Producer`, `Iggy_SDK.Examples.GettingStarted.Consumer`, `Iggy_SDK.Examples.GettingStarted.Producer`, `Iggy_SDK.Examples.MessageEnvelope.Consumer`, `Iggy_SDK.Examples.MessageEnvelope.Producer`, `Iggy_SDK.Examples.MessageHeaders.Consumer`, `Iggy_SDK.Examples.MessageHeaders.Producer`, `Iggy_SDK.Examples.NewSdk.Consumer`, `Iggy_SDK.Examples.NewSdk.Producer`, `Iggy_SDK.Examples.Shared`, `Iggy_SDK.Examples.TcpTls.Consumer`, `Iggy_SDK.Examples.TcpTls.Producer`, `Iggy_SDK.Tests.BDD`, `Iggy_SDK.Tests.Integration(net10.0)`, `Iggy_SDK_Tests(net10.0)`, `Shared(net10.0)`) 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.
redundant comment foreign/node/src/tcp.e2e.ts:56— "GET_STREAM #ID" repeats the code it sits on: 3 of its 3 words (get, stream, id) are already in `const r7 = await getStream(s)({ streamId: stream.streamId });`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment foreign/node/src/tcp.e2e.ts:60— "GET_STREAM #NAME" repeats the code it sits on: 3 of its 3 words (get, stream, name) are already in `const r8 = await getStream(s)({ streamId: stream.name });`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment foreign/node/src/wire/client/get-client.command.ts:27— "GET CLIENT by id" repeats the code it sits on: 3 of its 3 words (get, client, id) are already in `export const GET_CLIENT = {`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
Silent fallback default in catch foreign/csharp/Iggy_SDK/Contracts/MetadataCurrentPageToken.cs:181— `IsUtf8` swallows `DecoderFallbackException` 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 foreign/csharp/Iggy_SDK/IggyClient/Implementations/TcpMessageStream.PollRouting.cs:139— `RetainsOperation` swallows `VsrOperationNotRetainedException` into `return false;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 7 significant file(s) lose their only recent owner: foreign/csharp/Iggy_SDK/Utils/IggyDurationParser.cs, foreign/csharp/Iggy_SDK/Publishers/IggyPublisherOfT.cs, foreign/csharp/Iggy_SDK/Kinds/Partitioning.cs, foreign/csharp/Iggy_SDK/Consumers/IggyConsumerBuilderOfT.cs, foreign/csharp/Iggy_SDK/Publishers/IggyPublisherBuilderOfT.cs, foreign/csharp/Iggy_SDK/Identifier.cs, foreign/csharp/Iggy_SDK/Configuration/AutoLoginSettings.cs. Pair on, review, or document these before any departure.
D26 · Project Cohesion· Projects may be oversized for their cohesion · ×1
Projects may be oversized for their cohesion foreign/csharp/Iggy_SDK/Iggy_SDK.csproj:1— `Iggy_SDK(net8.0)` overshoots its size bounds (32600 LoC, 193 public types across 20 namespaces). 1 of 19 project(s) overshoot their size bounds, lowering Project Cohesion to 8.9/10. Review these for cohesion — draw the boundary inside the assembly first (group each responsibility into its own namespace/folder and keep the cross-boundary members internal), since splitting a published assembly moves types between packages and breaks consumers.
D28 · Secrets (history)· Rotate the exposed credentials · ×1
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.
P10 · Library API & versioning· Implementation type on the public API · ×1
Implementation type on the public API foreign/csharp/Iggy_SDK/IggyClient/Implementations/HttpMessageStream.cs:51— 4 public types in `Apache.Iggy.IggyClient.Implementations` are marked as implementation by their own namespace, folder or name: `HttpMessageStream` (foreign/csharp/Iggy_SDK/IggyClient/Implementations/HttpMessageStream.cs:51, `Implementations`), `HttpMessageStream` (foreign/csharp/Iggy_SDK/IggyClient/Implementations/HttpMessageStream.cs:51, `Implementations`), `TcpMessageStream` (foreign/csharp/Iggy_SDK/IggyClient/Implementations/TcpMessageStream.cs:47, `Implementations`), `TcpMessageStream` (foreign/csharp/Iggy_SDK/IggyClient/Implementations/TcpMessageStream.cs:47, `Implementations`). While they are public, every consumer of the library can bind to them, so changing them is a breaking change for those consumers.
P12 · CI test-gate honesty· Sleep-based test synchronization · ×1
Sleep-based test synchronization — 64 Task.Delay/Thread.Sleep call(s) in test code synchronize with background work by sleeping — a known flakiness precursor on slow runners. Prefer polling with a deadline or completion signals.
P3 · Security & performance tooling· Dependabot does not watch composer/bundler · ×1
Dependabot does not watch composer/bundler .github/dependabot.yml:23— `.github/dependabot.yml` schedules updates, but no `package-ecosystem` entry covers `composer`, `bundler`, which this tree depends on — so those dependencies get no update pull requests and no advisory pressure, however complete the dep-scan credit looks. Add the missing entries to the `updates:` list.
No changelog — No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)
Unused export 'getClient' foreign/node/src/client/client.ts:72— Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code· Unused export 'formatPolledMessages' · ×1
Unused export 'formatPolledMessages' foreign/node/src/tcp.sm.utils.ts:80— Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code· Unused export 'mapTransportProtocol' · ×1
Unused export 'mapTransportProtocol' foreign/node/src/wire/cluster/cluster.type.ts:84— Nothing ultimately consumes this binding: its only referrer is the re-export in foreign/node/src/wire/cluster/index.ts, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in foreign/node/src/wire/cluster/index.ts in the same commit, or the barrel will import a name that no longer exists.
R7 · Dead Code· Unused export 'deserialiseMessageId' · ×1
Unused export 'deserialiseMessageId' foreign/node/src/wire/message/iggy-header.utils.ts:198— Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code· Unused export 'PartitionKindId' · ×1
Unused export 'PartitionKindId' foreign/node/src/wire/message/partitioning.utils.ts:37— Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code· Unused export 'PartitionKindValue' · ×1
Unused export 'PartitionKindValue' foreign/node/src/wire/message/partitioning.utils.ts:39— Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code· Unused export 'groupAssignment' · ×1
Unused export 'groupAssignment' foreign/node/src/wire/message/poll-messages.command.ts:319— Nothing ultimately consumes this binding: its only referrer is the re-export in foreign/node/src/wire/message/index.ts, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in foreign/node/src/wire/message/index.ts in the same commit, or the barrel will import a name that no longer exists.
R7 · Dead Code· Unused export 'PollingStrategyKindId' · ×1
Unused export 'PollingStrategyKindId' foreign/node/src/wire/message/poll.utils.ts:53— Nothing ultimately consumes this binding: its only referrer is the re-export in foreign/node/src/wire/message/index.ts, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in foreign/node/src/wire/message/index.ts in the same commit, or the barrel will import a name that no longer exists.
R7 · Dead Code· Unused export 'mapMessageState' · ×1
Unused export 'mapMessageState' foreign/node/src/wire/message/poll.utils.ts:211— Nothing ultimately consumes this binding: its only referrer is the re-export in foreign/node/src/wire/message/index.ts, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in foreign/node/src/wire/message/index.ts in the same commit, or the barrel will import a name that no longer exists.
R7 · Dead Code· Unused export 'deserializePollMessagesTransform' · ×1
Unused export 'deserializePollMessagesTransform' foreign/node/src/wire/message/poll.utils.ts:402— Nothing ultimately consumes this binding: its only referrer is the re-export in foreign/node/src/wire/message/index.ts, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in foreign/node/src/wire/message/index.ts in the same commit, or the barrel will import a name that no longer exists.
R7 · Dead Code· Unused export 'ConsumerKindId' · ×1
Unused export 'ConsumerKindId' foreign/node/src/wire/offset/offset.utils.ts:38— Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code· Unused export 'serializeUUID' · ×1
Unused export 'serializeUUID' foreign/node/src/wire/serialize.utils.ts:33— Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code· Unused export 'deserializeUUID' · ×1
Unused export 'deserializeUUID' foreign/node/src/wire/serialize.utils.ts:42— Nothing imports this binding — it is safe to review for removal.
Unused export 'Snapshot' foreign/node/src/wire/system/snapshot.command.ts:55— Nothing ultimately consumes this binding: its only referrer is the re-export in foreign/node/src/wire/system/index.ts, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in foreign/node/src/wire/system/index.ts in the same commit, or the barrel will import a name that no longer exists.
R7 · Dead Code· Unused export 'CompressionAlgorithmKindId' · ×1
Unused export 'CompressionAlgorithmKindId' foreign/node/src/wire/topic/topic.utils.ts:131— Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code· Unused export 'CompressionAlgorithmKindValue' · ×1
Unused export 'CompressionAlgorithmKindValue' foreign/node/src/wire/topic/topic.utils.ts:133— Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code· Unused export 'clientApiSafe' · ×1
Unused export 'clientApiSafe' web/src/lib/api/clientApi.ts:89— Nothing imports this binding — it is safe to review for removal.
Null-forgiving operator (`!`) suppressions override nullable warnings — ~0.5 `!` suppressions per 1k syntax nodes — 64 suppression(s) across the 128619 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.
Silent fallback default on parse failure foreign/csharp/Iggy_SDK/Utils/ServerAddress.cs:59— `AddressFamilyOf` falls back to `AddressFamily.InterNetwork` when `IPAddress.TryParse(host, out var ip)` 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 error foreign/go/client/tcp/tcp_user_management.go:209— `encodedUser` turns a non-nil `err` into `return ""` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or return it. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the `if` or in the doc comment, and the row stops firing.
doc comments repeat the names foreign/csharp/Iggy_SDK/Configuration/IggyClientConfigurator.cs:97— 5 of 450 documented parameters and 99 of 1660 summaries in `Iggy_SDK(net8.0)` only repeat the member or parameter name (e.g. "TLS settings" for `TlsSettings`). 2 documentation tag(s) are empty. This build requires documentation, so say what the name does not: units, ranges, null handling, side effects.
doc comments repeat the names foreign/node/src/wire/message/header.type.ts:83— 0 of 151 documented parameters and 18 of 1344 summaries in `apache-iggy` only repeat the member or parameter name (e.g. "String header value" for `HeaderValueString`). Delete the restating tags, or add what the name does not say.
Off the main sequence: iggy_common — iggy_common: abstractness 0.11, instability 0.05, distance 0.84 — the shape a shared-kernel / building-block library has BY DESIGN — concrete and widely depended-on is what makes it useful, and this dimension does not penalise it (the distance is reported for completeness, not as a defect). Worth a look only if it has grown past one coherent kernel into an everything-bucket.
Appendix B — Reproduction & audit trail
Every external tool invocation behind a deep-scan dimension — the tool, its captured version, the exact command, how many findings it yielded, and a link to the retained raw output. To reproduce any finding: check out the same commit and run the command shown (repo-relative — never an absolute scratch path). The complete raw scanner output is retained verbatim under artifacts/raw/ (indexed in artifacts/raw/index.json); per-invocation exit codes and wall-clock durations are in sidecar.json — kept out of this table so the rendered report stays byte-identical across runs of the same commit.
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 28 file(s) — `foreign/csharp/Iggy_SDK/Consumers/PartitionReader.cs`, `foreign/csharp/Iggy_SDK/Consumers/ReadException.cs`, `foreign/csharp/Iggy_SDK/Contracts/FetchedMessages.cs`, `foreign/csharp/Iggy_SDK/Exceptions/VsrFetchProgressUncertainException.cs`, `foreign/csharp/Iggy_SDK/Exceptions/VsrOperationNotRetainedException.cs`, … (+23 more) — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.
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 01a1db9d-ba2f-754e-9a76-88249b524967 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 311 · Warnings: 2368 · Recommendations: 108 · Info: 57 — Appendix A · all findings · full markdown report.
Generated by the Canine Code Analyzer: deterministic code-health analysis. 14-11-2026 @ 19:51 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.