Public report of MystenLabs/sui, published 27 October 2026. It has the same score, grades and number of findings as the full report. The details of security findings (where they are in the code, which known vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive report Measured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.10.5). 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, 27 October 2026, 11:50 UTC · Survey ID cd_7413e201515f46d5899a06b2cdc888bb

MystenLabs/sui

Measured 27 October 2026, 11:40 UTC, at code version 30e8865

Regression: 2 dimensions fell since the last survey Code coverage: not measured

A regression is a drop of 0.5 points or more in the score, or of 2.5 or more out of 10 in a dimension, since the last survey.

Code coverage is not measured: JavaScript/TypeScript suite (CouldNotMeasureNoCollector).

CAI score 55out of 100 Adequate
CriticalWeakAdequateStrongExemplary
Up 4 since the last survey

The score is built from these lenses. Each lens grades one area of the code, such as how easy it is to change or how well it is protected. The weakest lens counts most, so one weak area pulls the score down instead of being averaged away.

A very large codebase: 666,260 lines of product code in 193 projects, tests not counted · Estimated rebuild effort: about 5.6 person-years · Weakest lens: Production Readiness, 52

Findings by how serious they are

228 critical 4043 serious 289 minor

10 dimensions are left out of the score. For each one, Watchdog either couldn't measure it in this code, or found no evidence of the safeguard it looks 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

Watchdog
Producer
Canine Development
Analyzer
Watchdog engine 1.0.0
Measured
27 October 2026, 11:40 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 Watchdog. It is open to any tool that implements it, and today Watchdog is the only one that does.

The score is deterministic, which means the same code always gets the same score. Watchdog works 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 ▸

78of 78 dimensions measured by tools.
4352of 4560 findings point to an exact file and line, so you can open each one in the code. The other 208 concern the repository as a whole, such as missing documentation.
78dimensions across 8 lenses, read from 666,260 lines of product code in 193 projects.
Chapters

Executive summary

MystenLabs/sui falls short of our standard for production, held back most by its Production Readiness lens, the way the code is tested, built, released and run. It scores 55 out of 100 and is rated Adequate, and 183 of its 228 critical findings are security problems.

Production Readiness, at 52, is the weakest lens by a small margin, and the weakest lens counts most in the score. The best first step for the work it takes is fixing the nine sets of files in separate parts that keep changing together, worth about 0.7 points. Documenting the recovery plan would lift Production Readiness itself, worth about 2 points.

Fifty-eight known security holes in the packages the code depends on can be used by attackers. Forty-six settings leave the servers or containers unsafe, and twenty-nine passwords or keys are open to anyone who can read the repository. Updating the vulnerable packages, correcting the unsafe settings and replacing each exposed password or key would close these risks. Pinning each tool to an exact version would fix the 27 pipeline tools referenced by a changeable name, and limiting each secret to its own step would deal with the seven secrets exposed to more of the pipeline than needed. The 22 inner parts of the code that depend on an outer part need turning around so they point inward.

The product code is 666,260 lines, about €820,000 to rebuild.

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

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

The weakest lenses score close to each other, so improving any of them moves the score.

Code composition: what the lines of code are
Product code 82%Tests 18%
New since the last survey: 183 findings

These 183 critical or serious findings weren't in the previous survey, on 13 October 2026. The first 100 are listed here, and the findings file in the download package lists them all.

  • Cyclomatic Complexity · ConsensusTransactionPool::take (cyclomatic 20) crates/sui-core/src/consensus_transaction_pool.rs
  • Cyclomatic Complexity · PartyState::handle_result (cyclomatic 17) crates/sui-benchmark/src/workloads/composite/mod.rs
  • Cyclomatic Complexity · ConsensusHandler::deduplicate_consensus_txns (cyclomatic 17) crates/sui-core/src/consensus_handler.rs
  • Cognitive Complexity · ConsensusHandler::deduplicate_consensus_txns (cognitive 29) crates/sui-core/src/consensus_handler.rs
  • Cognitive Complexity · sui_kv_rpc::pipeline::pipelined_reads (cognitive 23) crates/sui-kv-rpc/src/pipeline.rs
  • Cognitive Complexity · sui_adapter_latest::accumulator_settlement::settlement_groups (cognitive 22) sui-execution/latest/sui-adapter/src/accumulator_settlement.rs
  • Cognitive Complexity · TakenTransactionsGuard::drop (cognitive 21) crates/sui-core/src/consensus_transaction_pool.rs
  • Cognitive Complexity · sui_kv_rpc::resolve::regroup_checkpoints (cognitive 20) crates/sui-kv-rpc/src/resolve.rs
  • Cognitive Complexity · CompositePayload::handle_batch_results (cognitive 18) crates/sui-benchmark/src/workloads/composite/mod.rs
  • Cognitive Complexity · PartyState::handle_result (cognitive 18) crates/sui-benchmark/src/workloads/composite/mod.rs
  • Cognitive Complexity · RpcService::annotate_effects (cognitive 18) crates/sui-rpc-api/src/grpc/v2/render.rs
  • Cognitive Complexity · CompositePayload::next_party_step (cognitive 17) crates/sui-benchmark/src/workloads/composite/mod.rs
  • Cognitive Complexity · sui_move_natives_latest::crypto::groth16::verify_groth16_proof_internal (cognitive 17) sui-execution/latest/sui-move-natives/src/crypto/groth16.rs
  • Cognitive Complexity · sui_kv_rpc::pipeline::plan_keyed_reads (cognitive 16) crates/sui-kv-rpc/src/pipeline.rs
  • God Classes · MethodTooLong: AdmissionQueueMetrics.new crates/sui-core/src/admission_queue.rs
  • God Classes · FunctionTooLong: sui_keys::key_derive::validate_path crates/sui-keys/src/key_derive.rs
  • God Classes · FileTooLong: ledger_history/query_options.rs crates/sui-rpc-api/src/ledger_history/query_options.rs
  • God Classes · ClassTooLong: FeatureFlags crates/sui-protocol-config/src/lib.rs
  • God Classes · FunctionTooLong: sui_rosetta::construction::metadata crates/sui-rosetta/src/construction.rs
  • Code Duplication · Near-duplicate member family (10 members, 29 shared lines) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_k1.rs
  • Code Duplication · Near-duplicate member family (10 members, 23 shared lines) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_k1.rs
  • Code Duplication · Near-duplicate member family (9 members, 26 shared lines) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_k1.rs
  • Code Duplication · Near-duplicate member family (5 members, 51 shared lines) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/groth16.rs
  • Code Duplication · Near-duplicate member family (5 members, 34 shared lines) sui-execution/historical-versions/v0/sui-move-natives/src/dynamic_field.rs
  • Code Duplication · Near-duplicate member family (5 members, 31 shared lines) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/bls12381.rs
  • Code Duplication · Near-duplicate member family (5 members, 31 shared lines) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/bls12381.rs
  • Code Duplication · Near-duplicate member family (3 members, 41 shared lines) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ed25519.rs
  • Code Duplication · Edited copy of a member (40 corresponding lines) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/context.rs
  • Code Duplication · Edited copy of a member (39 corresponding lines) crates/simulacrum/src/lib.rs
  • Code Duplication · Members sharing a duplicated core (11 members, 50+ identical tokens) crates/sui-config/src/node.rs
  • Code Duplication · Members sharing a duplicated core (7 members, 50+ identical tokens) sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) crates/sui-rosetta/src/types/internal_operation/pay_coin.rs
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) crates/sui-types/src/gas_model/tables.rs
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) sui-execution/historical-versions/v0/sui-adapter/src/execution_engine.rs
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) sui-execution/historical-versions/v0/sui-adapter/src/execution_engine.rs
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) REDACTED
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) REDACTED
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) REDACTED
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) REDACTED
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) REDACTED
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) REDACTED
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) sui-execution/historical-versions/v0/sui-adapter/src/temporary_store.rs
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecvrf.rs
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/hmac.rs
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) sui-execution/historical-versions/v0/sui-move-natives/src/dynamic_field.rs
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) sui-execution/historical-versions/v0/sui-move-natives/src/event.rs
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) sui-execution/historical-versions/v0/sui-move-natives/src/object_runtime/mod.rs
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) sui-execution/historical-versions/v0/sui-move-natives/src/object_runtime/mod.rs
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) sui-execution/historical-versions/v0/sui-move-natives/src/object_runtime/mod.rs
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) sui-execution/historical-versions/v0/sui-move-natives/src/object_runtime/mod.rs
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) sui-execution/historical-versions/v0/sui-move-natives/src/transfer.rs
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) sui-execution/historical-versions/v0/sui-move-natives/src/types.rs
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) sui-execution/historical-versions/v0/sui-move-natives/src/validator.rs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) crates/sui-kv-rpc/src/v2/move_package_service.rs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) REDACTED
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) sui-execution/historical-versions/v1/sui-move-natives/src/transfer.rs
  • Code Duplication · Duplicated block (45 lines × 4) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/groth16.rs
  • Code Duplication · Duplicated block (43 lines × 4) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecvrf.rs
  • Code Duplication · Duplicated block (38 lines × 3) sui-execution/historical-versions/v0/sui-move-natives/src/dynamic_field.rs
  • Code Duplication · Duplicated block (30–31 lines × 4) sui-execution/historical-versions/v0/sui-move-natives/src/dynamic_field.rs
  • Code Duplication · Duplicated block (31 lines × 2) sui-execution/historical-versions/v3/sui-move-natives/src/dynamic_field.rs
  • Code Duplication · Duplicated block (30 lines × 4) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/bls12381.rs
  • Code Duplication · Duplicated block (30 lines × 3) sui-execution/historical-versions/v0/sui-move-natives/src/dynamic_field.rs
  • Code Duplication · Duplicated block (28 lines × 2) sui-execution/historical-versions/v3/sui-move-natives/src/crypto/poseidon.rs
  • Code Duplication · Duplicated block (26 lines × 5) sui-execution/historical-versions/v0/sui-move-natives/src/dynamic_field.rs
  • Code Duplication · Duplicated block (26 lines × 4) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ed25519.rs
  • Code Duplication · Duplicated block (25 lines × 5) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ed25519.rs
  • Code Duplication · Duplicated block (24 lines × 4) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/hash.rs
  • Code Duplication · Duplicated block (24 lines × 2) crates/sui-checkpoint-blob-indexer/src/config.rs
  • Code Duplication · Duplicated block (23 lines × 2) sui-execution/historical-versions/v3/sui-move-natives/src/crypto/groth16.rs
  • Code Duplication · Duplicated block (22 lines × 5) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/bls12381.rs
  • Code Duplication · Duplicated block (22 lines × 5) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/bls12381.rs
  • Code Duplication · Duplicated block (16–19 lines × 2) crates/sui-indexer-alt-reader/src/alpha_ledger_grpc_reader.rs
  • Code Duplication · Duplicated block (17 lines × 5) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_k1.rs
  • Code Duplication · Duplicated block (17 lines × 5) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_r1.rs
  • Code Duplication · Duplicated block (17 lines × 2) crates/sui-keys/src/key_derive.rs
  • Code Duplication · Duplicated block (16 lines × 5) sui-execution/historical-versions/v0/sui-move-natives/src/types.rs
  • Code Duplication · Duplicated block (16 lines × 2) crates/sui-checkpoint-blob-indexer/src/config.rs
  • Code Duplication · Duplicated block (14 lines × 5) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/hash.rs
  • Code Duplication · Duplicated block (13–14 lines × 5) sui-execution/historical-versions/v0/sui-move-natives/src/event.rs
  • Code Duplication · Duplicated block (14 lines × 2) crates/sui-indexer-alt-consistent-store/src/config.rs
  • Code Duplication · Duplicated block (14 lines × 2) crates/sui-kv-rpc/src/v2/list_checkpoints.rs
  • Code Duplication · Duplicated block (13 lines × 2) crates/sui-core/src/global_state_hasher.rs
  • Code Duplication · Duplicated block (12 lines × 5) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/groth16.rs
  • Code Duplication · Duplicated block (12 lines × 3) sui-execution/historical-versions/v0/sui-move-natives/src/event.rs
  • Code Duplication · Duplicated block (11 lines × 16) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_k1.rs
  • Code Duplication · Duplicated block (11 lines × 4) sui-execution/latest/sui-move-natives/src/crypto/ecdsa_k1.rs
  • Code Duplication · Duplicated block (9–10 lines × 2) crates/sui-indexer-alt-framework/src/ingestion/mod.rs

Watchdog compares 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: 249 findings

These 249 critical or serious findings were in the previous survey, on 13 October 2026, and are gone from this one. The first 100 are listed here.

  • Cyclomatic Complexity · sui_kv_rpc::pipeline::resolve_scan_watermarks (cyclomatic 27) crates/sui-kv-rpc/src/pipeline.rs
  • Cyclomatic Complexity · ObjectLink.ObjectLink (cyclomatic 20) dapps/multisig-toolkit/src/components/preview-effects/ObjectLink.tsx
  • Cyclomatic Complexity · purchaseItem (cyclomatic 19) dapps/kiosk-cli/index.js
  • Cyclomatic Complexity · sui_indexer_alt_framework::pipeline::concurrent::collector::collector (cyclomatic 17) crates/sui-indexer-alt-framework/src/pipeline/concurrent/collector.rs
  • Cyclomatic Complexity · ResolvedCheckpointRange::from_request (cyclomatic 16) crates/sui-rpc-api/src/ledger_history/query_options.rs
  • Cyclomatic Complexity · sui_rpc_api::grpc::v2::ledger_service::get_checkpoint::get_checkpoint (cyclomatic 16) crates/sui-rpc-api/src/grpc/v2/ledger_service/get_checkpoint.rs
  • Cognitive Complexity · sui_kv_rpc::pipeline::resolve_scan_watermarks (cognitive 36) crates/sui-kv-rpc/src/pipeline.rs
  • Cognitive Complexity · sui_kv_rpc::pipeline::pipelined_chunks (cognitive 31) crates/sui-kv-rpc/src/pipeline.rs
  • Cognitive Complexity · ObjectLink.ObjectLink (cognitive 23) dapps/multisig-toolkit/src/components/preview-effects/ObjectLink.tsx
  • Cognitive Complexity · ResolvedCheckpointRange::from_request (cognitive 22) crates/sui-rpc-api/src/ledger_history/query_options.rs
  • Cognitive Complexity · purchaseItem (cognitive 20) dapps/kiosk-cli/index.js
  • Cognitive Complexity · MetricsFuture::poll (cognitive 19) crates/sui-indexer-alt-jsonrpc/src/metrics/middleware.rs
  • Cognitive Complexity · RpcService::render_effects_to_proto (cognitive 19) crates/sui-rpc-api/src/grpc/v2/render.rs
  • Cognitive Complexity · SuiObjectData::try_from (cognitive 16) crates/sui-json-rpc-types/src/sui_object.rs
  • God Classes · FunctionTooLong: combine-sigs.MultiSigCombineSignatureGenerator dapps/multisig-toolkit/src/routes/combine-sigs.tsx
  • God Classes · FileTooLong: src/sui_object.rs crates/sui-json-rpc-types/src/sui_object.rs
  • God Classes · FunctionTooLong: offline-signer.OfflineSigner dapps/multisig-toolkit/src/routes/offline-signer.tsx
  • God Classes · FunctionTooLong: sui_indexer_alt_framework::pipeline::sequential::collector::collector crates/sui-indexer-alt-framework/src/pipeline/sequential/collector.rs
  • God Classes · FunctionTooLong: sui_indexer_alt_framework::pipeline::concurrent::collector::collector crates/sui-indexer-alt-framework/src/pipeline/concurrent/collector.rs
  • God Classes · FunctionTooLong: execute-transaction.ExecuteTransaction dapps/multisig-toolkit/src/routes/execute-transaction.tsx
  • God Classes · FunctionTooLong: multisig-address.MultiSigAddressGenerator dapps/multisig-toolkit/src/routes/multisig-address.tsx
  • Code Duplication · Near-duplicate member family (10 members, 36 shared lines) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_k1.rs
  • Code Duplication · Near-duplicate member family (10 members, 30 shared lines) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_k1.rs
  • Code Duplication · Near-duplicate member family (9 members, 26 shared lines) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_k1.rs
  • Code Duplication · Near-duplicate member family (6 members, 22 shared lines) sui-execution/historical-versions/v3/sui-move-natives/src/crypto/ecdsa_k1.rs
  • Code Duplication · Near-duplicate member family (5 members, 71 shared lines) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/groth16.rs
  • Code Duplication · Near-duplicate member family (5 members, 34 shared lines) sui-execution/historical-versions/v0/sui-move-natives/src/dynamic_field.rs
  • Code Duplication · Near-duplicate member family (5 members, 31 shared lines) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/bls12381.rs
  • Code Duplication · Near-duplicate member family (5 members, 31 shared lines) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/bls12381.rs
  • Code Duplication · Near-duplicate member family (5 members, 21 shared lines) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecvrf.rs
  • Code Duplication · Near-duplicate member family (3 members, 39 shared lines) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ed25519.rs
  • Code Duplication · Edited copy of a member (40 corresponding lines) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/context.rs
  • Code Duplication · Edited copy of a member (39 corresponding lines) crates/simulacrum/src/lib.rs
  • Code Duplication · Members sharing a duplicated core (11 members, 50+ identical tokens) crates/sui-config/src/node.rs
  • Code Duplication · Members sharing a duplicated core (7 members, 50+ identical tokens) sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) crates/sui-rosetta/src/types/internal_operation/pay_coin.rs
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) crates/sui-types/src/gas_model/tables.rs
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) sui-execution/historical-versions/v0/sui-adapter/src/execution_engine.rs
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) sui-execution/historical-versions/v0/sui-adapter/src/execution_engine.rs
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) REDACTED
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) REDACTED
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) REDACTED
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) REDACTED
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) REDACTED
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) REDACTED
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) sui-execution/historical-versions/v0/sui-adapter/src/temporary_store.rs
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/hmac.rs
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) sui-execution/historical-versions/v0/sui-move-natives/src/dynamic_field.rs
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) sui-execution/historical-versions/v0/sui-move-natives/src/event.rs
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) sui-execution/historical-versions/v0/sui-move-natives/src/object_runtime/mod.rs
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) sui-execution/historical-versions/v0/sui-move-natives/src/object_runtime/mod.rs
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) sui-execution/historical-versions/v0/sui-move-natives/src/object_runtime/mod.rs
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) sui-execution/historical-versions/v0/sui-move-natives/src/object_runtime/mod.rs
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) sui-execution/historical-versions/v0/sui-move-natives/src/transfer.rs
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) sui-execution/historical-versions/v0/sui-move-natives/src/types.rs
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) sui-execution/historical-versions/v0/sui-move-natives/src/validator.rs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) crates/sui-kv-rpc/src/v2/move_package_service.rs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) REDACTED
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) sui-execution/historical-versions/v1/sui-move-natives/src/transfer.rs
  • Code Duplication · Duplicated block (41 lines × 4) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecvrf.rs
  • Code Duplication · Duplicated block (37 lines × 3) sui-execution/historical-versions/v0/sui-move-natives/src/dynamic_field.rs
  • Code Duplication · Duplicated block (32 lines × 2) crates/sui-indexer-alt-graphql/src/main.rs
  • Code Duplication · Duplicated block (30–31 lines × 4) sui-execution/historical-versions/v0/sui-move-natives/src/dynamic_field.rs
  • Code Duplication · Duplicated block (31 lines × 2) sui-execution/historical-versions/v3/sui-move-natives/src/dynamic_field.rs
  • Code Duplication · Duplicated block (30 lines × 3) sui-execution/historical-versions/v0/sui-move-natives/src/dynamic_field.rs
  • Code Duplication · Duplicated block (28 lines × 4) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/bls12381.rs
  • Code Duplication · Duplicated block (28 lines × 4) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_k1.rs
  • Code Duplication · Duplicated block (28 lines × 4) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_r1.rs
  • Code Duplication · Duplicated block (28 lines × 2) sui-execution/historical-versions/v3/sui-move-natives/src/crypto/poseidon.rs
  • Code Duplication · Duplicated block (27 lines × 4) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_r1.rs
  • Code Duplication · Duplicated block (26 lines × 5) sui-execution/historical-versions/v0/sui-move-natives/src/dynamic_field.rs
  • Code Duplication · Duplicated block (24 lines × 4) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ed25519.rs
  • Code Duplication · Duplicated block (24 lines × 4) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/hash.rs
  • Code Duplication · Duplicated block (23 lines × 5) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ed25519.rs
  • Code Duplication · Duplicated block (22 lines × 5) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/bls12381.rs
  • Code Duplication · Duplicated block (22 lines × 5) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/bls12381.rs
  • Code Duplication · Duplicated block (21 lines × 2) crates/sui-checkpoint-blob-indexer/src/config.rs
  • Code Duplication · Duplicated block (20 lines × 2) crates/sui-indexer-alt-graphql/src/main.rs
  • Code Duplication · Duplicated block (19 lines × 2) sui-execution/historical-versions/v3/sui-move-natives/src/lib.rs
  • Code Duplication · Duplicated block (18 lines × 2) crates/sui-indexer-alt-graphql/src/main.rs
  • Code Duplication · Duplicated block (17 lines × 5) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_k1.rs
  • Code Duplication · Duplicated block (17 lines × 5) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_r1.rs
  • Code Duplication · Duplicated block (15 lines × 5) sui-execution/historical-versions/v0/sui-move-natives/src/types.rs
  • Code Duplication · Duplicated block (15 lines × 2) crates/sui-indexer-alt-jsonrpc/src/api/transactions/response.rs
  • Code Duplication · Duplicated block (12–15 lines × 2) crates/sui-indexer-alt-reader/src/alpha_ledger_grpc_reader.rs
  • Code Duplication · Duplicated block (15 lines × 2) crates/sui-json-rpc-types/src/sui_object.rs
  • Code Duplication · Duplicated block (14 lines × 5) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/hash.rs
  • Code Duplication · Duplicated block (14 lines × 2) crates/sui-core/src/global_state_hasher.rs
Rebuild cost: about €820,000 · Estimate
Cost to rebuild€270,000 to €1,400,000, for 4,541 to 14,407 hours of work, about 5.6 person-years for 3 to 11 engineers
Difficulty of the problemStandard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor×0.8 at a score of 55. 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.
SizeVery large: 666,260 lines of product code
What it is notNot a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.

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

Top priorities

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

1
Resolve the 9 Boundary-crossing change coupling finding(s) in Change Coupling — start with authority.rs (3), network_config_builder.rs (2), single_node.rs (2).
Raises the score by about 0.7 points · Low effort · Change Coupling
2
Improve Dependency Hygiene — currently 8.0/10.
Raises the score by about 2 points · Medium effort · Dependency Hygiene
3
Codify backups + geo-recovery in IaC and document RTO/RPO and the restore procedure — a persistence guard alone is not disaster recovery.
Raises the score by about 2 points · Medium effort · DR & Backup

Diagnosis: what the measurements show together

Each conclusion below combines several dimensions into one point that no single dimension shows, and lists the measurements it rests on.

Where the investment is most exposed · Value at risk
This code would cost about €820,000 to build again, about 5.6 person-years of work. Its weakest lens is Production Readiness, at 52 (Adequate). Production Readiness is about whether the product is ready to run in production and to change without breaking. Because the weakest lens counts most in the score, work on Production Readiness also moves the score most.
Based on: the rebuild estimate · the Production Readiness grade · how much each lens counts
What to do: Start with the Production Readiness actions in Top priorities.
If you do one thing first · First action
Resolve the 9 Boundary-crossing change coupling finding(s) in Change Coupling. Of all the actions in this report, it raises the score most for the work it takes: about 0.7 points for low effort, because it clears the 9 Change Coupling 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.1 out of 10. Code at that level is slower to change than clean code, and Watchdog estimates the extra work at 2% to 5% on every change. The history of the code shows how much it changes: about 202,088 lines over the last 90 days, which is about 819,579 lines a year. At that pace, the extra work comes to an estimated 48.5 to 291.1 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 Watchdog's own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.

Architecture — module dependency graph

Project dependencies, layered top-to-bottom; arrows show direction. Any dashed red edge points upward or sideways, which only happens where the projects form a dependency cycle. A graph without cycles has none.

arch move-binary-format move-binary-format move-core-types move-core-types move-binary-format->move-core-types move-bytecode-utils move-bytecode-utils move-bytecode-utils->move-binary-format move-bytecode-utils->move-core-types move-cli move-cli move-cli->move-binary-format move-cli->move-bytecode-utils move-command-line-common move-command-line-common move-cli->move-command-line-common move-compiler move-compiler move-cli->move-compiler move-cli->move-core-types move-package-compilation move-package-compilation move-cli->move-package-compilation move-vm-config move-vm-config move-cli->move-vm-config move-command-line-common->move-binary-format move-command-line-common->move-core-types move-compiler->move-binary-format move-compiler->move-command-line-common move-compiler->move-core-types move-package-compilation->move-binary-format move-package-compilation->move-bytecode-utils move-package-compilation->move-command-line-common move-package-compilation->move-compiler move-package-compilation->move-core-types move-vm-config->move-binary-format mysten-common mysten-common mysten-metrics mysten-metrics mysten-common->mysten-metrics sui sui sui->move-binary-format sui->move-bytecode-utils sui->move-cli sui->move-command-line-common sui->move-compiler sui->move-core-types sui->move-package-compilation sui->mysten-common sui-config sui-config sui->sui-config sui-execution sui-execution sui->sui-execution sui-move-build sui-move-build sui->sui-move-build sui-protocol-config sui-protocol-config sui->sui-protocol-config sui-rpc-api sui-rpc-api sui->sui-rpc-api sui-types sui-types sui->sui-types telemetry-subscribers telemetry-subscribers sui->telemetry-subscribers sui-config->move-vm-config sui-config->mysten-common sui-config->sui-types sui-core sui-core sui-core->move-binary-format sui-core->move-bytecode-utils sui-core->move-core-types sui-core->mysten-common sui-core->mysten-metrics sui-core->sui-config sui-core->sui-execution sui-core->sui-protocol-config sui-core->sui-types sui-core->telemetry-subscribers sui-execution->move-binary-format sui-execution->move-vm-config sui-execution->mysten-common sui-execution->mysten-metrics sui-execution->sui-protocol-config sui-execution->sui-types sui-move-build->move-binary-format sui-move-build->move-bytecode-utils sui-move-build->move-compiler sui-move-build->move-core-types sui-move-build->move-package-compilation sui-move-build->mysten-common sui-move-build->sui-protocol-config sui-move-build->sui-types sui-node sui-node sui-node->move-vm-config sui-node->mysten-common sui-node->mysten-metrics sui-node->sui-config sui-node->sui-core sui-node->sui-protocol-config sui-node->sui-rpc-api sui-node->sui-types sui-node->telemetry-subscribers sui-protocol-config->move-binary-format sui-protocol-config->move-core-types sui-protocol-config->move-vm-config sui-protocol-config->mysten-common sui-rpc-api->move-binary-format sui-rpc-api->move-core-types sui-rpc-api->mysten-common sui-rpc-api->sui-config sui-rpc-api->sui-protocol-config sui-rpc-api->sui-types sui-types->move-binary-format sui-types->move-bytecode-utils sui-types->move-core-types sui-types->mysten-common sui-types->mysten-metrics sui-types->sui-protocol-config __more__ +173 more projects

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.

2554 modules, with 12451 dependencies between them. 12 loops run through 605 of the modules, marked above the diagonal.

The table shows the 40 modules with the most connections; 2514 more are left out to keep it readable.

Which modules use which. The module on each row uses the module in each column, and the number counts the pairs of types that connect them. A cell above the diagonal is part of a loop.
uses →1 move_vm_config.verifier2 mysten_common.sync.oneshot3 consensus_core.context4 sui.client_ptb.ast5 sui_indexer_alt_consistent_api.proto.generated.sui.rpc.consistent.v1alpha6 sui_types.digests7 consensus_core.synchronizer8 sui_indexer_alt_graphql.api.types.protocol_configs9 sui_consistent_store.store10 sui_types.transaction11 sui_types.base_types12 sui_package_resolver13 sui_indexer_alt_graphql.scope14 sui_indexer_alt_graphql.api.types.move_type15 sui_display.v2.value16 sui_kvstore.bigtable.proto.google.bigtable.v217 sui_kvstore.bigtable.proto.google.bigtable.v2.r#type18 move_core_types.identifier19 move_core_types.language_storage20 sui_name_service21 sui_kvstore22 consensus_core.block23 sui_data_store.gql_queries.txn_query24 sui_data_store.gql_queries.object_query25 sui_indexer_alt_framework.pipeline.processor26 move_core_types.account_address27 move_binary_format.normalized28 move_vm_runtime.natives.functions29 move_ir_types.location30 move_binary_format.file_format31 move_regex_borrow_graph.collections32 move_compiler.parser.ast33 move_compiler.hlir.ast34 move_ir_types.ast35 move_compiler.shared36 sui_display.v237 consensus_config.committee38 move_binary_format.errors39 sui_core.authority.authority_per_epoch_store40 sui_core.authority
1 move_vm_config.verifier
2 mysten_common.sync.oneshot
3 consensus_core.context2
4 sui.client_ptb.ast113
5 sui_indexer_alt_consistent_api.proto.generated.sui.rpc.consistent.v1alpha12
6 sui_types.digests812
7 consensus_core.synchronizer311
8 sui_indexer_alt_graphql.api.types.protocol_configs314
9 sui_consistent_store.store1
10 sui_types.transaction334292112411525
11 sui_types.base_types2711132171346125
12 sui_package_resolver11156211
13 sui_indexer_alt_graphql.scope12211
14 sui_indexer_alt_graphql.api.types.move_type1412
15 sui_display.v2.value133412
16 sui_kvstore.bigtable.proto.google.bigtable.v2237
17 sui_kvstore.bigtable.proto.google.bigtable.v2.r#type311
18 move_core_types.identifier112
19 move_core_types.language_storage231312223
20 sui_name_service122231
21 sui_kvstore32111
22 consensus_core.block513127
23 sui_data_store.gql_queries.txn_query31
24 sui_data_store.gql_queries.object_query21
25 sui_indexer_alt_framework.pipeline.processor21
26 move_core_types.account_address1112
27 move_binary_format.normalized7646325036
28 move_vm_runtime.natives.functions11112
29 move_ir_types.location11
30 move_binary_format.file_format111111119
31 move_regex_borrow_graph.collections21
32 move_compiler.parser.ast3266211934
33 move_compiler.hlir.ast24954225
34 move_ir_types.ast612233154138
35 move_compiler.shared32411
36 sui_display.v211
37 consensus_config.committee11
38 move_binary_format.errors223
39 sui_core.authority.authority_per_epoch_store1223111121
40 sui_core.authority12112652221214
Uses a module listed above itPart of a loopThe module itself
1 move_vm_config.verifier2 mysten_common.sync.oneshot3 consensus_core.context4 sui.client_ptb.ast5 sui_indexer_alt_consistent_api.proto.generated.sui.rpc.consistent.v1alpha6 sui_types.digests7 consensus_core.synchronizer8 sui_indexer_alt_graphql.api.types.protocol_configs9 sui_consistent_store.store10 sui_types.transaction11 sui_types.base_types12 sui_package_resolver13 sui_indexer_alt_graphql.scope14 sui_indexer_alt_graphql.api.types.move_type15 sui_display.v2.value16 sui_kvstore.bigtable.proto.google.bigtable.v217 sui_kvstore.bigtable.proto.google.bigtable.v2.r#type18 move_core_types.identifier19 move_core_types.language_storage20 sui_name_service21 sui_kvstore22 consensus_core.block23 sui_data_store.gql_queries.txn_query24 sui_data_store.gql_queries.object_query25 sui_indexer_alt_framework.pipeline.processor26 move_core_types.account_address27 move_binary_format.normalized28 move_vm_runtime.natives.functions29 move_ir_types.location30 move_binary_format.file_format31 move_regex_borrow_graph.collections32 move_compiler.parser.ast33 move_compiler.hlir.ast34 move_ir_types.ast35 move_compiler.shared36 sui_display.v237 consensus_config.committee38 move_binary_format.errors39 sui_core.authority.authority_per_epoch_store40 sui_core.authoritymove_vm_config.verifier1mysten_common.sync.oneshot2consensus_core.context3sui.client_ptb.ast4sui_indexer_alt_consistent_api.proto.generated.sui.rpc.consistent.v1alpha5sui_types.digests6consensus_core.synchronizer7sui_indexer_alt_graphql.api.types.protocol_configs8sui_consistent_store.store9sui_types.transaction10sui_types.base_types11sui_package_resolver12sui_indexer_alt_graphql.scope13sui_indexer_alt_graphql.api.types.move_type14sui_display.v2.value15sui_kvstore.bigtable.proto.google.bigtable.v216sui_kvstore.bigtable.proto.google.bigtable.v2.r#type17move_core_types.identifier18move_core_types.language_storage19sui_name_service20sui_kvstore21consensus_core.block22sui_data_store.gql_queries.txn_query23sui_data_store.gql_queries.object_query24sui_indexer_alt_framework.pipeline.processor25move_core_types.account_address26move_binary_format.normalized27move_vm_runtime.natives.functions28move_ir_types.location29move_binary_format.file_format30move_regex_borrow_graph.collections31move_compiler.parser.ast32move_compiler.hlir.ast33move_ir_types.ast34move_compiler.shared35sui_display.v236consensus_config.committee37move_binary_format.errors38sui_core.authority.authority_per_epoch_store39sui_core.authority4021131281231131413342921124115252711132171346125111562111221114121334122373111122313122231222313211151312731212111127646325036111121111111111921326621193424954225612233154138324111111223122311112112112652221214+2514 more modules (most-connected shown)

At a glance — Code Health · 65% · Adequate · gated by X4 ·

At a glance — Architecture · 53% · Adequate · gated by AX8 ·

At a glance — Maturity · 64% · Adequate · gated by M4 ·

At a glance — Readiness · 52% · Adequate · gated by P5, P7 ·

At a glance — Security · 55% · Adequate · gated by D28, D29, D30, D31, D36 ·

At a glance — Domain Modelling · 100% · Exemplary ·

At a glance — Event Sourcing · 100% · Exemplary ·

At a glance — Performance · 73% · Strong ·

Security & Compliance — OWASP Top-10 mapping

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

OWASP categoryFindingsSeverity
A03:2025 — Software Supply Chain Failures156High / Critical
A02:2025 — Security Misconfiguration110High / Critical
A05:2025 — Injection59High / Critical
A07:2025 — Authentication Failures30High / Critical

Roadmap

First, resolve the 22 dependency direction violations to ensure infrastructure implements interfaces defined by the domain. Second, eliminate all production-to-test references by extracting shared helpers into a production support library. Third, codify disaster recovery by documenting RTO/RPO and integrating backup procedures into infrastructure as code. Finally, harden outbound HTTP resilience by adding request timeouts and retry logic to all client calls.

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

Do thisHelpsEffortDimension
Resolve the 9 Boundary-crossing change coupling finding(s) in Change Coupling — start with authority.rs (3), network_config_builder.rs (2), single_node.rs (2).+0.7 ptsLowChange Coupling
Improve Dependency Hygiene — currently 8.0/10.+2.5 ptsMediumDependency Hygiene
Codify backups + geo-recovery in IaC and document RTO/RPO and the restore procedure — a persistence guard alone is not disaster recovery.+2.5 ptsMediumDR & Backup
Remove every production → test project reference: extract any shared test helper into a production support library (which the tests reference), or invert the dependency so the test project depends on production — not the reverse.+2.2 ptsMediumTest isolation
Resolve the 1 ADR has no Decision section finding(s) in ADR Quality — start with dvx-2115-address-identity.md.+1.0 ptsLowADR Quality
Give every client a whole-request bound: `reqwest::Client::builder().timeout(Duration::from_secs(10))` (never `reqwest::get` or `Client::new()`, which have none), ureq's `timeout_global`, or wrap the call in `tokio::time::timeout`; add retry with back-off (`reqwest-retry`'s `RetryTransientMiddleware`, `backoff`) around dependencies that fail.+2.0 ptsMediumOutbound HTTP resilience
Keep dependencies pointing inward: domain/application define interfaces, infrastructure/web implement them (Dependency Inversion).+1.5 ptsMediumDependency direction
Pin third-party scripts and verify them: name an exact version in the URL and add an `integrity="sha384-…"` hash alongside `crossorigin="anonymous"` (both are required — an integrity hash on a cross-origin script without `crossorigin` is not evaluated, it blocks the script). Where the vendor ships a continuously-updated loader and publishes no stable hash (tag managers, analytics, chat widgets), Subresource Integrity is not available: constrain it instead with a `Content-Security-Policy` that names the exact origins allowed to execute, and drop the script from the pages that do not need it. Where the page is shipped inside a package that others host, prefer vendoring the asset and serving it from the app’s own origin, so no consumer inherits a third-party dependency they did not choose.+1.3 ptsMediumWeb-Security Posture

File quality

Per-file score 0–10 — a quality signature. Of 879 files carrying findings, judged against the Production bar: 2% slop · 66% mixed · 32% near-clean.

FileScoreBandWorst signal
REDACTED0.0SlopSecrets (history): REDACTED: REDACTED
REDACTED0.0SlopDependency Vulnerabilities: High CVE: REDACTED
REDACTED0.0SlopDependency Vulnerabilities: High CVE: REDACTED
REDACTED0.8SlopIaC & Container Security: High IaC: REDACTED
crates/sui-swarm-config/src/network_config_builder.rs1.0SlopChange Coupling: Boundary-crossing change coupling: network_config_builder.rs ↔ v1.rs
crates/sui-core/src/authority.rs1.0SlopChange Coupling: Boundary-crossing change coupling: authority.rs ↔ execution_engine.rs
consensus/core/src/core.rs1.0SlopChange Coupling: Boundary-crossing change coupling: core.rs ↔ mysticeti_adapter.rs
REDACTED1.3SlopStatic Analysis (SAST): High: REDACTED
REDACTED1.3SlopIaC & Container Security: High IaC: REDACTED
REDACTED1.4SlopIaC & Container Security: High IaC: REDACTED
REDACTED1.6SlopDependency Vulnerabilities: High CVE: REDACTED
REDACTED1.7SlopIaC & Container Security: High IaC: REDACTED
REDACTED2.0SlopDependency Vulnerabilities: High CVE: REDACTED
REDACTED2.3SlopDependency Vulnerabilities: High CVE: REDACTED
REDACTED2.5SlopDependency Vulnerabilities: High CVE: REDACTED
REDACTED2.7SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.7SlopDependency Vulnerabilities: High CVE: REDACTED
REDACTED2.7SlopIaC & Container Security: High IaC: REDACTED
REDACTED3.0SlopStatic Analysis (SAST): High: REDACTED
REDACTED3.0SlopIaC & Container Security: High IaC: REDACTED

How the grades work

Every finding carries one of four grades. Three say how serious it is. The fourth says this survey could not settle it — and it is a grade, not a gap.

Critical — 228

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

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

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

Could not be resolved — 10

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

Watchdog 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. 78 of 78 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); none rely on LLM judgement. Overall confidence is 0.9 — the weighted average across measured dimensions; it falls as more of the score leans on LLM-assisted judgement and rises when it's fully tool-backed.

Every figure here is one of three 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; ◐ Advisory — an LLM prose judgement. 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; ◐ Sampled · advisory marks an LLM verdict over a bounded sample — advisory, never a deterministic measurement.

What we checked — 78 dimensions across the health lenses
D1D2D3D4D5D6D7D9D10D12D13D14D15D16D17D19D20D26D28D29D30D31D34D35D36D37D40D41D43D44AX10AX3AX4AX8AX9C2DM4DM5DM6ES1ES2M1M2M3M4P1P10P2P3P4P5P6P7P8PF1PF3S1X1X12X13X14X15X16X17X18X19X21X22X23X24X25X26X27X28X29X3X30X4

Each chip is a dimension scored from real signals across architecture, testing, dependencies, security & compliance, documentation, git-history and code quality — in one coherent pass. A surface report typically covers a handful.

How to trust any code-health report — three questions
  1. Can you open the finding? Real findings cite a repo-relative file and line you can open at the cited line — never an absolute scratch path. Here, 4352 of 4560 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
  2. Is there a tool behind the number? Every score below names the method that produced it — Roslyn, git, a scanner, or (for a handful of documentation/naming dimensions) an LLM labelled sampled · advisory — not a narrative.
  3. Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.

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

Tools & methods

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

MethodBacksVersionEvaluator
Roslyn static analysisComplexity, cohesion, coupling, dead code, API surface, layering5.3.0✓ deterministic
Native secret scannerHardcoded secrets / credentials1.0.0✓ deterministic
Watchdog duplication detector (in-process)Code duplication1.0.0✓ deterministic
Coverage (coverlet / dotnet-coverage)Line & branch coverage10.0.400✓ deterministic
NuGet / dotnetOutdated, vulnerable & deprecated dependencies10.0.400✓ deterministic
git / LibGit2SharpChurn hotspots, knowledge concentration, history2.43.0 · 0.31.0✓ deterministic
gitleaks · semgrep · trivy · checkovSecrets in history, SAST, CVEs, IaC & container, PII / GDPR1.86.0 · 0.69.3 · 3.2.533✓ deterministic
LLM (sampled · advisory)Documentation quality, ADR conformance, naming — sampled over a bounded sample; advisory, never a deterministic measurement—◐ LLM · sampled · advisory

Every finding is locatable in findings.md. Run 01a17d29-1b9e-7455-85da-6097c7269f37.

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

Run transparency — what happened this run

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

  • D10 Test Quality — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it 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 4 test(s) behind this row are the ones the JavaScript/TypeScript census could read, and this repository also carries at least 315 test source file(s) (.rs) that it cannot: it reads JavaScript/TypeScript test declarations off disk, so a 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 — Watchdog 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 includes .rs, and the rust executor ran against the .rs half and did not finish re-running within its tier budget — so reliability was not measured for the repository as a whole. The JavaScript/TypeScript (mocha via `pnpm install --frozen-lockfile --ignore-scripts` in external-crates/move/crates/move-analyzer/prettier-plugin/; mocha via `npm ci --ignore-scripts` in external-crates/move/crates/move-analyzer/trace-adapter/ (40 tests); vitest via `pnpm install --frozen-lockfile --ignore-scripts` in external-crates/move/tooling/prettier-move/ (0 tests)): measured (0 flaky) suite(s) did re-run, and came back with 0 flaky across 1 measured tier(s) — 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.
  • D11 Test Reliability — not measured this run — Watchdog 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 for the mocha suite in external-crates/move/crates/move-analyzer/prettier-plugin/ was NOT MEASURED: the install for external-crates/move/crates/move-analyzer/prettier-plugin/ left no `c8` binary under node_modules, so the suite could not be launched. This is OUR limitation, not a defect in the repository, and the suite is excluded from the measurement rather than counted against it.
  • D14 License Compliance — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it 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 crate 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.
  • D19 Documentation Quality — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it 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 — Watchdog measured this, but not all of it. What it 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 — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D21's deterministic naming rules are gated on C# first (docs/plans/deterministic-engine.md, P5): each other language is switched on only after its own concept suite and A/B gate pass. Until then its declarations carry no naming verdict this run — this says nothing about whether its names are consistent.
  • D22 Internal API Consistency — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22's deterministic call-shape rules are gated on C# first (docs/plans/deterministic-engine.md, P5): each other language is switched on only after its own concept suite and A/B gate pass. This says nothing about whether that surface is consistent.
  • D24 Comment Value — not measured this run — Watchdog 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 the language this repository's product is written in, so it had nothing of the product to read. That is a gap in this analyzer's language reach — not a finding about this repository.
  • D27 Navigability — not measured this run — Watchdog 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.
  • AXR1 Runtime accessibility — not measured this run — Watchdog 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 1 — a container did not start, exited, or never became healthy) — time="2026-10-27T11:40:44Z" level=warning msg="The \"SUI_SHA\" variable is not set. Defaulting to a blank string." unable to get image 'mysten/sui-node:': Error response from daemon: invalid reference format; runtime evidence skipped.
  • ED5 Idempotency — not measured this run — Watchdog 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 decides whether a handler's mutation is safe to re-run by recognising its persistence writes (a database save, a repository write, an event publish) and its guards. Those markers are .NET member names, so in this repository's language a write such as `repository.save(order)` is not recognised and a same-named call on an unrelated library type could be. The handlers were found; their idempotency was neither confirmed nor ruled out.
  • GD1 Unfinished & placeholder code — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, F#, JavaScript/TypeScript, Dart, Ruby and Scala source only, and this repository's Python, Rust, solidity is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • IC1 Incompleteness & stubs — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, JavaScript/TypeScript, Java, Dart, Ruby and Scala source only, and this repository's Python, Rust, solidity is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • M4 Documentation accuracy — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it 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). 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.
  • X4 Structured logging — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it 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. 1475 further occurrence(s) are not listed individually; the score already reflects all 1515.
  • X5 Nullable reference types — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax and MSBuild project configuration, TypeScript source and its tsconfig files, Java source and its package and module declarations, PHP source and its PHPStan and Psalm configuration, Dart source and its pubspec language version, Ruby source and its Sorbet and Steep configuration, Scala source and its build's explicit-nulls, WartRemover and Scalafix settings, and Kotlin source only, and no C# was loaded, no TypeScript was found, and this repository's Python, Rust, Solidity is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.

Repo exclusion declarations: 19 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

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

Per-dimension blind spots

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

  • D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
  • D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
  • D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
  • D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
  • D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
  • D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
  • D7 Architectural Integrity: Layering is checked against detected/declared rules — an architecture whose boundaries live in convention or in code review, not in a rule a scanner can read, is not enforced here.
  • D9 Test Distribution: The test-pyramid shape is inferred from project/folder naming and references, with a single test host bucketed per-file by its path tier and content signals — a suite that names tiers unconventionally and gives no per-file signal can still be mis-bucketed.
  • 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.
  • D20 ADR Quality: ADR quality is an LLM read of the decision records present — it cannot know about decisions made and never recorded, and its verdict is sampled and advisory.
  • 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 (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
  • AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
  • AX9 CQS / query purity: Handlers are found by interface/name convention — a query handler using neither is not seen. Mutation is a resolved write/publish invocation (SaveChanges/repository/bus), so a write hidden behind a hand-rolled wrapper, reflection, or a string-keyed service locator resolves to a non-persistence type and isn't flagged; it detects that a query writes state, not whether the write is a legitimate read-side cache update. Clean means "no resolved write/publish in a query body", not a proof of CQS purity.
  • DM4 Rich vs anemic domain model: Behaviour is detected as state mutation inside a method body — a method that enforces an invariant by validating-and-throwing without mutating reads as a query, and mutation delegated through an interface the scan can't resolve isn't credited; entities with zero public properties still drop out of the population. It detects that state changes, not whether the rule is correct.
  • DM6 Domain ↔ infrastructure boundary: Infrastructure reached through a hand-rolled wrapper, a domain-named facade, reflection, or a string-keyed service locator resolves to a non-infra type and isn't seen; the body scan is symbol resolution over syntax, not full dataflow. A clean result means "no resolved infra reference in a domain body", not a proof of purity.
  • M4 Documentation accuracy: Onboarding quality is an LLM read of the docs/setup present — it cannot run the onboarding or measure how long a real new joiner takes; the verdict is sampled and advisory.
  • P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
  • P5 DR & Backup: Backup/restore and disaster-recovery readiness is judged from in-repo evidence — a config that exists is not a tested restore, so the absence of positive evidence is reported as "not evidenced", never scored as present.
  • P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.

Dimensions

D1 · Cyclomatic Complexity4.9 / 10Weak✓ Tool-verified

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

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

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

164 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was ProtocolConfig::get_for_version_impl at 282. A further 42 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 ExecutionError::from at 42 — they are counted neither in the figure above nor in this dimension's score. 27 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold functions was excluded, so the exclusion is disclosed nowhere in the file itself: crates/sui-types/src/sui_sdk_types_conversions.rs (ExecutionError::from at 42), crates/sui-display/src/v2/value.rs (Atom::try_from at 30), crates/sui-node/src/db_shell.rs (sui_node::db_shell::parse_path at 30), crates/sui-tool/src/db_shell/vfs.rs (VfsPath::fmt at 30), sui-execution/historical-versions/v3/sui-verifier/src/id_leak_verifier.rs (sui_verifier_v3::id_leak_verifier::execute_inner at 29), and 22 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.

sui_adapter_v3::execution_engine::checked::execution_loop (cyclomatic 29) · ×7sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.rs:547
sui_rpc_api::grpc::v2::ledger_service::list_events::next_event_chunk (cyclomatic 26) · ×7crates/sui-rpc-api/src/grpc/v2/ledger_service/list_events.rs:281
sui_adapter_latest::execution_engine::checked::execution_loop (cyclomatic 30) · ×5sui-execution/latest/sui-adapter/src/execution_engine.rs:1572
Operations::parse_merge_and_redeem (cyclomatic 56) · ×4crates/sui-rosetta/src/operations.rs:1099
ExecutionContext::finish (cyclomatic 33) · ×4sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/context.rs:547

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

What to do

  1. Bring the 1 body over 120 down to 120 or less in Cyclomatic Complexity — start with ProtocolConfig::get_for_version_impl (cyclomatic 282). — Refactoring it lifts Cyclomatic Complexity from 4.9 to about 5.8/10.
  2. Enforce Cyclomatic Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D2 · Cognitive Complexity4.7 / 10Weak✓ Tool-verified

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

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

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

326 method(s) exceeded the cognitive complexity threshold of 15; the worst was ProtocolConfig::get_for_version_impl at 337.

sui_rpc_api::grpc::v2::transaction_execution_service::simulate::simulate_transaction (cognitive 42) · ×15crates/sui-rpc-api/src/grpc/v2/transaction_execution_service/simulate/mod.rs:45
sui_kv_rpc::pipeline::chunks_with_watermarks (cognitive 50) · ×9crates/sui-kv-rpc/src/pipeline.rs:522
sui_adapter_v3::programmable_transactions::context::checked::finish (cognitive 43) · ×8sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/context.rs:1417
sui::sui_commands::start (cognitive 62) · ×7crates/sui/src/sui_commands.rs:868
sui_network::discovery::update_known_peers_versioned (cognitive 39) · ×7crates/sui-network/src/discovery/mod.rs:1360

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

What to do

  1. Bring the 2 bodies over 120 down to 120 or less in Cognitive Complexity — start with ProtocolConfig::get_for_version_impl (cognitive 337), ValidatorService::handle_submit_transaction_inner (cognitive 172). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 2 together lifts Cognitive Complexity from 4.7 to about 5.8/10, projected with the scoring formula itself and assuming each lands exactly at 120; a cleaner split scores higher.
  2. Enforce Cognitive Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D3 · God Classes8.0 / 10Strong✓ Tool-verified

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

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

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

531 god class(es) detected.

FileTooLong: src/authority.rs · ×165crates/sui-core/src/authority.rs
MethodTooLong: ProtocolConfig.get_for_version_impl · ×136crates/sui-protocol-config/src/lib.rs:2695
FunctionTooLong: sui_bridge_cli::main · ×100crates/sui-bridge-cli/src/main.rs:46
ClassTooLong: AuthorityState · ×74crates/sui-core/src/authority.rs:1011
TooManyMethods: AuthorityPerEpochStore · ×37crates/sui-core/src/authority/authority_per_epoch_store.rs:312

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

What to do

  1. Resolve the 165 FileTooLong finding(s) in God Classes — start with lib.rs (19), REDACTED (19), context.rs (6). — One of this dimension's main actionable groups (165 warning-level).
  2. Resolve the 136 MethodTooLong finding(s) in God Classes — start with lib.rs (15), metrics.rs (12), REDACTED (12). — One of this dimension's main actionable groups (136 warning-level).
  3. Resolve the 100 FunctionTooLong finding(s) in God Classes — start with lib.rs (16), execution_engine.rs (9), REDACTED (9). — One of this dimension's main actionable groups (100 warning-level).
  4. Enforce God Classes in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D4 · Code Duplication8.7 / 10Strong✓ Tool-verified

What it measures: Copy-pasted code that should be shared instead.

Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), density-scored per KLoC of production code. Deterministic.

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

1709 duplicated block group(s) detected. A further 213 rows report members as variants of one another; they aggregate block groups already counted above and are not themselves counted. 106 of the 1922 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.

Duplicated block (8 lines × 2) · ×75crates/sui-bridge-indexer-alt/src/handlers/token_transfer_data_handler.rs:55
Duplicated block (9 lines × 2) · ×70consensus/config/src/committee.rs:41
Duplicated block (7 lines × 2) · ×68crates/sui-analytics-indexer/src/config.rs:205
Duplicated block (6 lines × 2) · ×65crates/sui-bridge/src/abi.rs:215
Members sharing a duplicated core (4 members, 50+ identical tokens) · ×62crates/simulacrum/src/store/in_mem_store.rs:237

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

What to do

  1. Resolve the 75 Duplicated block (8 lines × 2) finding(s) in Code Duplication — start with test_scenario.rs (5), lib.rs (4), node.rs (3). — One of this dimension's main actionable groups (75 warning-level).
  2. Resolve the 70 Duplicated block (9 lines × 2) finding(s) in Code Duplication — start with lib.rs (7), translate.rs (6), group_ops.rs (6). — One of this dimension's main actionable groups (70 warning-level).
  3. Resolve the 68 Duplicated block (7 lines × 2) finding(s) in Code Duplication — start with ast.rs (5), REDACTED (4), context.rs (4). — One of this dimension's main actionable groups (68 warning-level).
  4. Enforce Code Duplication in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.

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

D5 · Coupling8.0 / 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.

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

193 production modules (Cargo+npm), 0 dependency cycle(s), 27 unstable depended-on module(s). Read from the build's own module declarations; 15 module(s) off the main sequence, with abstractness counted on 114 of the 193 (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: prometheus-closure-metric · ×14
Unstable project move-cli
Unstable project move-coverage
Unstable project move-decompiler
Unstable project move-stackless-bytecode-2

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

What to do

  1. Resolve the 14 Off the main sequence finding(s) in Coupling. — One of this dimension's main actionable groups (14 warning-level).
  2. Resolve the 1 Unstable project move-cli finding(s) in Coupling. — One of this dimension's main actionable groups (1 warning-level).
  3. Resolve the 1 Unstable project move-coverage finding(s) in Coupling. — One of this dimension's main actionable groups (1 warning-level).
  4. Enforce Coupling in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D6 · Cohesion (LCOM4)9.8 / 10Stronggated by 23 serious findings✓ Tool-verified

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

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

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

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

23 of 1726 classes have LCOM4 above 3.

Low cohesion: ServiceConfig (LCOM4 21) · ×23crates/sui-indexer-alt-graphql/src/api/types/service_config.rs:17

What to do

  1. Resolve the 23 Low cohesion finding(s) in Cohesion (LCOM4) — start with lib.rs (6), env.rs (2), service_config.rs. — One of this dimension's main actionable groups (23 warning-level).
  2. Enforce Cohesion (LCOM4) in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.

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

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

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

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

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

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

What to do

  1. Enforce Architectural Integrity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

Detailed fixes: d7_recommendation.md.

D9 · Test Distribution9.9 / 10Exemplary✓ Tool-verified

What it measures: Whether the test suite has a healthy mix of unit / integration / end-to-end tests.

Method: Test projects classified (Unit/Integration/BDD/E2E) from compiled metadata; test methods counted exhaustively across projects with placement-agnostic disk fallback. Deterministic.

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

6581 test methods: 5917 unit, 628 integration, 0 BDD, 36 e2e. The JavaScript/TypeScript suite contributes 4 `it`/`test` case(s) across 1 test file(s) declaring at least one; its tier split is read from package names and paths only. The Rust suite contributes 6526 `#[test]` function(s) across 911 file(s) declaring at least one; its unit/integration split is Cargo's own — 97 of those file(s) are integration-test targets under a crate's tests/ directory, and the rest are #[test] functions compiled into the crate they test. The Python suite contributes 51 test function(s) across 1 file(s) declaring at least one — every `def test…` in a file pytest or unittest would collect, which is those frameworks' own definition of a case; a parametrize table counts once, so this is a floor. Its tier split is read from file names and paths only.

✓ On the Gold path — maintain.

Detailed fixes: d9_recommendation.md.

D10 · Test Quality10.0 / 10Exemplary✓ 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.

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

0 skipped, 0 zero-assertion, no mocking-framework packages referenced (hand-written doubles or no mocking) across 4 tests. Measured on the JavaScript/TypeScript suite only — at least 315 test source file(s) (.rs) went unread, so its test quality is unmeasured and is not in these counts.

✓ On the Gold path — maintain.

Detailed fixes: d10_recommendation.md.

D12 · Dependency Hygiene8.0 7.8 / 10Strong✓ Tool-verified

What it measures: Whether dependencies are current, secure, and not bloated.

Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (saturating for vulnerabilities, capped-linear for deprecation/outdated) per KLoC. Exhaustive, deterministic.

Maturity: Documented → Verified → Prevented · effective 7.8 / 10 · rule-coverage 97% · ceiling Verified

102 outdated, 0 yanked direct Cargo dependencies. 263 of 271 direct crates were graded against crates.io (0 not published there, 8 not resolved by a committed REDACTED). Only DIRECT edges are graded: a transitive crate cannot be moved past what its parent's requirement admits, so reporting one would be advice its owner cannot take. A newer release is reported only where this repository's OWN requirement already admits it, so the remedy is `cargo update` and never a manifest edit — which means a release outside the declared range is deliberately NOT charged, because a written-down constraint is a decision rather than a defect. Note that a bare requirement is a CARET, and for a 0.x crate its ceiling is the minor. Whether any crate is UNMAINTAINED is not graded — crates.io publishes no maintenance status, and release age does not stand in for one. Known CVEs in this dependency graph are D30's question, read from REDACTED there.

Outdated: anyhow · ×102

What to do

  1. Improve Dependency Hygiene — currently 8.0/10. — 102 outdated, 0 yanked direct Cargo dependencies. 263 of 271 direct crates were graded against crates.io (0 not published there, 8 not resolved by a committed REDACTED). Only DIRECT edges are graded: a transitive crate cannot be moved past what its parent's requirement admits, so reporting one would be advice its owner cannot take. A newer release is reported only where this repository's OWN requirement already admits it, so the remedy is `cargo update` and never a manifest edit — which means a release outside the declared range is deliberately NOT charged, because a written-down constraint is a decision rather than a defect. Note that a bare requirement is a CARET, and for a 0.x crate its ceiling is the minor. Whether any crate is UNMAINTAINED is not graded — crates.io publishes no maintenance status, and release age does not stand in for one. Known CVEs in this dependency graph are D30's question, read from REDACTED there.

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

D13 · REDACTED Scanning10.0 / 10Exemplary○ Nothing flagged

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

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

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

REDACTED scan ran and found no leaked secrets.

✓ On the Gold path — maintain.

Detailed fixes: d13_recommendation.md.

D14 · License Compliance10.0 / 10Exemplary○ Nothing flagged

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

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

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

0 of 1327 shipped crate(s) use a banned license. Licences were resolved from crates.io over the crates a consumer compiles — this repository's REDACTED closed over its manifests' `[dependencies]` and `[build-dependencies]`. Crates it asks for ONLY under `[dev-dependencies]` are excluded: they are not compiled by anything that depends on this repository. A further 32 crate(s) in the closure resolve from git, a path or a private registry and publish no licence this pass can read; they are outside this verdict. ★ COVERAGE OF THIS VERDICT: it grades this repository's crate dependencies and nothing else. The repository also declares package.json, and the licences of those dependencies were NOT read by this pass — a gap in this engine's coverage, not a statement about them. So this result says the graded closure carries no banned licence; it does NOT say this repository's licensing is clear.

✓ On the Gold path — maintain.

Detailed fixes: d14_recommendation.md.

D15 · Churn × Complexity Hotspots9.3 / 10Stronggated by 30 serious findings✓ Tool-verified

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

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

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

Top hotspots: crates/sui-protocol-config/src/lib.rs (45×282=12690); crates/sui-transactional-test-runner/src/test_adapter.rs (9×81=729); crates/sui-types/src/transaction.rs (12×51=612) Repeated repair below the complexity floor: crates/sui-types/src/accumulator_root.rs (3 of 4 changes were fixes)

Hotspot: crates/sui-protocol-config/src/lib.rs · ×29crates/sui-protocol-config/src/lib.rs:2695
Repeated repair: crates/sui-types/src/accumulator_root.rscrates/sui-types/src/accumulator_root.rs:207

What to do

  1. Resolve the 29 Hotspot finding(s) in Churn × Complexity Hotspots — start with lib.rs (3), REDACTED (2), list_events.rs (2). — One of this dimension's main actionable groups (29 warning-level).
  2. Resolve the 1 Repeated repair finding(s) in Churn × Complexity Hotspots — start with accumulator_root.rs. — One of this dimension's main actionable groups (1 warning-level).

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

D16 · Bus Factor9.0 / 10Strong✓ Tool-verified

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

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

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

147 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is crates/sui-kv-rpc/src/pipeline.rs. Counted over 1458 of the 1877 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 · ×12
Further sole-owners (lower concentration)

What to do

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

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

D17 · Explicit Debt9.8 / 10Stronggated by 776 serious findings✓ Tool-verified

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

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

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

776 deducted task-comment markers across 666260 LoC (0.1/KLoC) → score 9.8. Task comments only: this repository's language is read without a compiler, so D17's suppression, dead-code and commented-out-code arms did not run and this score counts fewer marker kinds than a .NET repository's would.

TodoComment · ×762sui-execution/latest/sui-verifier/src/id_leak_verifier.rs:416
FixmeComment · ×8sui-execution/latest/sui-adapter/src/execution_engine.rs:421
HackComment · ×4crates/sui-types/src/object/rpc_visitor/mod.rs:190
XxxComment · ×2crates/transaction-fuzzer/src/account_universe/universe.rs:73

What to do

  1. Resolve the 762 TodoComment finding(s) in Explicit Debt — start with REDACTED (71), lib.rs (69), temporary_store.rs (23). — One of this dimension's main actionable groups (762 warning-level).
  2. Resolve the 8 FixmeComment finding(s) in Explicit Debt — start with execution_engine.rs (5), network_config_builder.rs, REDACTED. — One of this dimension's main actionable groups (8 warning-level).
  3. Resolve the 4 HackComment finding(s) in Explicit Debt — start with REDACTED (3), visitor.rs. — One of this dimension's main actionable groups (4 warning-level).
  4. Enforce Explicit Debt in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D19 · Documentation Quality10.0 / 10Exemplary○ Nothing flagged

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d19_recommendation.md.

D20 · ADR Quality0.0 / 10Critical✓ Tool-verified

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

Method: Per-ADR judgment by language model at low temperature with two-pass stability; confidence is share of ADRs evaluated; enforcement-field presence detected deterministically. Advisory.

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

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

ADR has no Decision sectionexternal-crates/move/crates/move-package/design/dvx-2115-address-identity.md:1detected by adr-integrity

What to do

  1. Resolve the 1 ADR has no Decision section finding(s) in ADR Quality — start with dvx-2115-address-identity.md. — One of this dimension's main actionable groups (1 recommendation-level).

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

D26 · Project Cohesion9.0 / 10Strong✓ Tool-verified

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

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

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

10 of 192 build units (Cargo, npm) flagged as possibly oversized/incoherent.

Projects may be oversized for their cohesion

What to do

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

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

D28 · Secrets (history)0.0 / 10Critical✓ Tool-verified

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

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

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

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

REDACTED
REDACTED

What to do

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

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

D29 · Static Analysis (SAST)0.1 / 10Critical✓ Tool-verified

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

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

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

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

59 finding(s): 0 critical, 50 high, 9 medium, 0 low. 27 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 15 file(s) — `crates/sui-config/src/test_gateway.yml`, `crates/sui-kvstore/src/bigtable/client/mod.rs` (line 3213), `crates/sui-light-client/test_files/20873329.yaml`, `external-crates/move/crates/move-analyzer/editors/code/scripts/create.sh` (line 61), `external-crates/move/crates/move-analyzer/editors/code/scripts/create_from_local.sh` (line 80, line 105), … (+10 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. Separately, one or more rules could not re-parse an embedded snippet in 13 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

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

What to do

  1. Resolve the 6 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (4), REDACTED, REDACTED. — One of this dimension's main actionable groups (6 issue-level).
  2. Resolve the 5 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (3), REDACTED, REDACTED. — One of this dimension's main actionable groups (5 issue-level).
  3. No action in Static Analysis (SAST) — all 27 REDACTED finding(s) are reported here at file:line but scored by D36 (supply-chain provenance), so none is charged to this dimension. — One of this dimension's main actionable groups (27 issue-level, 0 of them charged here).

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

D30 · Dependency Vulnerabilities0.0 / 10Critical✓ Tool-verified

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

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

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

134 finding(s): 0 critical, 58 high, 70 medium, 6 low.

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

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

What to do

  1. Resolve the 57 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (29), REDACTED (24), REDACTED (2). — One of this dimension's main actionable groups (57 issue-level).
  2. Resolve the 1 High vulnerability finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
  3. Resolve the 23 Medium CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (9), REDACTED (7), REDACTED (5). — One of this dimension's main actionable groups (23 warning-level).

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

D31 · IaC & Container Security0.0 / 10Critical✓ Tool-verified

What it measures: Whether Dockerfiles / Terraform / Kubernetes config follow security best practices.

Method: IaC/container misconfiguration scan via trivy config (REDACTED/Terraform/K8s/Helm/CloudFormation); severity rules to 0-10 moderate normalizer. NotApplicable without manifests. Exhaustive, deterministic.

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

110 finding(s): 0 critical, 46 high, 61 medium, 3 low.

REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 61 Medium IaC finding(s) in IaC & Container Security — start with REDACTED (37), REDACTED (22), REDACTED (2). — One of this dimension's main actionable groups (61 warning-level).
  2. Resolve the 46 High IaC finding(s) in IaC & Container Security — start with REDACTED (33), REDACTED (12), REDACTED. — One of this dimension's main actionable groups (46 issue-level).
  3. Resolve the 3 Low IaC finding(s) in IaC & Container Security — start with REDACTED (3). — One of this dimension's main actionable groups (3 recommendation-level).

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

D34 · Knowledge Freshness9.5 / 10Adequategated by 3 critical findings✓ Tool-verified

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

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

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

73 of 1458 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is crates/sui-bridge/src/monitor.rs. Counted over 1458 of the 1877 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Orphaned knowledge · ×3crates/sui-bridge/src/monitor.rs:1
Orphaned file · ×70crates/sui-types/src/bridge.rs:1
Further orphaned files (smaller)

What to do

  1. Resolve the 3 Orphaned knowledge finding(s) in Knowledge Freshness — start with monitor.rs, sui_transaction_builder.rs, bridge_authority_aggregator.rs. — One of this dimension's main actionable groups (3 issue-level).
  2. Resolve the 70 Orphaned file finding(s) in Knowledge Freshness — start with lib.rs (6), main.rs (4), metrics.rs (3). — One of this dimension's main actionable groups (70 recommendation-level).
  3. Resolve the 1 Further orphaned files (smaller) finding(s) in Knowledge Freshness. — One of this dimension's main actionable groups (1 recommendation-level).

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

D35 · Change Coupling9.7 / 10Adequategated by 9 critical findings✓ Tool-verified

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

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

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

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

Strongest change-coupling: execution_engine.rs↔execution_engine.rs 100%; execution_engine.rs↔execution_engine.rs 100%; execution_engine.rs↔execution_engine.rs 100%

Boundary-crossing change coupling: network_config_builder.rs ↔ v1.rs · ×9crates/sui-swarm-config/src/network_config_builder.rs:1
Change coupling: mem_store.rs ↔ rocksdb_store.rs · ×19consensus/core/src/storage/mem_store.rs:1
Change-coupling hub: execution_engine.rs → execution_engine.rs, execution_engine.rs, execution_engine.rs · ×9sui-execution/latest/sui-adapter/src/execution_engine.rs
Change coupling clique: list_checkpoints.rs, list_events.rs, list_transactions.rs, list_checkpoints.rs, list_transactions.rscrates/sui-kv-rpc/src/v2/list_checkpoints.rs

What to do

  1. Resolve the 9 Boundary-crossing change coupling finding(s) in Change Coupling — start with authority.rs (3), network_config_builder.rs (2), single_node.rs (2). — One of this dimension's main actionable groups (9 issue-level).
  2. Resolve the 19 Change coupling finding(s) in Change Coupling — start with translate.rs (2), mem_store.rs, observer.rs. — One of this dimension's main actionable groups (19 warning-level).
  3. Resolve the 9 Change-coupling hub finding(s) in Change Coupling — start with execution_engine.rs, test_network.rs, core.rs. — One of this dimension's main actionable groups (9 warning-level).

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

D36 · Supply-chain Provenance & Signing0.0 / 10Critical✓ Tool-verified

What it measures: Whether the build pipeline provides supply-chain integrity — generated provenance/attestation, signed artifacts (cosign/sigstore), an SBOM, and pinned build actions. Presence of the configuration, not a runtime guarantee.

Method: Supply-chain provenance/signing read deterministically from CI/build config (.github/workflows, .gitlab-ci.yml, azure-pipelines, Jenkinsfile, .circleci) + the release surface: four signals — generated provenance/attestation (SLSA/in-toto/actions-attest), artifact signing (cosign/sigstore/gitsign), an SBOM (syft/sbom-action/*.spdx.json/*.cdx.json), and SHA-pinned build actions — scored 10·present/denom. NotApplicable without a build pipeline. Detects configuration presence, not runtime enforcement.

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

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

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

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

What to do

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

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

D37 · Vulnerability-disclosure Policy10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether the repository publishes a coordinated-vulnerability-disclosure policy (SECURITY.md or security.txt) with a reporting contact, so finders know how to report a vulnerability. Presence of a policy file with a contact, not whether the policy is adequate or honoured.

Method: Vulnerability-disclosure policy read deterministically from the repo: a SECURITY.md (root/.github/docs) or .well-known/security.txt / security.txt, regex-checked for a reporting contact (email / URL / mailto). Present + contact → 10; present without a contact → 4; NotApplicable when no policy file exists (it may live off-repo). Detects the policy file's presence + contact, not its adequacy.

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

A vulnerability-disclosure policy (SECURITY.md) is published with a reporting contact.

✓ On the Gold path — maintain.

Detailed fixes: d37_recommendation.md.

D40 · Network Egress Confinement6.0 / 10Adequate✓ Tool-verified

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.

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

0/2 network-egress controls present (network policy, egress restriction).

No network policy

What to do

  1. Resolve the 1 No network policy finding(s) in Network Egress Confinement. — One of this dimension's main actionable groups (1 recommendation-level).

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

D41 · Kernel & Syscall Confinement6.0 / 10Adequate✓ Tool-verified

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.

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

0/1 workload(s) run every container under a seccomp profile; 0/1 declare an AppArmor/SELinux profile.

No seccomp profileREDACTED:28

What to do

  1. Resolve the 1 No seccomp profile finding(s) in Kernel & Syscall Confinement — start with REDACTED. — One of this dimension's main actionable groups (1 recommendation-level).

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

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

What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Scored 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. SCORED, not informational.

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

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

✓ On the Gold path — maintain.

Detailed fixes: d43_recommendation.md.

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d44_recommendation.md.

Frontend & cross-cutting dimensions

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

AX10 · Code composition9.5 / 10Exemplary✓ Tool-verified

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

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

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

What to do

  • The domain core is a small share of production code, but most of the rest matched no layer vocabulary at all — so this is not yet an anemic-domain finding. The namespace/path convention could not place that code, which makes the composition above a statement about the naming, not about the design. Name the layers (or check that the repository's conventions differ from the ones this check knows) before reading a thin domain into it.
AX3 · Project dependency cycles10.0 / 10Exemplary✓ Tool-verified

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

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

AX4 · Dependency direction5.7 / 10Adequate✓ Tool-verified

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

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

  • `consensus-core` is a Domain project but references `sui-macros`, a Web project. The clean-architecture rule is that dependencies point INWARD — the domain/application core must not depend on outer layers (infrastructure/web). Invert it: define the abstraction in the inner layer and implement it in the outer one.
  • `consensus-core` is a Domain project but references `sui-tls`, a Web project. The clean-architecture rule is that dependencies point INWARD — the domain/application core must not depend on outer layers (infrastructure/web). Invert it: define the abstraction in the inner layer and implement it in the outer one.
  • `sui-core` is a Domain project but references `sui-config`, a Web project. The clean-architecture rule is that dependencies point INWARD — the domain/application core must not depend on outer layers (infrastructure/web). Invert it: define the abstraction in the inner layer and implement it in the outer one.
  • `sui-core` is a Domain project but references `sui-consistent-store`, a Web project. The clean-architecture rule is that dependencies point INWARD — the domain/application core must not depend on outer layers (infrastructure/web). Invert it: define the abstraction in the inner layer and implement it in the outer one.
  • `sui-core` is a Domain project but references `sui-authority-aggregation`, a Web project. The clean-architecture rule is that dependencies point INWARD — the domain/application core must not depend on outer layers (infrastructure/web). Invert it: define the abstraction in the inner layer and implement it in the outer one.
  • `sui-core` is a Domain project but references `sui-execution`, a Web project. The clean-architecture rule is that dependencies point INWARD — the domain/application core must not depend on outer layers (infrastructure/web). Invert it: define the abstraction in the inner layer and implement it in the outer one.
  • `sui-core` is a Domain project but references `sui-framework`, a Web project. The clean-architecture rule is that dependencies point INWARD — the domain/application core must not depend on outer layers (infrastructure/web). Invert it: define the abstraction in the inner layer and implement it in the outer one.
  • `sui-core` is a Domain project but references `sui-swarm-config`, a Web project. The clean-architecture rule is that dependencies point INWARD — the domain/application core must not depend on outer layers (infrastructure/web). Invert it: define the abstraction in the inner layer and implement it in the outer one.
  • `sui-core` is a Domain project but references `sui-genesis-builder`, a Web project. The clean-architecture rule is that dependencies point INWARD — the domain/application core must not depend on outer layers (infrastructure/web). Invert it: define the abstraction in the inner layer and implement it in the outer one.
  • `sui-core` is a Domain project but references `sui-indexer-alt-framework`, a Web project. The clean-architecture rule is that dependencies point INWARD — the domain/application core must not depend on outer layers (infrastructure/web). Invert it: define the abstraction in the inner layer and implement it in the outer one.
  • `sui-core` is a Domain project but references `sui-macros`, a Web project. The clean-architecture rule is that dependencies point INWARD — the domain/application core must not depend on outer layers (infrastructure/web). Invert it: define the abstraction in the inner layer and implement it in the outer one.
  • `sui-core` is a Domain project but references `sui-network`, a Web project. The clean-architecture rule is that dependencies point INWARD — the domain/application core must not depend on outer layers (infrastructure/web). Invert it: define the abstraction in the inner layer and implement it in the outer one.
  • `sui-core` is a Domain project but references `sui-protocol-config`, a Web project. The clean-architecture rule is that dependencies point INWARD — the domain/application core must not depend on outer layers (infrastructure/web). Invert it: define the abstraction in the inner layer and implement it in the outer one.
  • `sui-core` is a Domain project but references `sui-rpc-store`, a Web project. The clean-architecture rule is that dependencies point INWARD — the domain/application core must not depend on outer layers (infrastructure/web). Invert it: define the abstraction in the inner layer and implement it in the outer one.
  • `sui-core` is a Domain project but references `sui-transaction-checks`, a Web project. The clean-architecture rule is that dependencies point INWARD — the domain/application core must not depend on outer layers (infrastructure/web). Invert it: define the abstraction in the inner layer and implement it in the outer one.
  • `sui-core` is a Domain project but references `sui-simulator`, a Web project. The clean-architecture rule is that dependencies point INWARD — the domain/application core must not depend on outer layers (infrastructure/web). Invert it: define the abstraction in the inner layer and implement it in the outer one.
  • `sui-core` is a Domain project but references `sui-storage`, a Web project. The clean-architecture rule is that dependencies point INWARD — the domain/application core must not depend on outer layers (infrastructure/web). Invert it: define the abstraction in the inner layer and implement it in the outer one.
  • `sui-core` is a Domain project but references `sui-tls`, a Web project. The clean-architecture rule is that dependencies point INWARD — the domain/application core must not depend on outer layers (infrastructure/web). Invert it: define the abstraction in the inner layer and implement it in the outer one.
  • `sui-core` is a Domain project but references `sui-types`, a Web project. The clean-architecture rule is that dependencies point INWARD — the domain/application core must not depend on outer layers (infrastructure/web). Invert it: define the abstraction in the inner layer and implement it in the outer one.
  • `sui-data-ingestion-core` is a Domain project but references `sui-types`, a Web project. The clean-architecture rule is that dependencies point INWARD — the domain/application core must not depend on outer layers (infrastructure/web). Invert it: define the abstraction in the inner layer and implement it in the outer one.
  • `sui-data-ingestion-core` is a Domain project but references `sui-protocol-config`, a Web project. The clean-architecture rule is that dependencies point INWARD — the domain/application core must not depend on outer layers (infrastructure/web). Invert it: define the abstraction in the inner layer and implement it in the outer one.
  • `sui-data-ingestion-core` is a Domain project but references `sui-rpc-api`, a Web project. The clean-architecture rule is that dependencies point INWARD — the domain/application core must not depend on outer layers (infrastructure/web). Invert it: define the abstraction in the inner layer and implement it in the outer one.

What to do

  • Keep dependencies pointing inward: domain/application define interfaces, infrastructure/web implement them (Dependency Inversion).
AX8 · Test isolation0.0 / 10Critical✓ 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.

  • `move-cli` (production) references the test project `move-unit-test`. Production must never depend on test code — it pulls a unit-test framework and test fixtures into the shipped product and inverts the only correct direction (tests depend on production, never the reverse). Move any shared helper into a production support library, or invert the reference.
  • `sui` (production) references the test project `test-cluster`. Production must never depend on test code — it pulls a unit-test framework and test fixtures into the shipped product and inverts the only correct direction (tests depend on production, never the reverse). Move any shared helper into a production support library, or invert the reference.
  • `sui-benchmark` (production) references the test project `sui-test-transaction-builder`. Production must never depend on test code — it pulls a unit-test framework and test fixtures into the shipped product and inverts the only correct direction (tests depend on production, never the reverse). Move any shared helper into a production support library, or invert the reference.
  • `sui-benchmark` (production) references the test project `test-cluster`. Production must never depend on test code — it pulls a unit-test framework and test fixtures into the shipped product and inverts the only correct direction (tests depend on production, never the reverse). Move any shared helper into a production support library, or invert the reference.
  • `sui-bridge` (production) references the test project `sui-test-transaction-builder`. Production must never depend on test code — it pulls a unit-test framework and test fixtures into the shipped product and inverts the only correct direction (tests depend on production, never the reverse). Move any shared helper into a production support library, or invert the reference.
  • `sui-bridge` (production) references the test project `test-cluster`. Production must never depend on test code — it pulls a unit-test framework and test fixtures into the shipped product and inverts the only correct direction (tests depend on production, never the reverse). Move any shared helper into a production support library, or invert the reference.
  • `sui-move` (production) references the test project `move-unit-test`. Production must never depend on test code — it pulls a unit-test framework and test fixtures into the shipped product and inverts the only correct direction (tests depend on production, never the reverse). Move any shared helper into a production support library, or invert the reference.
  • `sui-single-node-benchmark` (production) references the test project `sui-test-transaction-builder`. Production must never depend on test code — it pulls a unit-test framework and test fixtures into the shipped product and inverts the only correct direction (tests depend on production, never the reverse). Move any shared helper into a production support library, or invert the reference.
  • `sui-surfer` (production) references the test project `test-cluster`. Production must never depend on test code — it pulls a unit-test framework and test fixtures into the shipped product and inverts the only correct direction (tests depend on production, never the reverse). Move any shared helper into a production support library, or invert the reference.
  • `sui-synthetic-ingestion` (production) references the test project `sui-test-transaction-builder`. Production must never depend on test code — it pulls a unit-test framework and test fixtures into the shipped product and inverts the only correct direction (tests depend on production, never the reverse). Move any shared helper into a production support library, or invert the reference.

What to do

  • Remove every production → test project reference: extract any shared test helper into a production support library (which the tests reference), or invert the dependency so the test project depends on production — not the reverse.
AX9 · CQS / query purity10.0 / 10Exemplary✓ Tool-verified

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

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

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

  • `PgReader.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. — crates/sui-indexer-alt-reader/src/pg_reader.rs:24

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.
C2 · Access Controls7.0 / 10Strong✓ Tool-verified

Other · Security — Whether access is authorized by default — a framework authorization attribute/decorator or policy, or imperative guard methods (throw-on-violation) called from handlers.

Method: Roslyn scan: [Authorize] usage and authorization policies, plus imperative throw-on-violation guard methods detected via syntax. Deterministic.

  • Authorization IS enforced here (by route guards, auth middleware or checks that refuse a caller) — this is NOT a claim that endpoints are unprotected. What's missing is a NAMED rule set: who may do what is encoded inline where it is checked, so the rules can't be listed, reviewed or tested apart from the code that applies them. Recommendation, not a defect.

What to do

  • Name the access rules — roles and permissions declared once (an enum Role/Permission, actix-web-grants #[protect(…)], axum-login's permission_required!, a casbin or oso policy) and consulted where access is checked, so the rule set is reviewable and testable on its own.
DM4 · Rich vs anemic domain model10.0 / 10Exemplary✓ Tool-verified

Other · Domain Modelling — Whether domain entities own their behaviour (invariant-enforcing commands) rather than being data-only structs driven by a foreign service.

Method: Roslyn (DDD-gated): entity method BODIES classified mutator-vs-query — only methods that mutate the entity's own declared state count as invariant-protecting behaviour, so a getter/passthrough doesn't rescue an anemic class. Deterministic, exhaustive over domain-layer entities.

Coverage: Population: entities by name/base convention; rich-vs-anemic judged by classifying each method body mutator-vs-query — logic-bearing domain types outside the convention are invisible.

DM5 · Encapsulated state10.0 / 10Exemplary✓ Tool-verified

Other · Domain Modelling — Whether a domain type's identity-bearing field stays immutable — a `pub` mutable field under a hand-rolled Hash/PartialEq breaks the value-identity invariant.

Method: Roslyn (DDD-gated): entities scanned for publicly writable state — public setters, and (C#/VB) own mutable collections handed out through an auto-property, a public field or a bare-field expression getter, where a computed/copying getter is never charged. One finding per entity; score softened when Marten/EF rehydration frameworks present. Deterministic, framework-aware.

Coverage: Population: entities by convention; encapsulation (setter shape) checked exhaustively within the set.

DM6 · Domain ↔ infrastructure boundary10.0 / 10Exemplary✓ Tool-verified

Other · Domain Modelling — Whether the domain layer stays free of infrastructure dependencies — a domain aggregate fused to a persistence ORM (diesel/sea-orm/sqlx) on its own declaration (active-record) couples the domain to infrastructure. The clean-architecture dependency rule.

Method: Roslyn (DDD-gated): domain-layer types scanned for infrastructure usage in member SIGNATURES and inside method/accessor BODIES — resolved calls and object-creations into EF/Marten/HTTP/Mongo/Redis/message-bus types (not just a namespace allowlist). Deterministic, symbol-resolved, exhaustive over domain-layer bodies, DDD-native.

Coverage: Domain layer identified by NAMESPACE heuristic; infrastructure then resolved by symbol in member SIGNATURES and method/accessor BODIES — rename the layer and the check evaporates.

ES1 · Fold determinism10.0 / 10Exemplary✓ Tool-verified

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.

ES2 · Immutable events10.0 / 10Exemplary✓ Tool-verified

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.

M1 · Documentation (README)7.2 / 10Strong✓ Tool-verified

Maturity · Maturity — Whether the repo and its projects have a README, and whether it's substantive and current.

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

What to do

  • Add a build/run (quick start) section to the root README — the first thing a newcomer needs.
  • Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
  • Add a README to the 111 of 154 project(s) that lack one — worth up to 1.4 pts.
M2 · Architecture documentation7.0 / 10Strong✓ Tool-verified

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

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

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

What to do

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

Maturity · Maturity — Whether the repo is organised deliberately — src/test separation and consistent project naming.

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

M4 · Documentation accuracy3.1 / 10Weak✓ Tool-verified

Maturity · Maturity — Whether the README actually describes the code that exists (LLM-judged, advisory).

Method: Judged by language model at low temperature: README accuracy versus actual projects, within a disclosed tolerance. Advisory, not a measured number.

  • crates/sui-types/src/README.md links to `signature_seed.rs`, but `crates/sui-types/src/signature_seed.rs` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — crates/sui-types/src/README.md:14
  • crates/sui-types/src/README.md links to `messages.rs`, but `crates/sui-types/src/messages.rs` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — crates/sui-types/src/README.md:17
  • external-crates/move/crates/move-docgen/README.md links to `../doc/user/docgen.md`, but `external-crates/move/crates/doc/user/docgen.md` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — external-crates/move/crates/move-docgen/README.md:1
  • external-crates/move/crates/move-unit-test/README.md links to `../../move-compiler/src/unit_test/mod.rs`, but `external-crates/move/move-compiler/src/unit_test/mod.rs` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — external-crates/move/crates/move-unit-test/README.md:19

What to do

  • Reconcile the README with reality: crates/sui-types/src/README.md links to `signature_seed.rs`, but `crates/sui-types/src/signature_seed.rs` does not exist; crates/sui-types/src/README.md links to `messages.rs`, but `crates/sui-types/src/messages.rs` does not exist; external-crates/move/crates/move-docgen/README.md links to `../doc/user/docgen.md`, but `external-crates/move/crates/doc/user/docgen.md` does not exist; external-crates/move/crates/move-unit-test/README.md links to `../../move-compiler/src/unit_test/mod.rs`, but `external-crates/move/move-compiler/src/unit_test/mod.rs` does not exist.
P1 · CI/CD gates10.0 / 10Exemplary○ Nothing flagged

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

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

P10 · Library API & versioning10.0 / 10Exemplary○ Nothing flagged

Readiness · Readiness — For a library: a deliberate (small) public API surface and explicit semantic versioning so consumers can depend on it safely.

Method: Roslyn scan: public API surface area and semantic-versioning markers (SemVer attributes, changelog entries) for libraries; off .NET, a library is the ecosystem's publication act (an npm package that is not private and names an entry point, a PyPI distribution with a build system, a Rust library crate, a Maven/Gradle module that publishes, a Go module with no package main, a gemspec, a Composer library, a SwiftPM library product, a pub.dev or Hex package), its surface is the share of types the language 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.

P2 · Observability9.7 / 10Exemplary✓ Tool-verified

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

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

  • Only 83/93 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `consensus/config`, `crates/anemo-benchmark`, `crates/sui-framework-snapshot`, `crates/sui-move-lsp`, `crates/sui-test-validator` and 5 more.

What to do

  • Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.
P3 · Security & performance tooling8.0 / 10Strong✓ Tool-verified

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

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

What to do

  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P4 · Deployment & Rollback7.0 / 10Strong✓ Tool-verified

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

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

  • Deployment automation exists but no readiness/liveness probes, rolling-update strategy, lifecycle hooks or migration job were evidenced — a bad release is harder to detect and reverse.

What to do

  • Add readiness/liveness probes and a rolling-update (or blue/green) strategy so a bad release is caught and rolled back automatically.
P5 · DR & Backup0.0 / 10Critical✓ 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.

  • A persistence guard (data volume / purge-protection) was found, but no backup, geo-recovery or RTO/RPO controls were evidenced — a volume that survives a container recreate is not a tested restore from catastrophic loss.

What to do

  • Codify backups + geo-recovery in IaC and document RTO/RPO and the restore procedure — a persistence guard alone is not disaster recovery.
P6 · Release Hygiene10.0 / 10Exemplary✓ Tool-verified

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

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

P7 · Outbound HTTP resilience3.0 / 10Weak✓ Tool-verified

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

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

  • `reqwest::Client::new(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. (×10) — crates/sui-bridge/src/utils.rs:488, crates/sui-core/src/traffic_controller/nodefw_client.rs:27, crates/sui-light-client/src/graphql.rs:17, …
  • `reqwest::Client::builder(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. — crates/sui-package-dump/src/client.rs:18
  • `ureq::get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. (×2) — crates/sui-source-verification/src/binary.rs:227, crates/sui-source-verification/src/binary.rs:234
  • `ClientBuilder::new()` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. (×2) — crates/sui-storage/src/object_store/http/gcs.rs:25, crates/sui-storage/src/object_store/http/s3.rs:25
  • `reqwest::get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. — crates/sui-telemetry/src/lib.rs:78
  • `Client::new()` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. — crates/sui/src/zklogin_commands_util.rs:53

What to do

  • Give every client a whole-request bound: `reqwest::Client::builder().timeout(Duration::from_secs(10))` (never `reqwest::get` or `Client::new()`, which have none), ureq's `timeout_global`, or wrap the call in `tokio::time::timeout`; add retry with back-off (`reqwest-retry`'s `RetryTransientMiddleware`, `backoff`) around dependencies that fail.
P8 · Schema migrations10.0 / 10Exemplary○ Nothing flagged

Readiness · Readiness — Whether database schema changes go through versioned migrations rather than being auto-created from the model at startup.

Method: Roslyn scan: EF Core DbContext for a versioned migrations directory versus bare EnsureCreated usage; off .NET, a file scan of dependency manifests, migration histories (Flyway, Liquibase, Alembic, Django, Rails, Prisma, TypeORM, Knex/Sequelize, golang-migrate, goose, Laravel, Doctrine, Diesel/sqlx) and schema auto-create in production source or config. Exhaustive, deterministic.

PF1 · Benchmark discipline9.0 / 10Exemplary✓ Tool-verified

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

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

PF3 · Async & latency hygiene6.0 / 10Adequate✓ Tool-verified

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

Method: Production-source scan: sync-over-async blocking counted everywhere — .Wait()/.GetAwaiter().GetResult() in .NET; off .NET, read from the language 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.

  • `spawn` is async and calls block_on — a blocking call inside async code stalls the executor thread, and every task scheduled on it for as long as it runs. — crates/sui-swarm/src/memory/container.rs:43
  • `execSync` in `publishPackage` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — examples/trading/api/sui-utils.ts:79
  • `writeFileSync` in `publishPackage` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — examples/trading/api/sui-utils.ts:98
  • `childProcess.spawnSync` in `serverVersion` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — external-crates/move/crates/move-analyzer/editors/code/src/main.ts:21
  • `fs.readdirSync` in `containsManifest` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×3) — external-crates/move/crates/move-analyzer/editors/code/src/main.ts:57, external-crates/move/crates/move-analyzer/trace-adapter/src/runtime.ts:1931, external-crates/move/crates/move-analyzer/trace-debug/src/extension.ts:540
  • `childProcess.spawnSync` in `suiMoveCmd` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — external-crates/move/crates/move-analyzer/editors/code/src/main.ts:79
  • `childProcess.spawnSync` in `activate` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — external-crates/move/crates/move-analyzer/editors/code/src/main.ts:171
  • `fs.readdirSync` in `start` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — external-crates/move/crates/move-analyzer/trace-adapter/src/runtime.ts:478
  • `fs.statSync` in `callback to extRootContents.filter` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — external-crates/move/crates/move-analyzer/trace-adapter/src/runtime.ts:481
  • `fs.existsSync` in `start` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×3) — external-crates/move/crates/move-analyzer/trace-adapter/src/runtime.ts:499, external-crates/move/crates/move-analyzer/trace-adapter/src/runtime.ts:560, external-crates/move/crates/move-analyzer/trace-adapter/src/runtime.ts:572
  • `fs.readFileSync` in `readTrace` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — external-crates/move/crates/move-analyzer/trace-adapter/src/trace_utils.ts:557
  • `fs.existsSync` in `prepareSourceDir` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — external-crates/move/crates/move-analyzer/trace-debug/src/add_source.ts:303
  • `fs.readdirSync` in `prepareSourceDir` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — external-crates/move/crates/move-analyzer/trace-debug/src/add_source.ts:303
  • `fs.rmSync` in `prepareSourceDir` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — external-crates/move/crates/move-analyzer/trace-debug/src/add_source.ts:313
  • `fs.mkdirSync` in `prepareSourceDir` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — external-crates/move/crates/move-analyzer/trace-debug/src/add_source.ts:315
  • `fs.cpSync` in `addSourceToTrace` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — external-crates/move/crates/move-analyzer/trace-debug/src/add_source.ts:384
  • `fs.rmSync` in `addSourceToTrace` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — external-crates/move/crates/move-analyzer/trace-debug/src/add_source.ts:389

What to do

  • Rust: `.await` the future instead of `block_on` (on a Tokio runtime thread it panics outright) and use `tokio::time::sleep(..).await` instead of `std::thread::sleep`; where synchronous code must run, move it to `tokio::task::spawn_blocking` or `block_in_place`.
  • TypeScript/JavaScript: use the promise APIs (fs/promises, a promisified child_process.execFile, the async zlib/crypto functions) and await them instead of the *Sync variants.
S1 · Web-Security Posture6.0 / 10Adequate✓ Tool-verified

Other · Security — Read from this repository's Rust source: cryptographic hygiene (weak hash or cipher, key material fixed in the source) and outbound TLS (certificate validation, protocol version) — facts about code that hold whether or not it serves anything itself. Markup this repository SHIPS is scored for third-party script integrity whether or not the repository serves it itself, since a page handed to a consumer runs in that consumer’s origin. This repository serves HTTP itself (`axum::serve(` (crates/sui-rpc-api/src/lib.rs:331)), so its Rust source was also read for the server controls: TLS served or HSTS set, security response headers, cookie flags and inbound validation — each credited where its Rust spelling appears in production source, not proven on every route. A Rocket 0.5 application is credited the headers Rocket's default `Shield` sends unless it attaches its own, and its cookie jar's SameSite=Strict default; a session middleware its default cookie flags.

Method: Roslyn plus filesystem scan: HSTS/security headers, secure cookies, input validation, middleware order, weak crypto (MD5/SHA1/DES); HTTPS-metadata context-aware. On a repository with no .NET source it reads JavaScript/TypeScript, Dart, Ruby, Scala, Rust or Elixir source itself (test, vendored, generated and minified paths not) for the arms that hold whether or not the code serves HTTP: a weak hash or cipher, key material fixed in the source, a TLS client that accepts any certificate, and (JavaScript/TypeScript, Ruby, Scala, Rust and Elixir) an obsolete TLS version; the server controls are not assessed there, and a Dart, Ruby, Scala, Rust or Elixir repository that serves no HTTP of its own is N/A on them. Deterministic.

  • `https://unpkg.com/react@18.3.1/umd/react.production.min.js` is executed by this page with no Subresource Integrity. Whoever can answer that request — the CDN, anyone who compromises it, anyone on the network path — runs arbitrary script in this page's origin, with its session. 4 such include(s) across the repository's markup. — crates/sui-indexer-alt-graphql/assets/graphiql.html:10
  • None of the 11 security response headers the OWASP Secure Headers Project recommends (Content-Security-Policy, Strict-Transport-Security, X-Content-Type-Options, X-Frame-Options, …) is set on a response this repository's Rust server sends — defense in depth, even when a proxy could set them. (−2.0 on this card.) The server: `axum::serve(` (crates/sui-rpc-api/src/lib.rs:331).

What to do

  • Pin third-party scripts and verify them: name an exact version in the URL and add an `integrity="sha384-…"` hash alongside `crossorigin="anonymous"` (both are required — an integrity hash on a cross-origin script without `crossorigin` is not evaluated, it blocks the script). Where the vendor ships a continuously-updated loader and publishes no stable hash (tag managers, analytics, chat widgets), Subresource Integrity is not available: constrain it instead with a `Content-Security-Policy` that names the exact origins allowed to execute, and drop the script from the pages that do not need it. Where the page is shipped inside a package that others host, prefer vendoring the asset and serving it from the app’s own origin, so no consumer inherits a third-party dependency they did not choose.
  • Set security response headers on what the server sends — actix-web's `DefaultHeaders::new().add((header::X_CONTENT_TYPE_OPTIONS, "nosniff"))`, tower-http's `SetResponseHeaderLayer::overriding(…)` on an axum router, or keep Rocket's default `Shield` — with `Content-Security-Policy`, `X-Content-Type-Options` and a frame policy on every response.
X1 · Async correctness8.0 / 10Strong✓ Tool-verified

Other · Code Health — Whether the code avoids sync-over-async (deadlock-prone blocking on tasks) and async void.

Method: Roslyn syntax scan: async methods scanned for .Wait()/.GetAwaiter().GetResult() and async-void outside event handlers. Deterministic, hard fact per invocation.

  • This `async` body is polled on an executor's worker thread, and `std::thread::sleep` blocks that thread: for the whole delay no other task scheduled on it makes progress — the Rust form of blocking on a task. Use `tokio::time::sleep(…).await` (or the runtime's own timer), which suspends only this task. Where the blocking work is not a sleep but a synchronous call that cannot be made async, move it off the executor with `tokio::task::spawn_blocking(…).await`. — crates/sui/src/zklogin_commands_util.rs:125

What to do

  • Blocking `sleep` inside an `async` body
X12 · Unreachable branch10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether any branch is dead by construction — a switch arm whose label can never equal a case-normalised subject, or an `else if` whose predicate the arm above has already swallowed.

Method: Roslyn syntax + semantics: switch labels compared against the subject's own case normaliser, and if/else-if chains checked for a literal an earlier arm's containment test already swallows. Deterministic, provable per finding. Advisory.

X13 · Undrained process stream10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a child process that has BOTH standard streams redirected drains both — reading one to the end while the other is never read deadlocks once the child fills the unread pipe.

Method: Roslyn syntax + semantics: ProcessStartInfo launches with both streams redirected, checked for a drain of each stream across the enclosing type. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `spawn` imported from `child_process` whose stdout and stderr are both pipes (no options, no `stdio`, or `stdio` of `'pipe'`), bound to a local that never leaves its scope, where exactly one of the two streams is read, the other never, and the child’s `close`/`exit` (or the read stream’s end) is awaited; a shell redirect in the call’s arguments or a `kill` of the child suppresses it. The same rule reads Python’s `subprocess.Popen`, Dart’s `Process.start`, Ruby’s `Open3.popen3`, and Scala’s JDK process starts (`new ProcessBuilder(…).start()` with no `redirectErrorStream`/`redirectError`/`redirectOutput`/`inheritIO`, `Runtime.getRuntime.exec`) where one of `getInputStream`/`getErrorStream` is read and the other never while `waitFor()` is called or the read stream is read to its end. Deterministic, provable per finding. Advisory.

X14 · Bypassable address classification10.0 / 10Exemplary○ Nothing flagged

Other · Security — Whether a hand-rolled public/private IP check can be walked past — a method that unwraps IPv4-mapped IPv6 but returns the opposite verdict for the same host written as IPv4-compatible, 6to4 or NAT64.

Method: Roslyn syntax + semantics: methods that unwrap IPv4-mapped IPv6 and hand-roll IPv4 range carve-outs, checked for whether the IPv6 branch also accounts for the IPv4-compatible, 6to4 and NAT64 embeddings. Deterministic, provable per finding. Advisory.

X15 · Unvalidated length from an untrusted reader10.0 / 10Exemplary○ Nothing flagged

Other · Security — Whether a length read out of the stream being parsed is bounded before it is allocated or read — an unchecked count taken from the input lets the input choose the allocation.

Method: Roslyn syntax + semantics: integer lengths read from a BinaryReader and spent on a bulk read or an array allocation, checked for any comparison or bounding call on the value anywhere in the method. Deterministic, provable per finding. Advisory.

X16 · Unfloored truncation loop10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a loop that shortens a string until it fits a length budget has a floor — one with none grinds the value down to the empty string, or past it into a negative-length `Substring`.

Method: Roslyn syntax + semantics: while/do loops whose body's only effect on a string is to drop its last character, checked for whether anything — a direct comparison on the length, a body guard, a break — bounds that length below. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `while`/`do` loop whose body’s one assignment to a value is `x = x.slice(0, -1)` or `x = x.slice|substring|substr(0, x.length - 1)`, driven by a condition that reads `x.length` only as a term of a larger expression — never compared directly, never tested for truthiness, and with no other read of `x` — and whose body has no `break`, `return`, `throw` or `if` naming `x`. Deterministic, provable per finding. Advisory.

X17 · Uncapped recursion over a caller-supplied document10.0 / 10Exemplary○ Nothing flagged

Other · Security — Whether a walk that recurses through a JSON/XML tree handed in by its caller bounds how deep it will go — an uncapped walk lets the document's nesting choose the stack depth, and the resulting StackOverflowException cannot be caught.

Method: Roslyn syntax + semantics: methods that take a JSON/XML document node and call themselves with a child of it, reachable from an externally-callable member of the same type that accepts a document, checked for any depth parameter, descent counter or threaded arithmetic anywhere in the walk. On a repository with no .NET source it reads TypeScript off the engine’s own token stream (test, vendored, generated and minified paths and `.d.ts` not) with the same rule: a function or method with a parameter typed as a document value — `unknown`, `any`, `object`, `Record<string, unknown|any>`, a JSON alias (`JsonValue`, `JSONObject`, …) or a DOM node global the file does not rebind — that calls itself (bare, or through `this` for a method, or hands itself to a call over the value as in `value.map(walk)`) with something it took out of that value and never through an ancestor accessor such as `closest()` or `parentElement`, that is exported or reached from an exported function (a public method of the same exported class) taking such a value, and that names no depth, level, nesting, recursion, remaining or budget anywhere and threads no `+`/`-` arithmetic through a self-call. Plain JavaScript is not read: with no annotation nothing tells a parsed document from a tree the code built itself. Deterministic, provable per finding. Advisory.

X18 · Disposal-pattern correctness10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a type's disposal matches what it OWNS — releasing what it created, leaving alone what it was handed, and not declaring a finalizer for state that has nothing unmanaged to finalize.

Method: Roslyn syntax + semantics: every assignment to a disposable field is read to decide whether the type CREATED the value or was handed it, and the type's disposal is checked against that answer — an injected interface it disposes, a value it constructed and never releases, a finalizer on a type holding nothing unmanaged, and a disposable local whose every reference is a plain member read. A value handed to a container that disposes its contents (a parent control's `Controls` collection, a component `IContainer`) is released by that container and is not reported; generated code is out of population. On a repository with no .NET source the same ownership questions are read in JavaScript/TypeScript off the engine’s own token stream (test, vendored, generated and minified paths not): a class declaring `dispose()`, `[Symbol.dispose]()` or `[Symbol.asyncDispose]()` that disposes a field it was handed through a constructor parameter typed as a repository interface or resolved by a dependency-injection container; that assigns a field only ever from `new X(…)` of a disposable class and neither releases it anywhere in the class nor names it in its disposal member or a method that member calls, nor hands it to anything else; and a `const`/`let` local built from literals only whose every reference opens a statement operating on a non-release member of it. A class is disposable when every repository declaration of its name declares or inherits a disposal member, or when it is a documented library disposable (`vscode` EventEmitter, CancellationTokenSource and Disposable; three.js geometries, materials, textures, render targets, renderers, controls and composers). The finalizer arm has no JavaScript counterpart: a class cannot declare one. Dart is read for the owned-and-never-released arm: a Flutter `State` (or a class declaring `dispose()`/`close()`) whose library-private field is written only with direct creations of a framework controller, `FocusNode`, `StreamController` or periodic `Timer` (or a `.listen(…)` into a field declared `StreamSubscription`), which nothing in the class or its library releases (`dispose`/`close`/`cancel`) and which is never handed on except as a named argument. Ruby is read for the owned-and-never-released arm and the abandoned-local arm: a class declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose instance variable is written only with a blockless core descriptor creation (`File.open`/`new`, `Tempfile`, `Dir.open`, `IO.popen`, the `socket` and `openssl` socket classes) that no method of the class closes and that is never handed on (passed, returned, stored, exposed by `attr_reader`, delegated) — a class whose superclass or mixin lies outside the repository is not judged — and a blockless creation read through and dropped (`File.open(path).read`) or held in a local that is never closed, returned, passed or stored (a `&:read` block-pass, an `autoclose: false` borrow and a `fileno` hand-over are not abandonment). PHP is read for the same two arms: a class (not a trait, and not one using a trait) declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose `private` property (or a `final` class's `protected` one) is written only with a direct core `fopen`, `tmpfile`, `popen`, `proc_open`, `fsockopen`, `stream_socket_client`/`server` or `opendir` that nothing in the class closes (`fclose`, `pclose`, `closedir`, `unset`, a reset to `null`) and that is never handed on, and a handle held in a function's local, or read through as the argument of a reader, that is never closed, returned, passed, captured or stored; a `php://` stream, `curl_init`, `SplFileObject`, `PDO` and a function the repository declares under the core name are not read. Deterministic, provable per finding. Advisory.

X19 · Unrestored process-global state10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a method that temporarily changes state belonging to the whole process — the working directory, an environment variable — puts it back on EVERY path: a restore reached only when nothing throws leaks the change to the rest of the process.

Method: Roslyn syntax + semantics: method bodies that write the process working directory or an environment variable and write it back in the same body, checked for whether that restore sits in a `finally`/`catch` or only on the straight-line path. On a repository with no .NET source the same rule reads production JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not): `process.chdir`, `process.env.NAME =`/`["NAME"] =` and `delete process.env.NAME`, and Deno’s `Deno.chdir`/`Deno.env.set`/`Deno.env.delete`, paired per function body (a nested function or arrow is its own body, and module top-level code is none), where the last write puts back a local the body captured from the same global or deletes a variable the first write set, with at least one statement between them; a write in a `catch`/`finally` of that body silences it. Deterministic, provable per finding. Advisory.

X21 · Side-effecting pattern guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a `when` guard is free of side effects — a guard that increments a counter or assigns while deciding whether its arm matches applies that change during PATTERN MATCHING, on an arm that may not be selected, and skips it entirely when a short-circuit to its left answers first.

Method: Roslyn syntax: `when` guards on case labels and switch-expression arms, read for a mutation (`++`/`--`/assignment) sitting in a position the guard's own `&&`/`||`/`??`/`?:`/`?.` can skip. Deterministic, provable per finding. Advisory.

X22 · Contradicted release guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a method that TAKES a lock or semaphore and gives it back from a flag-guarded `finally` returns the value that flag implies — reporting success while the guard hands the primitive back admits a second caller the exclusion was there to keep out, and reporting failure while the guard keeps it leaves nothing to ever give it back.

Method: Roslyn syntax: `try` statements whose `finally` releases a synchronisation primitive under a bare local-bool guard, where the method also TOOK that same primitive before the `try`, checked for a `return` of a bool literal whose value disagrees with the flag state the method's own straight-line assignments put it in. Deterministic, provable per finding. Advisory.

X23 · Unguarded diagnostic materialisation10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether the work a diagnostic log line costs is paid only when that line is wanted — C# evaluates a call's arguments BEFORE the call, so a trace/debug message joined or projected out of a collection is built in full on every pass, and then discarded by a sink the shipped configuration leaves switched off.

Method: Roslyn syntax: log calls at a diagnostic level (a `Log`-prefixed method naming Trace/Debug/Verbose, or a bare `Debug`/`Trace`/`Verbose` on a receiver named for a logger), whose argument list is read for a call whose cost scales with a sequence — a LINQ operator, a materialisation, `string.Join`, a serializer — with no enclosing level check or conditional-compilation region. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `debug`/`trace`/`verbose` call on a receiver named for a logger, or a `log`-prefixed method naming the level, whose argument calls an array operator (`map`/`filter`/`reduce`/`sort`/…), `Array.from`, `Object.keys/values/entries`, `JSON.stringify`/`util.inspect` over anything but a literal, or an array `join` — outside any arrow or function passed as an argument, which the logger calls only when the level is on — with no enclosing `if`, `&&` or `?:` whose condition names a level, a level string, or the `NODE_ENV`/`__DEV__`/`DEV` build switch. Deterministic, provable per finding. Advisory.

X24 · Document value interpolated into markup unescaped10.0 / 10Exemplary○ Nothing flagged

Other · Security — Whether text read out of the document being converted is escaped before it is written into generated markup — a value the document's author chose, interpolated into an attribute the surrounding literal delimits, can close that attribute and open another.

Method: Roslyn semantic model over the whole compilation: a string-typed `Value`/`InnerText`/`InnerXml`/`Text` member declared inside `DocumentFormat.OpenXml` or `System.Xml` is a taint SOURCE, propagated through assignments, returns, arguments, tuple elements and string composition to its transitive closure, then read at interpolated-string holes that sit in a markup position the surrounding literal itself delimits. Escaper/encoder calls and enclosing validator conditions cut the flow. Flow- and container-insensitive by construction. A second arm needs no provenance at all and reports a type that CONTRADICTS ITSELF — the same expression escaped at one delimited markup hole and interpolated raw at another hole in the same markup position of the same type, which the type's own escaping proves is a defect without knowing where the value came from. On a repository with no .NET source it reads JavaScript/TypeScript off the token stream with the same rule: a DOM read of raw document text (`getAttribute`, `textContent`, `innerText`, `nodeValue`) is the source, propagated through local bindings and string composition, and judged at template-literal and concatenation holes in the same two delimited markup positions; escapers and validating conditions cut it, and documentation-site, test, vendored and minified scripts are not read. Deterministic, provable per finding. Advisory.

X25 · Inert configuration knob10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a value the caller is invited to supply is the value the type actually uses — a constructor parameter stored in a private field that nothing ever reads while the default it was given is spelled out a second time at the site that should have read it, a keyed lookup that falls back to a different setting than the one its key names while the same type falls back to the matching one for that same key, or a culture-sensitive parse given no format provider by a type that feeds its own settable culture to the same kind of parse elsewhere, or a number an entry point writes to standard output under the host's culture while the same entry point formats with the invariant culture elsewhere. Either way, every caller who supplies a value silently gets something else.

Method: Roslyn syntax: private instance fields of a non-partial type assigned in a constructor from one of its own parameters with a `??` fallback, checked for whether anything in the type body reads the field and whether that same fallback expression is spelled out again outside the constructor; and `??` fallbacks onto a member access from a lookup call carrying exactly one string literal, grouped by that key across the type and checked for a fallback member whose folded name disagrees with the key while a sibling site for the same key agrees with it. On a repository with no .NET source the first two arms read JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `#x`, `private` or `private` parameter-property instance field filled in the constructor from a parameter (or one member of one) through `??`/`||` or a parameter default, never read anywhere in the file by name, whose constructed default is spelled again in the class body; and `lookup("key") ?? s.member` grouped by key per class, or per module outside every class. The culture arm has no JavaScript counterpart: its parses take no locale. Deterministic, provable per finding. Advisory.

X26 · Unsynchronised callback handoff10.0 / 10Exemplary○ Nothing flagged

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

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

X27 · Collection changed while being enumerated10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a `for` loop leaves the `RefCell` it is walking alone — safe Rust rejects a body that changes the collection its loop borrows at compile time, except through interior mutability: a `RefCell` borrowed in the loop's header stays borrowed until the loop ends, so a `borrow_mut()` of it inside the body panics with `already borrowed: BorrowMutError` and the remaining elements are never seen. Whether a `for` loop leaves the `dict`, `set` or `deque` it is walking alone — CPython's iterators over those check that the collection has not changed size since the loop began, so a body that removes from (or empties) the very collection the loop is walking makes the next step raise `RuntimeError: dictionary changed size during iteration` and the remaining items are never seen.

Method: Roslyn syntax + semantics: `foreach` statements whose body calls a structural mutator (`Add`/`Remove`/`Clear`/`Insert`/…) on the very expression the loop is enumerating. Two arms. ARM A — the source is a concrete fragile BCL collection, or a live `Keys`/`Values` view over one, and the mutator resolves to that same collection's own member; concurrent and immutable collections and arrays are outside the population by construction, since their enumerators survive a structural change. ARM B — the source is an argument-less accessor CALL on a receiver whose body is in source: the accessor must return a stored field VERBATIM and a sibling member must structurally change that same field, both read off the implementations rather than from the members' names. A mutation the loop provably exits immediately after (`break`/`return`/`throw`/`goto`), or one written inside a nested loop or a lambda, is counted and never reported. Deterministic, provable per finding. Advisory.

X28 · Index access outside its own emptiness guard10.0 / 10Exemplary○ Nothing flagged

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

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

X29 · Per-element action decided by a fixed element10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a decision taken once per element is taken ABOUT that element — a test inside a counted loop that reads a fixed subscript of the very collection its guarded statement indexes by the loop variable applies element zero's answer to all of them, so the elements that differ from it are all handled wrongly, and in the same direction.

Method: Roslyn syntax only, no semantic model: every `for` statement declaring exactly ONE loop variable, and every `if` inside its body that is not under a nested loop or a lambda. A site enters the population when the `if`’s condition never mentions the loop variable while the statement it guards indexes some collection by that variable ALONE (`c[i]`; `c[i + 1]` and `c[i, j]` are outside it). A finding additionally needs the AGREEING TWIN at the same-collection grain: the condition must read THAT SAME collection at a subscript that does not move — written into the condition, or reached through a local declared BEFORE the loop, so an alias bound inside the body is not followed. Both collection expressions must be simple identifiers. On a repository with no .NET source the same rule reads JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `for (let|var|const x = …; …; …)` with one declarator and a braced body, an alias followed only when it is declared before the loop in a block that encloses it and never assigned inside the loop. Deterministic, provable per finding. Advisory.

X3 · Exception handling10.0 / 10Exemplary○ Nothing flagged

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

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

X30 · Support guard that admits what it rejects10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a guard written as a NEGATED `||` says what its author meant — `!(a || b || x != k)` is `!a && !b && x == k` by De Morgan, so a bail-out that mixes capabilities the code needs with a fault it refuses turns inside out: it fires only where the capabilities are ABSENT, and lets every value the fault term names walk straight into the body that cannot handle it.

Method: Roslyn syntax only, no semantic model: every logical-not whose operand is a parenthesised `||` chain of two or more disjuncts, flattened (a left-nested `a || b || c` read once would see `(a || b)` as one disjunct). A site enters the population on that shape alone. A finding additionally needs the disjuncts to DISAGREE in polarity: at least one bare boolean read — an identifier or member access, never an invocation, which is a predicate rather than a capability flag — and at least one `x != <constant>`, the only form that negates into an exact-value pin (`== null` negates into a looser requirement and is outside the fault set). Consistently-polarised disjunctions, all-fault or all-capability, are counted and never reported; a negated `&&` is outside the population entirely. No same-receiver gate: it was measured to cost a real defect and remove no false positive. Deterministic, provable per finding. Advisory.

X4 · Structured logging3.0 / 10Weak✓ Tool-verified

Other · Code Health — Whether log calls use message templates (queryable) rather than interpolated strings.

Method: Roslyn syntax scan: every log call-site counted; interpolated-string first-argument violations flagged. Population is all log calls, not estimated. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `trace`/`debug`/`info`/`warn`/`error`/`fatal`/`verbose`/`silly`/`http`/`log` call on a receiver named for a logger, in a package whose own or an enclosing `package.json` declares a logger that carries values as fields (pino, pino-http, nestjs-pino, Fastify, winston, bunyan, tslog, LogTape, roarr), whose first deciding argument is a template literal with substitutions; an object-literal fields argument is stepped over, a plain string message clears the call. Python is read the same way: a `debug`/`info`/`warning`/`error`/`exception`/`critical`/`log` call on a logger in a file that imports the standard library’s `logging` or structlog (loguru, which formats at the call, is not judged), whose message is a whole f-string with a non-constant field; a `%`-formatted, `.format()`-ed or concatenated message is not convicted, as in C#. PHP is read the same way: a PSR-3 level call (`emergency`…`debug`, `log`) on a logger (`$logger`, `$this->logger`, Laravel’s `Log::`, `logger()`, `\Drupal::logger()`) in a package whose `composer.json` requires a PSR-3 logger or a framework that hands one out (psr/log, Monolog, Laravel, Symfony, Drupal, CakePHP), or a file that imports one, whose message is a double-quoted string interpolating a variable; a single-quoted message clears the call, and `sprintf` or `.` concatenation is not convicted, as in C#. Dart is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on Sentry’s structured logger (`Sentry.logger`) whose message is a whole string literal interpolating a value (`$name`, `${…}`); the `Sentry.logger.fmt` template API clears the call. Dart that logs only through loggers with one message and no fields (package:logging, package:logger, talker, dart:developer) is not applicable rather than a reach gap. Ruby is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on the console gem’s `Console` (declared by a Gemfile, gemspec or Gemfile.lock, or required) or, where SemanticLogger, Ougai or dry-logger is declared or required, on a receiver named for a logger (`logger`, `@logger`, `Rails.logger`, `log`), whose first deciding argument is, as the whole argument, a double-quoted string interpolating a non-constant value (`#{…}`, `#@ivar`); a plain literal clears the call, keyword arguments are the fields, and a block, `%`-format or `+` concatenation is not convicted. Ruby that logs only through the standard Logger (Rails.logger) is not applicable rather than a reach gap. Deterministic.

  • `debug!` at line 347 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — sui-execution/src/latest.rs:347
  • `debug!` at line 355 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — sui-execution/src/latest.rs:355
  • `error!` at line 313 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — sui-execution/src/v0.rs:313
  • `debug!` at line 321 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — sui-execution/src/v0.rs:321
  • `debug!` at line 329 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — sui-execution/src/v0.rs:329
  • `error!` at line 307 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. (×2) — sui-execution/src/v1.rs:307, sui-execution/src/v2.rs:307
  • `debug!` at line 315 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. (×2) — sui-execution/src/v1.rs:315, sui-execution/src/v2.rs:315
  • `debug!` at line 323 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. (×2) — sui-execution/src/v1.rs:323, sui-execution/src/v2.rs:323
  • `error!` at line 318 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — sui-execution/src/v3.rs:318
  • `debug!` at line 327 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — sui-execution/src/v3.rs:327
  • `debug!` at line 335 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — sui-execution/src/v3.rs:335
  • `error!` at line 140 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — sui-execution/latest/sui-move-natives/src/config.rs:140
  • `error!` at line 733 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — sui-execution/latest/sui-move-natives/src/object_runtime/mod.rs:733
  • `trace!` at line 349 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `trace!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — sui-execution/latest/sui-adapter/src/execution_engine.rs:349
  • `trace!` at line 1181 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `trace!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — sui-execution/latest/sui-adapter/src/execution_engine.rs:1181
  • `info!` at line 1920 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — sui-execution/latest/sui-adapter/src/execution_engine.rs:1920
  • `info!` at line 1975 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — sui-execution/latest/sui-adapter/src/execution_engine.rs:1975
  • `error!` at line 2029 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — sui-execution/latest/sui-adapter/src/execution_engine.rs:2029
  • `info!` at line 2082 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — sui-execution/latest/sui-adapter/src/execution_engine.rs:2082
  • `info!` at line 2112 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — sui-execution/latest/sui-adapter/src/execution_engine.rs:2112
  • `debug!` at line 961 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — sui-execution/latest/sui-adapter/src/temporary_store.rs:961
  • `error!` at line 139 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — sui-execution/historical-versions/v3/sui-move-natives/src/config.rs:139
  • `error!` at line 539 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — sui-execution/historical-versions/v3/sui-move-natives/src/object_runtime/mod.rs:539
  • `trace!` at line 192 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `trace!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.rs:192
  • `info!` at line 886 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.rs:886
  • `info!` at line 944 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.rs:944
  • `error!` at line 998 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.rs:998
  • `info!` at line 1084 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.rs:1084
  • `info!` at line 1114 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.rs:1114
  • `debug!` at line 568 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — sui-execution/historical-versions/v3/sui-adapter/src/temporary_store.rs:568
  • `trace!` at line 142 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `trace!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs:142
  • `info!` at line 762 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs:762
  • `info!` at line 820 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs:820
  • `error!` at line 869 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs:869
  • `info!` at line 906 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs:906
  • `info!` at line 932 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs:932
  • `debug!` at line 608 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — sui-execution/historical-versions/v2/sui-adapter/src/temporary_store.rs:608

What to do

  • Interpolated log message defeats structured logging

Reference — by lens

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

LensScoreRatingImpact
Code Health65%Adequate — gated by X4Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture53%Adequate — gated by AX8Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Maturity64%Adequate — gated by M4Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness52%Adequate — gated by P5, P7Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security55%Adequate — gated by D28, D29, D30, D31, D36Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Domain Modelling100%ExemplaryStrongest area.
Event Sourcing100%ExemplarySolid.
Performance73%StrongSolid.
Unscored — 4 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 — 25 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X7 Silent fallback defaults — 8 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X9 Subsumed condition operand — 2 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not included — 46 check(s) not relevant to this codebase

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

  • AC1 Text alternatives — Frontend below the scale floor (12 DOM element(s) < 25) — too little surface to assess accessibility.
  • AC2 Forms & labels — Frontend below the scale floor (12 DOM element(s) < 25) — too little surface to assess accessibility.
  • AC3 Page structure — Frontend below the scale floor (12 DOM element(s) < 25) — too little surface to assess accessibility.
  • AC4 Keyboard semantics — Frontend below the scale floor (12 DOM element(s) < 25) — too little surface to assess accessibility.
  • AC5 ARIA correctness — Frontend below the scale floor (12 DOM element(s) < 25) — too little surface to assess accessibility.
  • AC6 Visual & motion safety — Frontend below the scale floor (12 DOM element(s) < 25) — too little surface to assess accessibility.
  • AC7 A11y enforcement — Frontend below the scale floor (12 DOM element(s) < 25) — too little surface to assess accessibility.
  • AX1 Captive dependencies — Not applicable: this repository's JavaScript imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; Rust with no dependency-injection crate has no container to hand one lifetime's instance to another — every value is owned by the code that builds it, and the borrow checker rejects a longer-lived value keeping a borrow of a shorter-lived one; this repository's TypeScript imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's.
  • AX2 Stateful singletons — No container singleton was found, so there is no shared instance for concurrent requests to race on. No function in this Python code is served by a threaded web framework (a Flask, Bottle or FastAPI route, a Django or Pyramid view), so no module is shared between request threads. Rust's compiler refuses unsynchronised shared mutation — a value shared across threads must be Sync — so the race this check looks for cannot be written. TypeScript/JavaScript runs each process's requests on one event loop, so no two requests write a shared object at the same instant (interleaving across an await is a different defect).
  • AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX6 Interface segregation — no exported interface declares behaviour
  • 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 1 — a container did not start, exited, or never became healthy) — time="2026-10-27T11:40:44Z" level=warning msg="The \"SUI_SHA\" variable is not set. Defaulting to a blank string." unable to get image 'mysten/sui-node:': Error response from daemon: invalid reference format; 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 a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Diesel schema, a SeaORM entity, a Diesel or sqlx row struct, or a SQL CREATE TABLE or ALTER TABLE — and no database or data-store crate (sqlx, Diesel, SeaORM, rusqlite, tokio-postgres, MongoDB, …) in the source either, so this repository keeps no data at rest for these controls to protect.
  • C3 Audit Trail — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Diesel schema, a SeaORM entity, a Diesel or sqlx row struct, or a SQL CREATE TABLE or ALTER TABLE — and no database or data-store crate (sqlx, Diesel, SeaORM, rusqlite, tokio-postgres, MongoDB, …) in the source either, so this repository keeps no sensitive data whose changes an audit trail would record. If it does (through a store configured outside this repository, for instance), the trail belongs to wherever that data is stored.
  • C4 Data Retention — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Diesel schema, a SeaORM entity, a Diesel or sqlx row struct, or a SQL CREATE TABLE or ALTER TABLE — and no database or data-store crate (sqlx, Diesel, SeaORM, rusqlite, tokio-postgres, MongoDB, …) in the source either, so this repository keeps no personal data whose lifetime a retention limit would bound.
  • C5 Data-Subject Rights — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Diesel schema, a SeaORM entity, a Diesel or sqlx row struct, or a SQL CREATE TABLE or ALTER TABLE — and no database or data-store crate (sqlx, Diesel, SeaORM, rusqlite, tokio-postgres, MongoDB, …) in the source either, so this repository keeps no personal data for a data subject to erase, export or consent over.
  • 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 .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
  • D21 Naming Consistency — Naming consistency is measured on C# only; JavaScript, Python, Rust, TypeScript, html not measured.
  • D22 Internal API Consistency — API consistency is measured on C# only; the exposed Rust, TypeScript surface was not measured.
  • D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ projects each declaring an entity of their own. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
  • D24 Comment Value — D24 reads C# and Visual Basic comments only — this repository's production source is .py, .rs, .ts, .tsx, which was left unread. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • D25 ADR Conformance — None of 0 binding record(s) states a rule in checkable form (a backticked element with a prohibition, or an `adr-rules` block), so conformance cannot be read from the code. Write the rule as an `adr-rules` block (`forbid:` a symbol, a package or a dependency) to make it checkable.
  • 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) — 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.
  • D39 IL Efficiency — D39 measures the IL emitted by a .NET build; this repository has no .NET solution or project files, so the dimension does not apply.
  • 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.
  • D8 Code Coverage — Coverage NOT MEASURED: the JavaScript/TypeScript half could not be measured — external-crates/move/crates/move-analyzer/prettier-plugin/ runs mocha but declares no coverage provider, so the suite can run and still produce no lcov — add `c8` (or `nyc`) as a devDependency so the suite can be wrapped for coverage. Coverage is excluded from the score rather than counted as a near-zero. The named suite step is one the repository's maintainers can perform; once it passes, the real number is measured on the next scan. Alternatively, commit the lcov/Cobertura report your CI produces and it is read without a re-run.
  • DM1 Aggregate boundaries — this Rust crate declares no domain aggregate (a struct with private state and its own command methods), so DM1's aggregate-boundary read has no population to be taken over
  • DM2 Strongly-typed ids — the crate defines newtype typed-ids but declares no domain aggregate that could carry an id — so DM2's adoption ratio has no population to be taken over
  • DM3 Integration-event coupling — not applicable: no DDD domain layer was detected (no aggregate, entity or value-object structure), so there is no domain model for this card to grade
  • DM7 Repository granularity — not applicable: no DDD domain layer was detected (no aggregate, entity or value-object structure), so there is no domain model for this card to grade
  • 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 assessed, and this one is on us: 56 command handler(s) or message consumer(s) were found here, but this check does not yet recognise persistence writes in this repository's language. Idempotency was neither confirmed nor ruled out — this is a limit of the analyzer, not a finding about your code.
  • GD1 Unfinished & placeholder code — no source files were read — this check reads C#, F#, JavaScript/TypeScript, Dart, Ruby and Scala, and none was read for this repository's product. That is a limit of the analyzer, not a finding about your code.
  • IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • P9 Domain vs controller coverage — no coverage report found on disk — produce a coverage report in a standard format (lcov — `cargo install cargo-llvm-cov`, then `cargo llvm-cov --lcov --output-path lcov.info`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures, or wire coverage collection into CI, to enable this cross-layer check
  • PF2 Allocation hygiene — Not applicable: Rust spells out every heap allocation and makes borrowed slices (&[T], &str) its ordinary parameter types, so the allocation-aware style this card rewards elsewhere is the language's baseline rather than a rung to climb.
  • SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X2 Cancellation propagation — no C# was loaded; this repository's Python and Rust were read, and no request in it can be cancelled by a caller — a Python request takes no token: asyncio cancels the task and trio or anyio the scope that made it, from outside the call, and requests, httpx, aiohttp and gRPC take a timeout, not a cancellation; a Rust request takes no token: a future is cancelled by dropping it, from outside the call (select!, a timeout, an aborted task), and reqwest, hyper and tonic take none
  • X20 Mistyped argument guard — This check asks whether an argument guard reports an EMPTY value as a NULL one, which needs a language that throws a null-specific argument exception — .NET's ArgumentNullException, the JVM's NullPointerException, Dart's ArgumentError.notNull. This repository contains none of those languages: the ones it is written in have a single exception for a bad argument, so there is no pair of exceptions to confuse and nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X5 Nullable reference types — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.

Appendix A — Findings (grouped)

The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.

Critical — 228 finding(s)
D30 · Dependency Vulnerabilities · High CVE · ×57
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 32 more in this group — see findings.md.
D31 · IaC & Container Security · High IaC · ×46
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 21 more in this group — see findings.md.
D28 · Secrets (history) · REDACTED · ×29
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 4 more in this group — see findings.md.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 2 more in this group — see findings.md.
AX4 · Dependency direction · Dependency-rule violation · ×22
  • Dependency-rule violation: consensus-core (Domain) → sui-macros (Web) — `consensus-core` is a Domain project but references `sui-macros`, a Web project. The clean-architecture rule is that dependencies point INWARD — the domain/application core must not depend on outer layers (infrastructure/web). Invert it: define the abstraction in the inner layer and implement it in the outer one.
  • Dependency-rule violation: consensus-core (Domain) → sui-tls (Web) — `consensus-core` is a Domain project but references `sui-tls`, a Web project. The clean-architecture rule is that dependencies point INWARD — the domain/application core must not depend on outer layers (infrastructure/web). Invert it: define the abstraction in the inner layer and implement it in the outer one.
  • Dependency-rule violation: sui-core (Domain) → sui-config (Web) — `sui-core` is a Domain project but references `sui-config`, a Web project. The clean-architecture rule is that dependencies point INWARD — the domain/application core must not depend on outer layers (infrastructure/web). Invert it: define the abstraction in the inner layer and implement it in the outer one.
  • Dependency-rule violation: sui-core (Domain) → sui-consistent-store (Web) — `sui-core` is a Domain project but references `sui-consistent-store`, a Web project. The clean-architecture rule is that dependencies point INWARD — the domain/application core must not depend on outer layers (infrastructure/web). Invert it: define the abstraction in the inner layer and implement it in the outer one.
  • Dependency-rule violation: sui-core (Domain) → sui-authority-aggregation (Web) — `sui-core` is a Domain project but references `sui-authority-aggregation`, a Web project. The clean-architecture rule is that dependencies point INWARD — the domain/application core must not depend on outer layers (infrastructure/web). Invert it: define the abstraction in the inner layer and implement it in the outer one.
  • Dependency-rule violation: sui-core (Domain) → sui-execution (Web) — `sui-core` is a Domain project but references `sui-execution`, a Web project. The clean-architecture rule is that dependencies point INWARD — the domain/application core must not depend on outer layers (infrastructure/web). Invert it: define the abstraction in the inner layer and implement it in the outer one.
  • Dependency-rule violation: sui-core (Domain) → sui-framework (Web) — `sui-core` is a Domain project but references `sui-framework`, a Web project. The clean-architecture rule is that dependencies point INWARD — the domain/application core must not depend on outer layers (infrastructure/web). Invert it: define the abstraction in the inner layer and implement it in the outer one.
  • Dependency-rule violation: sui-core (Domain) → sui-swarm-config (Web) — `sui-core` is a Domain project but references `sui-swarm-config`, a Web project. The clean-architecture rule is that dependencies point INWARD — the domain/application core must not depend on outer layers (infrastructure/web). Invert it: define the abstraction in the inner layer and implement it in the outer one.
  • Dependency-rule violation: sui-core (Domain) → sui-genesis-builder (Web) — `sui-core` is a Domain project but references `sui-genesis-builder`, a Web project. The clean-architecture rule is that dependencies point INWARD — the domain/application core must not depend on outer layers (infrastructure/web). Invert it: define the abstraction in the inner layer and implement it in the outer one.
  • Dependency-rule violation: sui-core (Domain) → sui-indexer-alt-framework (Web) — `sui-core` is a Domain project but references `sui-indexer-alt-framework`, a Web project. The clean-architecture rule is that dependencies point INWARD — the domain/application core must not depend on outer layers (infrastructure/web). Invert it: define the abstraction in the inner layer and implement it in the outer one.
  • Dependency-rule violation: sui-core (Domain) → sui-macros (Web) — `sui-core` is a Domain project but references `sui-macros`, a Web project. The clean-architecture rule is that dependencies point INWARD — the domain/application core must not depend on outer layers (infrastructure/web). Invert it: define the abstraction in the inner layer and implement it in the outer one.
  • Dependency-rule violation: sui-core (Domain) → sui-network (Web) — `sui-core` is a Domain project but references `sui-network`, a Web project. The clean-architecture rule is that dependencies point INWARD — the domain/application core must not depend on outer layers (infrastructure/web). Invert it: define the abstraction in the inner layer and implement it in the outer one.
  • Dependency-rule violation: sui-core (Domain) → sui-protocol-config (Web) — `sui-core` is a Domain project but references `sui-protocol-config`, a Web project. The clean-architecture rule is that dependencies point INWARD — the domain/application core must not depend on outer layers (infrastructure/web). Invert it: define the abstraction in the inner layer and implement it in the outer one.
  • Dependency-rule violation: sui-core (Domain) → sui-rpc-store (Web) — `sui-core` is a Domain project but references `sui-rpc-store`, a Web project. The clean-architecture rule is that dependencies point INWARD — the domain/application core must not depend on outer layers (infrastructure/web). Invert it: define the abstraction in the inner layer and implement it in the outer one.
  • Dependency-rule violation: sui-core (Domain) → sui-transaction-checks (Web) — `sui-core` is a Domain project but references `sui-transaction-checks`, a Web project. The clean-architecture rule is that dependencies point INWARD — the domain/application core must not depend on outer layers (infrastructure/web). Invert it: define the abstraction in the inner layer and implement it in the outer one.
  • Dependency-rule violation: sui-core (Domain) → sui-simulator (Web) — `sui-core` is a Domain project but references `sui-simulator`, a Web project. The clean-architecture rule is that dependencies point INWARD — the domain/application core must not depend on outer layers (infrastructure/web). Invert it: define the abstraction in the inner layer and implement it in the outer one.
  • Dependency-rule violation: sui-core (Domain) → sui-storage (Web) — `sui-core` is a Domain project but references `sui-storage`, a Web project. The clean-architecture rule is that dependencies point INWARD — the domain/application core must not depend on outer layers (infrastructure/web). Invert it: define the abstraction in the inner layer and implement it in the outer one.
  • Dependency-rule violation: sui-core (Domain) → sui-tls (Web) — `sui-core` is a Domain project but references `sui-tls`, a Web project. The clean-architecture rule is that dependencies point INWARD — the domain/application core must not depend on outer layers (infrastructure/web). Invert it: define the abstraction in the inner layer and implement it in the outer one.
  • Dependency-rule violation: sui-core (Domain) → sui-types (Web) — `sui-core` is a Domain project but references `sui-types`, a Web project. The clean-architecture rule is that dependencies point INWARD — the domain/application core must not depend on outer layers (infrastructure/web). Invert it: define the abstraction in the inner layer and implement it in the outer one.
  • Dependency-rule violation: sui-data-ingestion-core (Domain) → sui-types (Web) — `sui-data-ingestion-core` is a Domain project but references `sui-types`, a Web project. The clean-architecture rule is that dependencies point INWARD — the domain/application core must not depend on outer layers (infrastructure/web). Invert it: define the abstraction in the inner layer and implement it in the outer one.
  • Dependency-rule violation: sui-data-ingestion-core (Domain) → sui-protocol-config (Web) — `sui-data-ingestion-core` is a Domain project but references `sui-protocol-config`, a Web project. The clean-architecture rule is that dependencies point INWARD — the domain/application core must not depend on outer layers (infrastructure/web). Invert it: define the abstraction in the inner layer and implement it in the outer one.
  • Dependency-rule violation: sui-data-ingestion-core (Domain) → sui-rpc-api (Web) — `sui-data-ingestion-core` is a Domain project but references `sui-rpc-api`, a Web project. The clean-architecture rule is that dependencies point INWARD — the domain/application core must not depend on outer layers (infrastructure/web). Invert it: define the abstraction in the inner layer and implement it in the outer one.
AX8 · Test isolation · Production project references a test project · ×10
  • Production project references a test project: move-cli → move-unit-test — `move-cli` (production) references the test project `move-unit-test`. Production must never depend on test code — it pulls a unit-test framework and test fixtures into the shipped product and inverts the only correct direction (tests depend on production, never the reverse). Move any shared helper into a production support library, or invert the reference.
  • Production project references a test project: sui → test-cluster — `sui` (production) references the test project `test-cluster`. Production must never depend on test code — it pulls a unit-test framework and test fixtures into the shipped product and inverts the only correct direction (tests depend on production, never the reverse). Move any shared helper into a production support library, or invert the reference.
  • Production project references a test project: sui-benchmark → sui-test-transaction-builder — `sui-benchmark` (production) references the test project `sui-test-transaction-builder`. Production must never depend on test code — it pulls a unit-test framework and test fixtures into the shipped product and inverts the only correct direction (tests depend on production, never the reverse). Move any shared helper into a production support library, or invert the reference.
  • Production project references a test project: sui-benchmark → test-cluster — `sui-benchmark` (production) references the test project `test-cluster`. Production must never depend on test code — it pulls a unit-test framework and test fixtures into the shipped product and inverts the only correct direction (tests depend on production, never the reverse). Move any shared helper into a production support library, or invert the reference.
  • Production project references a test project: sui-bridge → sui-test-transaction-builder — `sui-bridge` (production) references the test project `sui-test-transaction-builder`. Production must never depend on test code — it pulls a unit-test framework and test fixtures into the shipped product and inverts the only correct direction (tests depend on production, never the reverse). Move any shared helper into a production support library, or invert the reference.
  • Production project references a test project: sui-bridge → test-cluster — `sui-bridge` (production) references the test project `test-cluster`. Production must never depend on test code — it pulls a unit-test framework and test fixtures into the shipped product and inverts the only correct direction (tests depend on production, never the reverse). Move any shared helper into a production support library, or invert the reference.
  • Production project references a test project: sui-move → move-unit-test — `sui-move` (production) references the test project `move-unit-test`. Production must never depend on test code — it pulls a unit-test framework and test fixtures into the shipped product and inverts the only correct direction (tests depend on production, never the reverse). Move any shared helper into a production support library, or invert the reference.
  • Production project references a test project: sui-single-node-benchmark → sui-test-transaction-builder — `sui-single-node-benchmark` (production) references the test project `sui-test-transaction-builder`. Production must never depend on test code — it pulls a unit-test framework and test fixtures into the shipped product and inverts the only correct direction (tests depend on production, never the reverse). Move any shared helper into a production support library, or invert the reference.
  • Production project references a test project: sui-surfer → test-cluster — `sui-surfer` (production) references the test project `test-cluster`. Production must never depend on test code — it pulls a unit-test framework and test fixtures into the shipped product and inverts the only correct direction (tests depend on production, never the reverse). Move any shared helper into a production support library, or invert the reference.
  • Production project references a test project: sui-synthetic-ingestion → sui-test-transaction-builder — `sui-synthetic-ingestion` (production) references the test project `sui-test-transaction-builder`. Production must never depend on test code — it pulls a unit-test framework and test fixtures into the shipped product and inverts the only correct direction (tests depend on production, never the reverse). Move any shared helper into a production support library, or invert the reference.
D35 · Change Coupling · Boundary-crossing change coupling · ×9
  • Boundary-crossing change coupling: network_config_builder.rs ↔ v1.rs crates/sui-swarm-config/src/network_config_builder.rs:1 — `crates/sui-swarm-config/src/network_config_builder.rs` (context crates) and `sui-execution/src/v1.rs` (context sui-execution) sit in DIFFERENT parts of the tree yet change together 60% of the time (6 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `b281be8e` [execution] Pass early_execution_error to execution layer (#22600); `447b0a3f` Expose `GasData` through executor (#21244); `fd40b0fc` Enable tracing in the execution layer (#21165) — run `git show` on any of them.
  • Boundary-crossing change coupling: network_config_builder.rs ↔ v0.rs crates/sui-swarm-config/src/network_config_builder.rs:1 — `crates/sui-swarm-config/src/network_config_builder.rs` (context crates) and `sui-execution/src/v0.rs` (context sui-execution) sit in DIFFERENT parts of the tree yet change together 60% of the time (6 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `b281be8e` [execution] Pass early_execution_error to execution layer (#22600); `447b0a3f` Expose `GasData` through executor (#21244); `fd40b0fc` Enable tracing in the execution layer (#21165) — run `git show` on any of them.
  • Boundary-crossing change coupling: core.rs ↔ mysticeti_adapter.rs consensus/core/src/core.rs:1 — `consensus/core/src/core.rs` (context consensus) and `crates/sui-core/src/mysticeti_adapter.rs` (context crates) sit in DIFFERENT parts of the tree yet change together 58% of the time (7 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `eb0a1852` Reserve a priority lane in consensus input for system transactions (#…; `ae6275f6` [Consensus] resubmit GC'ed transactions (#19572); `d7c986ca` [Narwhal] remove NarwhalManager, LazyNarwhalClient, TransactionValida… — run `git show` on any of them.
  • Boundary-crossing change coupling: authority.rs ↔ execution_engine.rs crates/sui-core/src/authority.rs:1 — `crates/sui-core/src/authority.rs` (context crates) and `sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs` (context sui-execution) sit in DIFFERENT parts of the tree yet change together 56% of the time (9 of the 16 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `cc3c2136` Generate ProtocolConfig feature flag getters (#26976) (at that commit the file was still `sui-execution/v2/sui-adapter/src/execution_engine.rs`); `680ca907` Protocol gate and add unit tests for hotfix in #26832 (#26843) (at that commit the file was still `sui-execution/v2/sui-adapter/src/execution_engine.rs`); `197452c5` Gate #26816 gas-underflow fix for safe rollout (mainnet replay correc… (at that commit the file was still `sui-execution/v2/sui-adapter/src/execution_engine.rs`) — run `git show` on any of them.
  • Boundary-crossing change coupling: authority.rs ↔ execution_engine.rs crates/sui-core/src/authority.rs:1 — `crates/sui-core/src/authority.rs` (context crates) and `sui-execution/historical-versions/v0/sui-adapter/src/execution_engine.rs` (context sui-execution) sit in DIFFERENT parts of the tree yet change together 53% of the time (9 of the 17 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `cc3c2136` Generate ProtocolConfig feature flag getters (#26976) (at that commit the file was still `sui-execution/v0/sui-adapter/src/execution_engine.rs`); `680ca907` Protocol gate and add unit tests for hotfix in #26832 (#26843) (at that commit the file was still `sui-execution/v0/sui-adapter/src/execution_engine.rs`); `197452c5` Gate #26816 gas-underflow fix for safe rollout (mainnet replay correc… (at that commit the file was still `sui-execution/v0/sui-adapter/src/execution_engine.rs`) — run `git show` on any of them.
  • Boundary-crossing change coupling: commit_observer.rs ↔ consensus_output_api.rs consensus/core/src/commit_observer.rs:1 — `consensus/core/src/commit_observer.rs` (context consensus) and `crates/sui-core/src/consensus_types/consensus_output_api.rs` (context crates) sit in DIFFERENT parts of the tree yet change together 53% of the time (9 of the 17 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `192a628c` cleanup: remove now unused fields and no-op flag (#26086); `1cc42478` Always accept system transactions (#25001); `f67bfdd1` [mfp] do not vote on potentially GC'ed blocks (#24492) — run `git show` on any of them.
  • Boundary-crossing change coupling: authority.rs ↔ execution_engine.rs crates/sui-core/src/authority.rs:1 — `crates/sui-core/src/authority.rs` (context crates) and `sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs` (context sui-execution) sit in DIFFERENT parts of the tree yet change together 53% of the time (10 of the 19 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 10 shared commits counted here, the most recent 3 are `cc3c2136` Generate ProtocolConfig feature flag getters (#26976) (at that commit the file was still `sui-execution/v1/sui-adapter/src/execution_engine.rs`); `680ca907` Protocol gate and add unit tests for hotfix in #26832 (#26843) (at that commit the file was still `sui-execution/v1/sui-adapter/src/execution_engine.rs`); `197452c5` Gate #26816 gas-underflow fix for safe rollout (mainnet replay correc… (at that commit the file was still `sui-execution/v1/sui-adapter/src/execution_engine.rs`) — run `git show` on any of them.
  • Boundary-crossing change coupling: single_node.rs ↔ v1.rs crates/sui-single-node-benchmark/src/single_node.rs:1 — `crates/sui-single-node-benchmark/src/single_node.rs` (context crates) and `sui-execution/src/v1.rs` (context sui-execution) sit in DIFFERENT parts of the tree yet 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, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `b281be8e` [execution] Pass early_execution_error to execution layer (#22600); `447b0a3f` Expose `GasData` through executor (#21244); `fd40b0fc` Enable tracing in the execution layer (#21165) — run `git show` on any of them.
  • Boundary-crossing change coupling: single_node.rs ↔ v0.rs crates/sui-single-node-benchmark/src/single_node.rs:1 — `crates/sui-single-node-benchmark/src/single_node.rs` (context crates) and `sui-execution/src/v0.rs` (context sui-execution) sit in DIFFERENT parts of the tree yet 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, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `b281be8e` [execution] Pass early_execution_error to execution layer (#22600); `447b0a3f` Expose `GasData` through executor (#21244); `fd40b0fc` Enable tracing in the execution layer (#21165) — run `git show` on any of them.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D34 · Knowledge Freshness · Orphaned knowledge · ×3
  • Orphaned knowledge crates/sui-bridge/src/monitor.rs:1 — No living knowledge remains for this large file — its last meaningful change has decayed away, so if it breaks, no one currently understands it. It does carry its own tests, so the behaviour is pinned even though the understanding is gone: schedule a read-through, using those tests as the specification, before the next change lands here.
  • Orphaned knowledge crates/sui-bridge/src/sui_transaction_builder.rs:1 — No living knowledge remains for this large file — its last meaningful change has decayed away, so if it breaks, no one currently understands it. It does carry its own tests, so the behaviour is pinned even though the understanding is gone: schedule a read-through, using those tests as the specification, before the next change lands here.
  • Orphaned knowledge crates/sui-bridge/src/client/bridge_authority_aggregator.rs:1 — No living knowledge remains for this large file — its last meaningful change has decayed away, so if it breaks, no one currently understands it. It does carry its own tests, so the behaviour is pinned even though the understanding is gone: schedule a read-through, using those tests as the specification, before the next change lands here.
AX9 · CQS / query purity · Query writes persistent state on the read path · ×1
  • Query writes persistent state on the read path: PgReader.load crates/sui-indexer-alt-reader/src/pg_reader.rs:24 — `PgReader.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.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D30 · Dependency Vulnerabilities · High vulnerability · ×1
  • REDACTED
Serious — 4043 finding(s)
D17 · Explicit Debt · TodoComment · ×762
  • TodoComment sui-execution/latest/sui-verifier/src/id_leak_verifier.rs:416 — // TODO: Better diagnostics with location — 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 sui-execution/historical-versions/v3/sui-verifier/src/id_leak_verifier.rs:410 — // TODO: Better diagnostics with location — 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 sui-execution/historical-versions/v2/sui-verifier/src/id_leak_verifier.rs:381 — // TODO: Better diagnostics with location — 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 sui-execution/historical-versions/v1/sui-verifier/src/id_leak_verifier.rs:366 — // TODO: Better diagnostics with location — 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 sui-execution/historical-versions/v0/sui-verifier/src/id_leak_verifier.rs:392 — // TODO: Better diagnostics with location — 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 sui-execution/latest/sui-move-natives/src/accumulator.rs:47 — // TODO(address-balances): add specific cost for this — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment sui-execution/latest/sui-move-natives/src/funds_accumulator.rs:52 — // TODO(address-balances): add specific cost for this — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment sui-execution/latest/sui-move-natives/src/funds_accumulator.rs:124 — // TODO(address-balances): add specific cost for this — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment sui-execution/historical-versions/v3/sui-move-natives/src/accumulator.rs:47 — // TODO(address-balances): add specific cost for this — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment sui-execution/historical-versions/v3/sui-move-natives/src/funds_accumulator.rs:33 — // TODO(address-balances): add specific cost for this — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment sui-execution/historical-versions/v3/sui-move-natives/src/funds_accumulator.rs:112 — // TODO(address-balances): add specific cost for this — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment sui-execution/latest/sui-move-natives/src/dynamic_field.rs:207 — // TODO remove this copy_value, which will require VM changes — 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 sui-execution/historical-versions/v3/sui-move-natives/src/dynamic_field.rs:209 — // TODO remove this copy_value, which will require VM changes — 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 sui-execution/historical-versions/v2/sui-move-natives/src/dynamic_field.rs:196 — // TODO remove this copy_value, which will require VM changes — 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 sui-execution/historical-versions/v1/sui-move-natives/src/dynamic_field.rs:196 — // TODO remove this copy_value, which will require VM changes — 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 sui-execution/historical-versions/v0/sui-move-natives/src/dynamic_field.rs:197 — // TODO remove this copy_value, which will require VM changes — 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 sui-execution/latest/sui-move-natives/src/funds_accumulator.rs:63 — // TODO in the future this is guaranteed/checked via a custom verifier rule — 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 sui-execution/historical-versions/v3/sui-move-natives/src/funds_accumulator.rs:44 — // TODO in the future this is guaranteed/checked via a custom verifier rule — 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 sui-execution/latest/sui-move-natives/src/funds_accumulator.rs:75 — // TODO this will need to look at the layout of T when this is not guaranteed to be a Balance — 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 sui-execution/latest/sui-move-natives/src/funds_accumulator.rs:140 — // TODO this will need to look at the layout of T when this is not guaranteed to be a Balance — 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 sui-execution/latest/sui-move-natives/src/funds_accumulator.rs:160 — // TODO this will need to look at the layout of T when this is not guaranteed to be a Balance — 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 sui-execution/historical-versions/v3/sui-move-natives/src/funds_accumulator.rs:64 — // TODO this will need to look at the layout of T when this is not guaranteed to be a Balance — 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 sui-execution/historical-versions/v3/sui-move-natives/src/funds_accumulator.rs:136 — // TODO this will need to look at the layout of T when this is not guaranteed to be a Balance — 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 sui-execution/historical-versions/v3/sui-move-natives/src/funds_accumulator.rs:149 — // TODO this will need to look at the layout of T when this is not guaranteed to be a Balance — 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 sui-execution/latest/sui-move-natives/src/funds_accumulator.rs:125 — // TODO(address-balances): determine storage cost for "Merge" — 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.
  • + 737 more in this group — see findings.md.
D3 · God Classes · FileTooLong · ×165
  • FileTooLong: src/authority.rs crates/sui-core/src/authority.rs — FileTooLong — 3606 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 72% of them inside a single declaration: AuthorityState (2 blocks, 1011-4934). The bar is 500 significant lines; this is 3106 over it, 7.21× 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/transaction.rs crates/sui-types/src/transaction.rs — FileTooLong — 3544 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 3044 over it, 7.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/client_commands.rs crates/sui/src/client_commands.rs — FileTooLong — 3151 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 52 free functions. The bar is 500 significant lines; this is 2651 over it, 6.30× 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 crates/sui-protocol-config/src/lib.rs — FileTooLong — 2902 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 78% of them inside a single declaration: ProtocolConfig (4 blocks, 1512-5253). The bar is 500 significant lines; this is 2402 over it, 5.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: src/rpc_proto_conversions.rs crates/sui-types/src/rpc_proto_conversions.rs — FileTooLong — 2512 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 2012 over it, 5.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/consensus_handler.rs crates/sui-core/src/consensus_handler.rs — FileTooLong — 2506 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 67% of them inside a single declaration: ConsensusHandler (3 blocks, 722-3356). The bar is 500 significant lines; this is 2006 over it, 5.01× 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: authority/authority_per_epoch_store.rs crates/sui-core/src/authority/authority_per_epoch_store.rs — FileTooLong — 2274 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 79% of them inside a single declaration: AuthorityPerEpochStore (2 blocks, 312-3560). The bar is 500 significant lines; this is 1774 over it, 4.55× 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: checkpoints/mod.rs crates/sui-core/src/checkpoints/mod.rs — FileTooLong — 2261 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 1761 over it, 4.52× 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 crates/sui-node/src/lib.rs — FileTooLong — 2193 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: SuiNode (5 blocks, 255-2805). The bar is 500 significant lines; this is 1693 over it, 4.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: execution/context.rs sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/context.rs — FileTooLong — 1945 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 1445 over it, 3.89× 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/execution_engine.rs sui-execution/latest/sui-adapter/src/execution_engine.rs — FileTooLong — 1885 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 39 free functions. The bar is 500 significant lines; this is 1385 over it, 3.77× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: upgrade_compatibility/mod.rs crates/sui/src/upgrade_compatibility/mod.rs — FileTooLong — 1850 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 1350 over it, 3.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/sui_transaction.rs crates/sui-json-rpc-types/src/sui_transaction.rs — FileTooLong — 1836 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 1336 over it, 3.67× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: composite/mod.rs crates/sui-benchmark/src/workloads/composite/mod.rs — FileTooLong — 1777 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 1277 over it, 3.55× 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: client/mod.rs crates/sui-kvstore/src/bigtable/client/mod.rs — FileTooLong — 1757 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: BigTableClient (4 blocks, 183-2383). The bar is 500 significant lines; this is 1257 over it, 3.51× 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: rocks/mod.rs crates/typed-store/src/rocks/mod.rs — FileTooLong — 1636 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 1136 over it, 3.27× 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: execution_cache/writeback_cache.rs crates/sui-core/src/execution_cache/writeback_cache.rs — FileTooLong — 1621 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 84% of them inside a single declaration: WritebackCache (9 blocks, 427-2581). The bar is 500 significant lines; this is 1121 over it, 3.24× 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/authority_server.rs crates/sui-core/src/authority_server.rs — FileTooLong — 1580 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 75% of them inside a single declaration: ValidatorService (4 blocks, 432-2345). The bar is 500 significant lines; this is 1080 over it, 3.16× 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: programmable_transactions/context.rs sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/context.rs — FileTooLong — 1536 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 1036 over it, 3.07× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/operations.rs crates/sui-rosetta/src/operations.rs — FileTooLong — 1526 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 79% of them inside a single declaration: Operations (5 blocks, 184-2042). The bar is 500 significant lines; this is 1026 over it, 3.05× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: REDACTED REDACTED — 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), declaring 32 free functions. 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: src/sui_commands.rs crates/sui/src/sui_commands.rs — FileTooLong — 1346 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 846 over it, 2.69× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: REDACTED REDACTED — FileTooLong — 1266 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 766 over it, 2.53× 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/sui_sdk_types_conversions.rs crates/sui-types/src/sui_sdk_types_conversions.rs — FileTooLong — 1263 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 763 over it, 2.53× 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: state_sync/mod.rs crates/sui-network/src/state_sync/mod.rs — FileTooLong — 1247 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 747 over it, 2.49× 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.
  • + 140 more in this group — see findings.md.
D3 · God Classes · MethodTooLong · ×136
  • MethodTooLong: ProtocolConfig.get_for_version_impl crates/sui-protocol-config/src/lib.rs:2695 — MethodTooLong — get_for_version_impl runs 1528 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 1428 over it, 15.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.
  • MethodTooLong: SuiClientCommands.execute crates/sui/src/client_commands.rs:872 — MethodTooLong — execute runs 858 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 758 over it, 8.58× 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: NodeMetrics.new consensus/core/src/metrics.rs:265 — MethodTooLong — new runs 770 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 670 over it, 7.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: KeyToolCommand.execute crates/sui/src/keytool.rs:485 — MethodTooLong — execute runs 733 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 633 over it, 7.33× 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: NativesCostTable.from_protocol_config sui-execution/latest/sui-move-natives/src/lib.rs:239 — MethodTooLong — from_protocol_config runs 577 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 477 over it, 5.77× 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: ValidatorService.handle_submit_transaction_inner crates/sui-core/src/authority_server.rs:697 — MethodTooLong — handle_submit_transaction_inner runs 565 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 465 over it, 5.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: NativesCostTable.from_protocol_config sui-execution/historical-versions/v3/sui-move-natives/src/lib.rs:205 — MethodTooLong — from_protocol_config runs 532 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 432 over it, 5.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.
  • MethodTooLong: SuiNode.start_async crates/sui-node/src/lib.rs:478 — MethodTooLong — start_async runs 415 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 315 over it, 4.15× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: NativesCostTable.from_protocol_config sui-execution/historical-versions/v2/sui-move-natives/src/lib.rs:163 — MethodTooLong — from_protocol_config runs 402 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 302 over it, 4.02× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: CompositeWorkload.init crates/sui-benchmark/src/workloads/composite/mod.rs:1898 — MethodTooLong — init runs 398 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 298 over it, 3.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.
  • MethodTooLong: AuthorityMetrics.new crates/sui-core/src/authority.rs:410 — MethodTooLong — new runs 384 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 284 over it, 3.84× 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: SuiValidatorCommand.execute crates/sui/src/validator_commands.rs:294 — MethodTooLong — execute runs 360 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 260 over it, 3.60× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: IndexerMetrics.new crates/sui-indexer-alt-framework/src/metrics.rs:466 — MethodTooLong — new runs 344 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 244 over it, 3.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.
  • MethodTooLong: SuiCommand.execute crates/sui/src/sui_commands.rs:449 — MethodTooLong — execute runs 319 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 219 over it, 3.19× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: NativesCostTable.from_protocol_config sui-execution/historical-versions/v1/sui-move-natives/src/lib.rs:153 — MethodTooLong — from_protocol_config runs 306 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 206 over it, 3.06× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Operations.parse_programmable_transaction crates/sui-rosetta/src/operations.rs:515 — MethodTooLong — parse_programmable_transaction runs 302 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 202 over it, 3.02× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: AuthorityNode.start consensus/core/src/authority_node.rs:193 — MethodTooLong — start runs 294 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 194 over it, 2.94× 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: ToolCommand.execute crates/sui-tool/src/commands.rs:361 — MethodTooLong — execute runs 294 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 194 over it, 2.94× 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: NativesCostTable.from_protocol_config sui-execution/historical-versions/v0/sui-move-natives/src/lib.rs:135 — MethodTooLong — from_protocol_config runs 293 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 193 over it, 2.93× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: SuiNode.monitor_reconfiguration crates/sui-node/src/lib.rs:1904 — MethodTooLong — monitor_reconfiguration runs 279 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 179 over it, 2.79× 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: ValidatorProposer.try_new_block consensus/core/src/proposer.rs:364 — MethodTooLong — try_new_block runs 255 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 155 over it, 2.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: BigTableIndexer.new crates/sui-kvstore/src/lib.rs:455 — MethodTooLong — new runs 248 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 148 over it, 2.48× 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: ConsensusHandler.filter_consensus_txns crates/sui-core/src/consensus_handler.rs:2722 — MethodTooLong — filter_consensus_txns runs 247 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 147 over it, 2.47× 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: TransactionDataV1.validity_check crates/sui-types/src/transaction.rs:3427 — MethodTooLong — validity_check runs 244 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 144 over it, 2.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.
  • MethodTooLong: SuiClientCommandResult.fmt crates/sui/src/client_commands.rs:2230 — MethodTooLong — fmt runs 239 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 139 over it, 2.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.
  • + 111 more in this group — see findings.md.
D3 · God Classes · FunctionTooLong · ×100
  • FunctionTooLong: sui_bridge_cli::main crates/sui-bridge-cli/src/main.rs:46 — FunctionTooLong — sui_bridge_cli::main runs 389 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 289 over it, 3.89× 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: sui::sui_commands::start crates/sui/src/sui_commands.rs:868 — FunctionTooLong — sui::sui_commands::start runs 357 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 257 over it, 3.57× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: sui_benchmark::drivers::bench_driver::run_bench_worker crates/sui-benchmark/src/drivers/bench_driver.rs:758 — FunctionTooLong — sui_benchmark::drivers::bench_driver::run_bench_worker runs 319 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 219 over it, 3.19× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: sui_move_natives_latest::all_natives sui-execution/latest/sui-move-natives/src/lib.rs:1039 — FunctionTooLong — sui_move_natives_latest::all_natives runs 301 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 201 over it, 3.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.
  • FunctionTooLong: typed_store_derive::derive_dbmap_utils_general crates/typed-store-derive/src/lib.rs:187 — FunctionTooLong — typed_store_derive::derive_dbmap_utils_general runs 297 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 197 over it, 2.97× 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: sui_kv_rpc::v2::list_transactions::list_transactions crates/sui-kv-rpc/src/v2/list_transactions.rs:83 — FunctionTooLong — sui_kv_rpc::v2::list_transactions::list_transactions runs 280 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 180 over it, 2.80× 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: sui_move_natives_v3::all_natives sui-execution/historical-versions/v3/sui-move-natives/src/lib.rs:921 — FunctionTooLong — sui_move_natives_v3::all_natives runs 268 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 168 over it, 2.68× 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: sui_rpc_api::grpc::v2::ledger_service::list_events::next_event_chunk crates/sui-rpc-api/src/grpc/v2/ledger_service/list_events.rs:281 — FunctionTooLong — sui_rpc_api::grpc::v2::ledger_service::list_events::next_event_chunk runs 251 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 151 over it, 2.51× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: sui_adapter_v3::programmable_transactions::execution::checked::execute_command REDACTED:202 — FunctionTooLong — sui_adapter_v3::programmable_transactions::execution::checked::execute_command runs 246 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 146 over it, 2.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.
  • FunctionTooLong: sui_kv_rpc::v2::list_events::list_events crates/sui-kv-rpc/src/v2/list_events.rs:79 — FunctionTooLong — sui_kv_rpc::v2::list_events::list_events runs 237 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 137 over it, 2.37× 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: sui_adapter_latest::execution_engine::checked::execution_loop sui-execution/latest/sui-adapter/src/execution_engine.rs:1572 — FunctionTooLong — sui_adapter_latest::execution_engine::checked::execution_loop runs 230 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 130 over it, 2.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: sui_adapter_v3::execution_engine::checked::execution_loop sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.rs:547 — FunctionTooLong — sui_adapter_v3::execution_engine::checked::execution_loop 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.
  • FunctionTooLong: sui_tool::download_formal_snapshot crates/sui-tool/src/lib.rs:786 — FunctionTooLong — sui_tool::download_formal_snapshot runs 220 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 120 over it, 2.20× 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: sui_adapter_latest::static_programmable_transactions::execution::interpreter::execute_command sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/interpreter.rs:157 — FunctionTooLong — sui_adapter_latest::static_programmable_transactions::execution::interpreter::execute_command runs 210 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 110 over it, 2.10× 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: sui_adapter_v3::static_programmable_transactions::execution::interpreter::execute_command sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/interpreter.rs:146 — FunctionTooLong — sui_adapter_v3::static_programmable_transactions::execution::interpreter::execute_command runs 204 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 104 over it, 2.04× 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: sui_inverted_index::bitmap_query::stream::eval_bitmap_query_bucket_stream crates/sui-inverted-index/src/bitmap_query/stream.rs:185 — FunctionTooLong — sui_inverted_index::bitmap_query::stream::eval_bitmap_query_bucket_stream runs 202 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 102 over it, 2.02× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: sui_core::transaction_simulation::simulate_transaction crates/sui-core/src/transaction_simulation.rs:60 — FunctionTooLong — sui_core::transaction_simulation::simulate_transaction runs 199 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 99 over it, 1.99× 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: sui::upgrade_compatibility::function_signature_mismatch_diag crates/sui/src/upgrade_compatibility/mod.rs:1203 — FunctionTooLong — sui::upgrade_compatibility::function_signature_mismatch_diag 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: sui_rpc_api::grpc::v2::transaction_execution_service::simulate::simulate_transaction crates/sui-rpc-api/src/grpc/v2/transaction_execution_service/simulate/mod.rs:45 — FunctionTooLong — sui_rpc_api::grpc::v2::transaction_execution_service::simulate::simulate_transaction 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.
  • FunctionTooLong: sui_rpc_api::grpc::v2::ledger_service::list_transactions::next_transaction_chunk crates/sui-rpc-api/src/grpc/v2/ledger_service/list_transactions.rs:279 — FunctionTooLong — sui_rpc_api::grpc::v2::ledger_service::list_transactions::next_transaction_chunk runs 188 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 88 over it, 1.88× 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: sui_core::generate_format::get_registry crates/sui-core/src/generate_format.rs:71 — FunctionTooLong — sui_core::generate_format::get_registry runs 183 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 83 over it, 1.83× 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: sui_move_natives_v2::all_natives sui-execution/historical-versions/v2/sui-move-natives/src/lib.rs:614 — FunctionTooLong — sui_move_natives_v2::all_natives runs 183 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 83 over it, 1.83× 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: sui::sui_commands::genesis crates/sui/src/sui_commands.rs:1373 — FunctionTooLong — sui::sui_commands::genesis runs 179 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 79 over it, 1.79× 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: sui_kv_rpc::v2::list_checkpoints::list_checkpoints crates/sui-kv-rpc/src/v2/list_checkpoints.rs:91 — FunctionTooLong — sui_kv_rpc::v2::list_checkpoints::list_checkpoints runs 178 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 78 over it, 1.78× 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: sui_adapter_v2::execution_engine::checked::execution_loop sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs:470 — FunctionTooLong — sui_adapter_v2::execution_engine::checked::execution_loop runs 175 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 75 over it, 1.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.
  • + 75 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×75
  • Duplicated block (8 lines × 2) crates/sui-bridge-indexer-alt/src/handlers/token_transfer_data_handler.rs:55 — crates/sui-bridge-indexer-alt/src/handlers/token_transfer_data_handler.rs:55-62 | crates/sui-bridge-indexer-alt/src/handlers/token_transfer_data_handler.rs:72-79 — both copies are in the same file, so extract the 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) crates/sui-bridge-indexer/src/eth_bridge_indexer.rs:558 — crates/sui-bridge-indexer/src/eth_bridge_indexer.rs:558-565 | crates/sui-bridge-indexer/src/eth_bridge_indexer.rs:591-598 — both copies are in the same file, so extract the 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) crates/sui-config/src/node.rs:737 — crates/sui-config/src/node.rs:737-744 | crates/sui-config/src/node.rs:774-782 — both copies are in the same file, so extract the 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) crates/sui-config/src/node.rs:749 — crates/sui-config/src/node.rs:749-756 | crates/sui-config/src/node.rs:761-769 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) crates/sui-config/src/node.rs:787 — crates/sui-config/src/node.rs:787-795 | crates/sui-config/src/node.rs:812-819 — both copies are in the same file, so extract the 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) crates/sui-core/src/authority/authority_store_tables.rs:569 — crates/sui-core/src/authority/authority_store_tables.rs:569-576 | crates/sui-core/src/authority/authority_store_tables.rs:586-593 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) crates/sui-core/src/storage.rs:356 — crates/sui-core/src/storage.rs:356-363 | crates/sui-network/src/state_sync/mod.rs:906-913 — 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) crates/sui-core/src/unit_tests/unit_test_utils.rs:70 — crates/sui-core/src/unit_tests/unit_test_utils.rs:70-77 | crates/sui/src/generate_genesis_checkpoint.rs:34-41 — 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) crates/sui-fork/src/gql/queries.rs:958 — crates/sui-fork/src/gql/queries.rs:958-965 | crates/sui-fork/src/gql/queries.rs:983-990 — both copies are in the same file, so extract the 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) crates/sui-genesis-builder/src/lib.rs:486 — crates/sui-genesis-builder/src/lib.rs:486-493 | crates/sui-genesis-builder/src/lib.rs:507-514 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) crates/sui-indexer-alt-consistent-store/src/rpc/consistent_service/list_objects_by_type.rs:59 — crates/sui-indexer-alt-consistent-store/src/rpc/consistent_service/list_objects_by_type.rs:59-66 | crates/sui-indexer-alt-consistent-store/src/rpc/consistent_service/list_owned_objects.rs:124-131 — 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) crates/sui-indexer-alt-graphql/src/api/mutation.rs:122 — crates/sui-indexer-alt-graphql/src/api/mutation.rs:122-129 | crates/sui-indexer-alt-graphql/src/api/query.rs:920-927 — 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) crates/sui-indexer-alt-graphql/src/api/types/move_package.rs:824 — crates/sui-indexer-alt-graphql/src/api/types/move_package.rs:824-831 | crates/sui-indexer-alt-graphql/src/api/types/move_package.rs:915-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.
  • Duplicated block (8 lines × 2) crates/sui-indexer-alt-graphql/src/extensions/query_limits/payload.rs:123 — crates/sui-indexer-alt-graphql/src/extensions/query_limits/payload.rs:123-130 | crates/sui-indexer-alt-graphql/src/extensions/query_limits/payload.rs:223-230 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) crates/sui-kv-rpc/src/v2/get_transaction.rs:26 — crates/sui-kv-rpc/src/v2/get_transaction.rs:26-33 | crates/sui-rpc-api/src/grpc/v2/ledger_service/get_transaction.rs:105-112 — 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) crates/sui-kvstore/src/bigtable/client/flow_control.rs:484 — crates/sui-kvstore/src/bigtable/client/flow_control.rs:484-491 | crates/sui-kvstore/src/bigtable/client/flow_control.rs:532-539 — both copies are in the same file, so extract the 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) crates/sui-node/src/db_shell.rs:233 — crates/sui-node/src/db_shell.rs:233-240 | crates/sui-tool/src/db_shell/vfs.rs:248-255 — 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) crates/sui-node/src/db_shell.rs:672 — crates/sui-node/src/db_shell.rs:672-679 | crates/sui-node/src/db_shell.rs:683-690 — both copies are in the same file, so extract the 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) crates/sui-node/src/db_shell.rs:701 — crates/sui-node/src/db_shell.rs:701-708 | crates/sui-node/src/db_shell.rs:712-719 — both copies are in the same file, so extract the 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) crates/sui-package-resolver/src/lib.rs:873 — crates/sui-package-resolver/src/lib.rs:873-880 | crates/sui-package-resolver/src/lib.rs:886-893 — both copies are in the same file, so extract the 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) crates/sui-replay-2/src/package_tools.rs:393 — crates/sui-replay-2/src/package_tools.rs:393-400 | crates/sui-types/src/move_package.rs:857-864 — 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) crates/sui-rosetta/src/operations.rs:406 — crates/sui-rosetta/src/operations.rs:406-413 | crates/sui-rosetta/src/operations.rs:439-446 — both copies are in the same file, so extract the 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) crates/sui-rpc-api/src/grpc/v2/ledger_service/get_object.rs:32 — crates/sui-rpc-api/src/grpc/v2/ledger_service/get_object.rs:32-39 | crates/sui-rpc-api/src/grpc/v2/state_service/list_owned_objects.rs:78-85 — 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) crates/sui-rpc-api/src/grpc/v2/state_service/list_dynamic_fields.rs:92 — crates/sui-rpc-api/src/grpc/v2/state_service/list_dynamic_fields.rs:92-99 | crates/sui-rpc-api/src/grpc/v2/state_service/list_owned_objects.rs:92-99 — before extracting anything, compare `crates/sui-rpc-api/src/grpc/v2/state_service/list_dynamic_fields.rs` and `crates/sui-rpc-api/src/grpc/v2/state_service/list_owned_objects.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 46 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 2) crates/sui-rpc-api/src/ledger_history/filter.rs:62 — crates/sui-rpc-api/src/ledger_history/filter.rs:62-69 | crates/sui-rpc-api/src/ledger_history/filter.rs:95-102 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • + 50 more in this group — see findings.md.
D3 · God Classes · ClassTooLong · ×74
  • ClassTooLong: AuthorityState crates/sui-core/src/authority.rs:1011 — ClassTooLong — 2608 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 136 methods, 2 blocks, lines 1011-4934. The bar is 400 significant lines; this is 2208 over it, 6.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: ProtocolConfig crates/sui-protocol-config/src/lib.rs:1512 — ClassTooLong — 2269 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 1512-5253. The bar is 400 significant lines; this is 1869 over it, 5.67× 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: AuthorityPerEpochStore crates/sui-core/src/authority/authority_per_epoch_store.rs:312 — ClassTooLong — 1793 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 148 methods, 2 blocks, lines 312-3560. The bar is 400 significant lines; this is 1393 over it, 4.48× 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: SuiNode crates/sui-node/src/lib.rs:255 — ClassTooLong — 1786 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 53 methods, 5 blocks, lines 255-2805. The bar is 400 significant lines; this is 1386 over it, 4.47× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: ConsensusHandler crates/sui-core/src/consensus_handler.rs:722 — ClassTooLong — 1675 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 35 methods, 3 blocks, lines 722-3356. The bar is 400 significant lines; this is 1275 over it, 4.19× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: WritebackCache crates/sui-core/src/execution_cache/writeback_cache.rs:427 — ClassTooLong — 1360 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 29 methods, 9 blocks, lines 427-2581. The bar is 400 significant lines; this is 960 over it, 3.40× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: BigTableClient crates/sui-kvstore/src/bigtable/client/mod.rs:183 — ClassTooLong — 1341 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 39 methods, 4 blocks, lines 183-2383. The bar is 400 significant lines; this is 941 over it, 3.35× 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: Operations crates/sui-rosetta/src/operations.rs:51 — ClassTooLong — 1213 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 40 methods, 5 blocks, lines 184-2042. The bar is 400 significant lines; this is 813 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.
  • ClassTooLong: ValidatorService crates/sui-core/src/authority_server.rs:432 — ClassTooLong — 1179 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 29 methods, 4 blocks, lines 432-2345. The bar is 400 significant lines; this is 779 over it, 2.95× 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: SuiClientCommands crates/sui/src/client_commands.rs:136 — ClassTooLong — 1147 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 2 methods, 2 blocks, lines 136-2009. The bar is 400 significant lines; this is 747 over it, 2.87× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: Context sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/context.rs:257 — ClassTooLong — 993 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 34 methods, 2 blocks, lines 257-1613. The bar is 400 significant lines; this is 593 over it, 2.48× 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: AuthorityStore crates/sui-core/src/authority/authority_store.rs:101 — ClassTooLong — 908 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 53 methods, 4 blocks, lines 101-1408. The bar is 400 significant lines; this is 508 over it, 2.27× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: NodeMetrics consensus/core/src/metrics.rs:126 — ClassTooLong — 907 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 1 methods, 2 blocks, lines 126-1037. The bar is 400 significant lines; this is 507 over it, 2.27× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: KeyToolCommand crates/sui/src/keytool.rs:72 — ClassTooLong — 858 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 1 methods, 2 blocks, lines 72-1377. The bar is 400 significant lines; this is 458 over it, 2.15× 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: DagState consensus/core/src/dag_state.rs:42 — ClassTooLong — 802 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 52 methods, 2 blocks, lines 42-1423. The bar is 400 significant lines; this is 402 over it, 2.01× 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: DBMap crates/typed-store/src/rocks/mod.rs:631 — ClassTooLong — 798 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 20 methods, 3 blocks, lines 631-2092. The bar is 400 significant lines; this is 398 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: TemporaryStore sui-execution/latest/sui-adapter/src/temporary_store.rs:96 — ClassTooLong — 795 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 42 methods, 8 blocks, lines 96-1510. The bar is 400 significant lines; this is 395 over it, 1.99× 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: Context sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/context.rs:155 — ClassTooLong — 781 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 31 methods, 2 blocks, lines 155-1235. The bar is 400 significant lines; this is 381 over it, 1.95× 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: Synchronizer consensus/core/src/synchronizer.rs:252 — ClassTooLong — 775 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 13 methods, 2 blocks, lines 252-1390. The bar is 400 significant lines; this is 375 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: TemporaryStore sui-execution/historical-versions/v2/sui-adapter/src/temporary_store.rs:33 — ClassTooLong — 749 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 32 methods, 10 blocks, lines 33-1251. The bar is 400 significant lines; this is 349 over it, 1.87× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: TransactionBuilder crates/sui-transaction-builder/src/lib.rs:49 — ClassTooLong — 734 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 35 methods. The bar is 400 significant lines; this is 334 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: TemporaryStore sui-execution/historical-versions/v3/sui-adapter/src/temporary_store.rs:40 — ClassTooLong — 723 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 34 methods, 10 blocks, lines 40-1328. The bar is 400 significant lines; this is 323 over it, 1.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: TemporaryStore sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs:33 — ClassTooLong — 712 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 32 methods, 10 blocks, lines 33-1197. The bar is 400 significant lines; this is 312 over it, 1.78× 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: CheckpointStore crates/sui-core/src/checkpoints/mod.rs:378 — ClassTooLong — 710 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 378-1333. The bar is 400 significant lines; this is 310 over it, 1.78× 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: AuthorityStorePruner crates/sui-core/src/authority/authority_store_pruner.rs:67 — ClassTooLong — 708 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 15 methods, 2 blocks, lines 67-1141. The bar is 400 significant lines; this is 308 over it, 1.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.
  • + 49 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×70
  • Duplicated block (9 lines × 2) consensus/config/src/committee.rs:41 — consensus/config/src/committee.rs:41-49 | consensus/config/src/committee.rs:93-101 — both copies are in the same file, so extract the 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) consensus/core/src/authority_service.rs:299 — consensus/core/src/authority_service.rs:299-310 | consensus/core/src/authority_service.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.
  • Duplicated block (9 lines × 2) crates/sui-benchmark/src/workloads/addr_bal_deposit.rs:328 — crates/sui-benchmark/src/workloads/addr_bal_deposit.rs:328-336 | crates/sui-single-node-benchmark/src/tx_generator/send_funds_tx_generator.rs:50-58 — 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) crates/sui-benchmark/src/workloads/randomized_transaction.rs:632 — crates/sui-benchmark/src/workloads/randomized_transaction.rs:632-640 | crates/sui-benchmark/src/workloads/randomized_transaction.rs:681-689 — both copies are in the same file, so extract the 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) crates/sui-bridge/src/client/bridge_client.rs:143 — crates/sui-bridge/src/client/bridge_client.rs:143-151 | crates/sui-bridge/src/client/bridge_client.rs:175-183 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) crates/sui-consistent-store/src/map.rs:310 — crates/sui-consistent-store/src/map.rs:310-318 | crates/sui-consistent-store/src/map.rs:364-372 — both copies are in the same file, so extract the 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) crates/sui-core/src/checkpoints/checkpoint_executor/data_ingestion_handler.rs:111 — crates/sui-core/src/checkpoints/checkpoint_executor/data_ingestion_handler.rs:111-119 | crates/sui-types/src/storage/read_store.rs:233-241 — 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) crates/sui-display/src/v2/interpreter.rs:143 — crates/sui-display/src/v2/interpreter.rs:143-151 | crates/sui-display/src/v2/interpreter.rs:167-175 — both copies are in the same file, so extract the 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) crates/sui-display/src/v2/visitor/extractor.rs:208 — crates/sui-display/src/v2/visitor/extractor.rs:208-216 | crates/sui-display/src/v2/visitor/extractor.rs:236-244 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) crates/sui-json-rpc-types/src/sui_move.rs:548 — crates/sui-json-rpc-types/src/sui_move.rs:548-556 | crates/sui-json-rpc-types/src/sui_move.rs:622-630 — both copies are in the same file, so extract the 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) crates/sui-json-rpc-types/src/sui_transaction.rs:326 — crates/sui-json-rpc-types/src/sui_transaction.rs:326-334 | crates/sui/src/displays/dry_run_tx_block.rs:42-50 — before extracting anything, compare `crates/sui-json-rpc-types/src/sui_transaction.rs` and `crates/sui/src/displays/dry_run_tx_block.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 67 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 2) crates/sui-json-rpc-types/src/sui_transaction.rs:1918 — crates/sui-json-rpc-types/src/sui_transaction.rs:1918-1926 | crates/sui-json-rpc-types/src/sui_transaction.rs:1942-1950 — both copies are in the same file, so extract the 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) crates/sui-kv-rpc/src/v2/list_transactions.rs:604 — crates/sui-kv-rpc/src/v2/list_transactions.rs:604-612 | crates/sui-rpc-api/src/grpc/v2/ledger_service/list_transactions.rs:629-637 — before extracting anything, compare `crates/sui-kv-rpc/src/v2/list_transactions.rs` and `crates/sui-rpc-api/src/grpc/v2/ledger_service/list_transactions.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 2) crates/sui-node/src/lib.rs:2165 — crates/sui-node/src/lib.rs:2165-2173 | crates/sui-node/src/lib.rs:2216-2224 — both copies are in the same file, so extract the 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) crates/sui-package-resolver/src/lib.rs:820 — crates/sui-package-resolver/src/lib.rs:820-828 | crates/sui/src/clever_error_rendering.rs:73-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.
  • Duplicated block (9 lines × 2) crates/sui-package-resolver/src/lib.rs:1792 — crates/sui-package-resolver/src/lib.rs:1792-1800 | REDACTED:1705-1713 — 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) crates/sui-rosetta/src/types/internal_operation/stake.rs:299 — crates/sui-rosetta/src/types/internal_operation/stake.rs:299-307 | crates/sui-rosetta/src/types/internal_operation/stake.rs:352-360 — both copies are in the same file, so extract the 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) crates/sui-rpc-api/src/grpc/v2/ledger_service/get_checkpoint.rs:107 — crates/sui-rpc-api/src/grpc/v2/ledger_service/get_checkpoint.rs:107-115 | crates/sui-types/src/rpc_proto_conversions.rs:56-64 — 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) crates/sui-types/src/object/bounded_visitor.rs:249 — crates/sui-types/src/object/bounded_visitor.rs:249-257 | crates/sui-types/src/object/bounded_visitor.rs:277-285 — both copies are in the same file, so extract the 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) crates/sui-types/src/transaction.rs:1957 — crates/sui-types/src/transaction.rs:1957-1965 | crates/sui-types/src/transaction.rs:2105-2113 — both copies are in the same file, so extract the 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) sui-execution/historical-versions/v3/sui-adapter/src/gas_charger.rs:386 — sui-execution/historical-versions/v3/sui-adapter/src/gas_charger.rs:386-394 | sui-execution/latest/sui-adapter/src/gas_charger.rs:652-660 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/gas_charger.rs` and `sui-execution/latest/sui-adapter/src/gas_charger.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 54 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/context.rs:1323 — sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/context.rs:1323-1331 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/env.rs:664-672 — 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) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/env.rs:330 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/env.rs:330-338 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/env.rs:354-362 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/env.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/env.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 78 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/loading/translate.rs:76 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/loading/translate.rs:76-84 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/loading/translate.rs:94-102 — 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) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/metering/loading.rs:47 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/metering/loading.rs:47-55 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/metering/loading.rs:60-68 — 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.
  • + 45 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×68
  • Duplicated block (7 lines × 2) crates/sui-analytics-indexer/src/config.rs:205 — crates/sui-analytics-indexer/src/config.rs:205-211 | crates/sui-kvstore/src/config.rs:308-314 — 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) crates/sui-data-store/src/gql_queries.rs:336 — crates/sui-data-store/src/gql_queries.rs:336-342 | crates/sui-fork/src/gql/queries.rs:1908-1914 — before extracting anything, compare `crates/sui-data-store/src/gql_queries.rs` and `crates/sui-fork/src/gql/queries.rs` 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) crates/sui-display/src/v2/visitor/extractor.rs:158 — crates/sui-display/src/v2/visitor/extractor.rs:158-164 | crates/sui-display/src/v2/visitor/extractor.rs:223-229 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) crates/sui-indexer-alt-consistent-store/src/rpc/consistent_service/list_objects_by_type.rs:52 — crates/sui-indexer-alt-consistent-store/src/rpc/consistent_service/list_objects_by_type.rs:52-58 | crates/sui-indexer-alt-consistent-store/src/rpc/consistent_service/list_owned_objects.rs:117-123 — 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) crates/sui-inverted-index/src/dimensions.rs:363 — crates/sui-inverted-index/src/dimensions.rs:363-369 | crates/sui-inverted-index/src/dimensions.rs:392-398 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) crates/sui-kvstore/src/bigtable/client/mod.rs:2252 — crates/sui-kvstore/src/bigtable/client/mod.rs:2252-2258 | crates/sui-kvstore/src/bigtable/client/mod.rs:2362-2368 — both copies are in the same file, so extract the 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) crates/sui-kvstore/src/handlers/packages.rs:30 — crates/sui-kvstore/src/handlers/packages.rs:30-36 | crates/sui-kvstore/src/handlers/packages_by_id.rs:26-32 — 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) crates/sui-rosetta/src/account.rs:328 — crates/sui-rosetta/src/account.rs:328-334 | crates/sui-rosetta/src/types/internal_operation/consolidate_to_fungible.rs:189-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.
  • Duplicated block (7 lines × 2) crates/sui-rosetta/src/types/internal_operation/pay_sui.rs:308 — crates/sui-rosetta/src/types/internal_operation/pay_sui.rs:308-314 | crates/sui-rosetta/src/types/internal_operation/stake.rs:363-369 — before extracting anything, compare `crates/sui-rosetta/src/types/internal_operation/pay_sui.rs` and `crates/sui-rosetta/src/types/internal_operation/stake.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 218 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 2) crates/sui-rpc-store/src/reader/indexes.rs:554 — crates/sui-rpc-store/src/reader/indexes.rs:554-560 | crates/sui-rpc-store/src/reader/indexes.rs:576-582 — both copies are in the same file, so extract the 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) crates/sui-types/src/bridge.rs:295 — crates/sui-types/src/bridge.rs:295-301 | crates/sui-types/src/bridge.rs:328-334 — both copies are in the same file, so extract the 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) crates/sui-types/src/multisig.rs:535 — crates/sui-types/src/multisig.rs:535-541 | crates/sui-types/src/multisig_legacy.rs:67-73 — before extracting anything, compare `crates/sui-types/src/multisig.rs` and `crates/sui-types/src/multisig_legacy.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 42 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 2) crates/sui-types/src/rpc_proto_conversions.rs:2586 — crates/sui-types/src/rpc_proto_conversions.rs:2586-2592 | crates/sui-types/src/rpc_proto_conversions.rs:2606-2612 — both copies are in the same file, so extract the 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) crates/sui/src/external_signer.rs:127 — crates/sui/src/external_signer.rs:127-133 | crates/sui/src/keytool.rs:1449-1455 — 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) crates/sui/src/validator_commands.rs:1340 — crates/sui/src/validator_commands.rs:1340-1346 | crates/sui/src/validator_commands.rs:1356-1362 — both copies are in the same file, so extract the 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) sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:218 — sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:218-224 | sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs:223-229 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs` and `sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs` as WHOLE FILES: this scan already matched 61 separate duplicated blocks between them, totalling at least 1074 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) sui-execution/historical-versions/v3/sui-adapter/src/gas_meter.rs:253 — sui-execution/historical-versions/v3/sui-adapter/src/gas_meter.rs:253-259 | sui-execution/latest/sui-adapter/src/gas_meter.rs:272-278 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/gas_meter.rs` and `sui-execution/latest/sui-adapter/src/gas_meter.rs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 123 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) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/env.rs:643 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/env.rs:643-649 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/env.rs:583-589 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/env.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/env.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 78 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) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/values.rs:411 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/values.rs:411-417 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/values.rs:464-470 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/values.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/values.rs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 118 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) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/loading/ast.rs:336 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/loading/ast.rs:336-342 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/loading/ast.rs:432-438 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/loading/ast.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/loading/ast.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 134 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) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/loading/ast.rs:350 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/loading/ast.rs:350-356 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/loading/ast.rs:446-452 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/loading/ast.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/loading/ast.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 134 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) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/ast.rs:194 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/ast.rs:194-200 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/ast.rs:208-214 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/ast.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/ast.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 74 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) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/ast.rs:328 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/ast.rs:328-334 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/ast.rs:342-348 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/ast.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/ast.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 74 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) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs:513 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs:513-519 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs:1460-1466 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs` as WHOLE FILES: this scan already matched 35 separate duplicated blocks between them, totalling at least 484 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) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/type_check.rs:377 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/type_check.rs:377-383 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/type_check.rs:407-413 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/type_check.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/type_check.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 289 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.
  • + 43 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×65
  • Duplicated block (6 lines × 2) crates/sui-bridge/src/abi.rs:215 — crates/sui-bridge/src/abi.rs:215-220 | crates/sui-bridge/src/abi.rs:244-249 — both copies are in the same file, so extract the 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) crates/sui-bridge/src/eth_transaction_builder.rs:138 — crates/sui-bridge/src/eth_transaction_builder.rs:138-143 | crates/sui-bridge/src/eth_transaction_builder.rs:159-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.
  • Duplicated block (6 lines × 2) crates/sui-core/src/authority.rs:3134 — crates/sui-core/src/authority.rs:3134-3139 | crates/sui-core/src/authority.rs:3163-3168 — both copies are in the same file, so extract the 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) crates/sui-core/src/consensus_handler.rs:2206 — crates/sui-core/src/consensus_handler.rs:2206-2211 | crates/sui-core/src/consensus_handler.rs:2222-2227 — both copies are in the same file, so extract the 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) crates/sui-core/src/transaction_input_loader.rs:51 — crates/sui-core/src/transaction_input_loader.rs:51-57 | crates/sui-core/src/transaction_input_loader.rs:159-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.
  • Duplicated block (6 lines × 2) crates/sui-display/src/v2/visitor/extractor.rs:133 — crates/sui-display/src/v2/visitor/extractor.rs:133-138 | crates/sui-display/src/v2/visitor/extractor.rs:224-229 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) crates/sui-fork/src/services.rs:185 — crates/sui-fork/src/services.rs:185-190 | crates/sui-fork/src/services.rs:412-417 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) crates/sui-fork/src/services.rs:293 — crates/sui-fork/src/services.rs:293-298 | crates/sui-rpc-store/src/config.rs:248-253 — 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) crates/sui-indexer-alt-graphql/src/api/types/move_package.rs:686 — crates/sui-indexer-alt-graphql/src/api/types/move_package.rs:686-691 | crates/sui-indexer-alt-graphql/src/api/types/object.rs:762-769 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (6 lines × 2) crates/sui-indexer-alt-graphql/src/api/types/move_package.rs:917 — crates/sui-indexer-alt-graphql/src/api/types/move_package.rs:917-922 | crates/sui-indexer-alt-graphql/src/api/types/object.rs:973-978 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (6 lines × 2) crates/sui-indexer-alt-reader/src/fullnode_client.rs:189 — crates/sui-indexer-alt-reader/src/fullnode_client.rs:189-194 | crates/sui-indexer-alt-reader/src/fullnode_client.rs:251-256 — both copies are in the same file, so extract the 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) crates/sui-kv-rpc/src/pipeline.rs:801 — crates/sui-kv-rpc/src/pipeline.rs:801-806 | crates/sui-kv-rpc/src/pipeline.rs:816-821 — both copies are in the same file, so extract the 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) crates/sui-rosetta/src/account.rs:327 — crates/sui-rosetta/src/account.rs:327-332 | crates/sui-rosetta/src/types/internal_operation/merge_and_redeem.rs:249-254 — 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) crates/sui-types/src/effects/effects_v1.rs:234 — crates/sui-types/src/effects/effects_v1.rs:234-239 | crates/sui-types/src/effects/effects_v1.rs:252-257 — both copies are in the same file, so extract the 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) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/env.rs:541 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/env.rs:541-546 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/env.rs:496-501 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/env.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/env.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 78 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/context.rs:574 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/context.rs:574-579 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/context.rs:872-877 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/context.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/context.rs` as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 625 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/context.rs:647 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/context.rs:647-652 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/context.rs:945-950 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/context.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/context.rs` as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 625 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/metering/pre_translation.rs:48 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/metering/pre_translation.rs:48-53 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/metering/pre_translation.rs:48-53 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/metering/pre_translation.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/metering/pre_translation.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 (6 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/ast.rs:298 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/ast.rs:298-303 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/ast.rs:312-317 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/ast.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/ast.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 74 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/ast.rs:335 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/ast.rs:335-340 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/ast.rs:349-354 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/ast.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/ast.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 74 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/translate.rs:736 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/translate.rs:736-741 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/translate.rs:746-751 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/translate.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/translate.rs` as WHOLE FILES: this scan already matched 40 separate duplicated blocks between them, totalling at least 589 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/translate.rs:1026 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/translate.rs:1026-1031 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/translate.rs:1041-1046 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/translate.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/translate.rs` as WHOLE FILES: this scan already matched 40 separate duplicated blocks between them, totalling at least 589 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/drop_safety.rs:234 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/drop_safety.rs:234-239 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/verify/drop_safety.rs:236-241 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/drop_safety.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/verify/drop_safety.rs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 196 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/private_entry_arguments.rs:66 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/private_entry_arguments.rs:66-71 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/verify/private_entry_arguments.rs:64-69 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/private_entry_arguments.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/verify/private_entry_arguments.rs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 136 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 2) sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/verify/drop_safety.rs:290 — sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/verify/drop_safety.rs:290-295 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/verify/memory_safety.rs:279-284 — 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.
  • + 40 more in this group — see findings.md.
D4 · Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) · ×62
  • Members sharing a duplicated core (4 members, 50+ identical tokens) crates/simulacrum/src/store/in_mem_store.rs:237 — crates/simulacrum/src/store/in_mem_store.rs:237-262 | crates/sui-transactional-test-runner/src/simulator_persisted_store.rs:410-435 | crates/sui-transactional-test-runner/src/simulator_persisted_store.rs:691-716 | crates/sui-types/src/in_memory_storage.rs:46-68 — 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) crates/sui-analytics-indexer/src/handlers/tables/df.rs:140 — crates/sui-analytics-indexer/src/handlers/tables/df.rs:140-174 | crates/sui-analytics-indexer/src/handlers/tables/event.rs:49-99 | crates/sui-analytics-indexer/src/handlers/tables/move_call.rs:35-62 | crates/sui-analytics-indexer/src/handlers/tables/object.rs:247-305 — 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) crates/sui-consistent-store/src/batch.rs:151 — crates/sui-consistent-store/src/batch.rs:151-165 | crates/sui-consistent-store/src/batch.rs:173-184 | crates/sui-consistent-store/src/batch.rs:215-230 | crates/sui-consistent-store/src/batch.rs:259-273 — 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) crates/sui-data-store/src/stores/filesystem.rs:644 — crates/sui-data-store/src/stores/filesystem.rs:644-715 | crates/sui-data-store/src/stores/graphql.rs:359-436 | crates/sui-data-store/src/stores/in_memory.rs:386-473 | crates/sui-data-store/src/stores/in_memory_lru.rs:314-385 — 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) crates/sui-indexer-alt-consistent-store/src/handlers/mod.rs:25 — crates/sui-indexer-alt-consistent-store/src/handlers/mod.rs:25-72 | crates/sui-indexer-alt-consistent-store/src/handlers/mod.rs:78-106 | crates/sui-rpc-store/src/indexer/mod.rs:116-157 | crates/sui-rpc-store/src/indexer/mod.rs:169-196 — 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) crates/sui-indexer-alt-reader/src/cp_sequence_numbers.rs:27 — crates/sui-indexer-alt-reader/src/cp_sequence_numbers.rs:27-45 | crates/sui-indexer-alt-reader/src/epochs.rs:40-58 | crates/sui-indexer-alt-reader/src/epochs.rs:69-121 | crates/sui-indexer-alt-reader/src/epochs.rs:129-147 — 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) crates/sui-indexer-alt/src/handlers/tx_affected_addresses.rs:35 — crates/sui-indexer-alt/src/handlers/tx_affected_addresses.rs:35-81 | crates/sui-indexer-alt/src/handlers/tx_affected_objects.rs:31-58 | crates/sui-indexer-alt/src/handlers/tx_balance_changes.rs:36-61 | crates/sui-indexer-alt/src/handlers/tx_kinds.rs:31-56 — 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) crates/sui-kv-rpc/src/v2/move_package_service.rs:165 — crates/sui-kv-rpc/src/v2/move_package_service.rs:165-186 | crates/sui-kv-rpc/src/v2/move_package_service.rs:191-212 | crates/sui-rpc-api/src/grpc/v2/move_package_service/get_datatype.rs:18-39 | crates/sui-rpc-api/src/grpc/v2/move_package_service/get_function.rs:19-40 — 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) sui-execution/historical-versions/v0/sui-adapter/src/execution_mode.rs:258 — sui-execution/historical-versions/v0/sui-adapter/src/execution_mode.rs:258-280 | sui-execution/historical-versions/v1/sui-adapter/src/execution_mode.rs:258-280 | sui-execution/historical-versions/v2/sui-adapter/src/execution_mode.rs:258-280 | sui-execution/historical-versions/v3/sui-adapter/src/execution_mode.rs:353-375 — 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) sui-execution/historical-versions/v0/sui-adapter/src/execution_value.rs:152 — sui-execution/historical-versions/v0/sui-adapter/src/execution_value.rs:152-159 | sui-execution/historical-versions/v1/sui-adapter/src/execution_value.rs:152-159 | sui-execution/historical-versions/v2/sui-adapter/src/execution_value.rs:152-159 | sui-execution/historical-versions/v3/sui-adapter/src/execution_value.rs:191-198 — 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) sui-execution/historical-versions/v0/sui-adapter/src/execution_value.rs:171 — sui-execution/historical-versions/v0/sui-adapter/src/execution_value.rs:171-188 | sui-execution/historical-versions/v1/sui-adapter/src/execution_value.rs:171-188 | sui-execution/historical-versions/v2/sui-adapter/src/execution_value.rs:171-188 | sui-execution/historical-versions/v3/sui-adapter/src/execution_value.rs:219-236 — 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) sui-execution/historical-versions/v0/sui-adapter/src/execution_value.rs:229 — sui-execution/historical-versions/v0/sui-adapter/src/execution_value.rs:229-236 | sui-execution/historical-versions/v1/sui-adapter/src/execution_value.rs:229-236 | sui-execution/historical-versions/v2/sui-adapter/src/execution_value.rs:229-236 | sui-execution/historical-versions/v3/sui-adapter/src/execution_value.rs:312-319 — 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) sui-execution/historical-versions/v0/sui-adapter/src/execution_value.rs:254 — sui-execution/historical-versions/v0/sui-adapter/src/execution_value.rs:254-268 | sui-execution/historical-versions/v1/sui-adapter/src/execution_value.rs:254-268 | sui-execution/historical-versions/v2/sui-adapter/src/execution_value.rs:254-268 | sui-execution/historical-versions/v3/sui-adapter/src/execution_value.rs:337-351 — 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) sui-execution/historical-versions/v0/sui-adapter/src/gas_charger.rs:128 — sui-execution/historical-versions/v0/sui-adapter/src/gas_charger.rs:128-198 | sui-execution/historical-versions/v1/sui-adapter/src/gas_charger.rs:129-199 | sui-execution/historical-versions/v2/sui-adapter/src/gas_charger.rs:129-200 | sui-execution/historical-versions/v3/sui-adapter/src/gas_charger.rs:157-229 — 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) sui-execution/historical-versions/v0/sui-adapter/src/gas_charger.rs:263 — sui-execution/historical-versions/v0/sui-adapter/src/gas_charger.rs:263-314 | sui-execution/historical-versions/v1/sui-adapter/src/gas_charger.rs:272-323 | sui-execution/historical-versions/v2/sui-adapter/src/gas_charger.rs:273-324 | sui-execution/historical-versions/v3/sui-adapter/src/gas_charger.rs:320-416 — 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) sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/context.rs:119 — sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/context.rs:119-219 | sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:128-210 | sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs:133-215 | sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/context.rs:164-252 — 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) sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/context.rs:547 — sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/context.rs:547-838 | sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:556-771 | sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs:574-828 | sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/context.rs:803-1054 — 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) sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/context.rs:846 — sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/context.rs:846-865 | sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:779-798 | sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs:836-855 | sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/context.rs:2165-2183 — 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) sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/context.rs:999 — sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/context.rs:999-1014 | sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:949-964 | sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs:1006-1021 | sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/context.rs:1379-1389 — 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) sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/context.rs:1099 — sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/context.rs:1099-1118 | sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:1069-1097 | sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs:1126-1154 | sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/context.rs:1719-1757 — 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) sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/context.rs:1262 — sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/context.rs:1262-1284 | sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:1265-1287 | sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs:1322-1344 | sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/context.rs:2001-2023 — 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) sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/context.rs:1292 — sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/context.rs:1292-1308 | sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:1295-1311 | sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs:1352-1368 | sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/context.rs:2031-2047 — 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) REDACTED:119 — REDACTED:119-337 | REDACTED:122-341 | REDACTED:127-347 | REDACTED:207-514 — 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) REDACTED:417 — REDACTED:417-435 | REDACTED:421-439 | REDACTED:427-445 | REDACTED:601-619 — 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) REDACTED:828 — REDACTED:828-866 | REDACTED:763-799 | REDACTED:769-805 | REDACTED:1009-1046 — 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.
  • + 37 more in this group — see findings.md.
D31 · IaC & Container Security · Medium IaC · ×61
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 36 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×58
  • Duplicated block (11 lines × 2) consensus/core/src/authority_service.rs:532 — consensus/core/src/authority_service.rs:532-542 | consensus/core/src/authority_service.rs:566-576 — both copies are in the same file, so extract the 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) crates/mysten-metrics/src/monitored_mpsc.rs:240 — crates/mysten-metrics/src/monitored_mpsc.rs:240-250 | crates/mysten-metrics/src/monitored_mpsc.rs:437-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 (11 lines × 2) crates/sui-bridge/src/monitor.rs:164 — crates/sui-bridge/src/monitor.rs:164-174 | crates/sui-bridge/src/monitor.rs:185-195 — both copies are in the same file, so extract the 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) crates/sui-config/src/rpc_config.rs:459 — crates/sui-config/src/rpc_config.rs:459-469 | crates/sui-kv-rpc/src/config.rs:96-106 — 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) crates/sui-core/src/global_state_hasher.rs:394 — crates/sui-core/src/global_state_hasher.rs:394-404 | crates/sui-snapshot/src/lib.rs:326-336 — 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) crates/sui-core/src/transaction_driver/error.rs:292 — crates/sui-core/src/transaction_driver/error.rs:292-302 | crates/sui-core/src/transaction_driver/error.rs:357-367 — both copies are in the same file, so extract the 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) crates/sui-faucet/src/server.rs:134 — crates/sui-faucet/src/server.rs:134-144 | crates/sui-indexer-alt-graphql/src/lib.rs:260-270 — 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) crates/sui-indexer-alt-consistent-store/src/db/mod.rs:511 — crates/sui-indexer-alt-consistent-store/src/db/mod.rs:511-521 | crates/sui-indexer-alt-consistent-store/src/db/mod.rs:550-560 — both copies are in the same file, so extract the 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) crates/sui-indexer-alt-consistent-store/src/indexer.rs:122 — crates/sui-indexer-alt-consistent-store/src/indexer.rs:122-132 | crates/sui-rpc-store/src/indexer/mod.rs:524-534 — 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) crates/sui-indexer-alt-graphql/src/api/types/balance.rs:135 — crates/sui-indexer-alt-graphql/src/api/types/balance.rs:135-145 | crates/sui-indexer-alt-graphql/src/api/types/balance.rs:165-175 — both copies are in the same file, so extract the 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) crates/sui-indexer-alt/src/handlers/kv_epoch_ends.rs:45 — crates/sui-indexer-alt/src/handlers/kv_epoch_ends.rs:45-55 | crates/sui-indexer-alt/src/handlers/kv_epoch_starts.rs:48-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 (11 lines × 2) crates/sui-kv-rpc/src/v2/get_checkpoint.rs:31 — crates/sui-kv-rpc/src/v2/get_checkpoint.rs:31-41 | crates/sui-rpc-api/src/grpc/v2/ledger_service/get_checkpoint.rs:29-39 — 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) crates/sui-rosetta/src/types/internal_operation/consolidate_to_fungible.rs:264 — crates/sui-rosetta/src/types/internal_operation/consolidate_to_fungible.rs:264-274 | crates/sui-rosetta/src/types/internal_operation/merge_and_redeem.rs:915-925 — before extracting anything, compare `crates/sui-rosetta/src/types/internal_operation/consolidate_to_fungible.rs` and `crates/sui-rosetta/src/types/internal_operation/merge_and_redeem.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 45 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (11 lines × 2) crates/sui-rosetta/src/types/internal_operation/pay_sui.rs:110 — crates/sui-rosetta/src/types/internal_operation/pay_sui.rs:110-120 | crates/sui-rosetta/src/types/internal_operation/stake.rs:125-135 — before extracting anything, compare `crates/sui-rosetta/src/types/internal_operation/pay_sui.rs` and `crates/sui-rosetta/src/types/internal_operation/stake.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 218 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (11 lines × 2) crates/sui-rosetta/src/types/internal_operation/pay_sui.rs:132 — crates/sui-rosetta/src/types/internal_operation/pay_sui.rs:132-142 | crates/sui-rosetta/src/types/internal_operation/stake.rs:156-166 — before extracting anything, compare `crates/sui-rosetta/src/types/internal_operation/pay_sui.rs` and `crates/sui-rosetta/src/types/internal_operation/stake.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 218 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (11 lines × 2) crates/sui-rpc-store/src/schema/event_bitmap.rs:184 — crates/sui-rpc-store/src/schema/event_bitmap.rs:184-194 | crates/sui-rpc-store/src/schema/transaction_bitmap.rs:172-182 — before extracting anything, compare `crates/sui-rpc-store/src/schema/event_bitmap.rs` and `crates/sui-rpc-store/src/schema/transaction_bitmap.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 65 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (11 lines × 2) crates/sui-types/src/gas_model/gas_v2.rs:450 — crates/sui-types/src/gas_model/gas_v2.rs:450-460 | crates/sui-types/src/gas_model/gas_v3.rs:375-385 — before extracting anything, compare `crates/sui-types/src/gas_model/gas_v2.rs` and `crates/sui-types/src/gas_model/gas_v3.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 37 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (11 lines × 2) crates/sui-types/src/move_package.rs:849 — crates/sui-types/src/move_package.rs:849-859 | crates/sui-types/src/move_package.rs:864-874 — both copies are in the same file, so extract the 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) crates/sui-types/src/multisig.rs:564 — crates/sui-types/src/multisig.rs:564-574 | crates/sui-types/src/multisig_legacy.rs:306-316 — before extracting anything, compare `crates/sui-types/src/multisig.rs` and `crates/sui-types/src/multisig_legacy.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 42 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (11 lines × 2) crates/sui-types/src/storage/shared_in_memory_store.rs:385 — crates/sui-types/src/storage/shared_in_memory_store.rs:385-395 | crates/sui-types/src/storage/shared_in_memory_store.rs:398-408 — both copies are in the same file, so extract the 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) crates/sui-types/src/sui_system_state/sui_system_state_inner_v1.rs:563 — crates/sui-types/src/sui_system_state/sui_system_state_inner_v1.rs:563-573 | crates/sui-types/src/sui_system_state/sui_system_state_inner_v2.rs:122-132 — before extracting anything, compare `crates/sui-types/src/sui_system_state/sui_system_state_inner_v1.rs` and `crates/sui-types/src/sui_system_state/sui_system_state_inner_v2.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 184 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (11 lines × 2) crates/sui/src/client_ptb/lexer.rs:66 — crates/sui/src/client_ptb/lexer.rs:66-76 | crates/sui/src/client_ptb/lexer.rs:89-99 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) crates/sui/src/client_ptb/token.rs:96 — crates/sui/src/client_ptb/token.rs:96-106 | crates/sui/src/client_ptb/token.rs:126-136 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) crates/sui/src/upgrade_compatibility/mod.rs:1273 — crates/sui/src/upgrade_compatibility/mod.rs:1273-1284 | crates/sui/src/upgrade_compatibility/mod.rs:1433-1443 — both copies are in the same file, so extract the 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) sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:872 — sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:872-882 | sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs:929-939 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs` and `sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs` as WHOLE FILES: this scan already matched 61 separate duplicated blocks between them, totalling at least 1074 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.
  • + 33 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×57
  • Duplicated block (10 lines × 2) consensus/core/src/core.rs:788 — consensus/core/src/core.rs:788-797 | consensus/core/src/core.rs:955-964 — both copies are in the same file, so extract the 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) crates/mysten-network/src/multiaddr.rs:118 — crates/mysten-network/src/multiaddr.rs:118-127 | crates/mysten-network/src/multiaddr.rs:146-155 — both copies are in the same file, so extract the 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) crates/simulacrum/src/store/in_mem_store.rs:139 — crates/simulacrum/src/store/in_mem_store.rs:139-148 | crates/sui-types/src/storage/shared_in_memory_store.rs:345-354 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (10 lines × 2) crates/sui-benchmark/src/bank.rs:79 — crates/sui-benchmark/src/bank.rs:79-88 | crates/sui-benchmark/src/bank.rs:89-98 — both copies are in the same file, so extract the 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) crates/sui-benchmark/src/workloads/composite/mod.rs:979 — crates/sui-benchmark/src/workloads/composite/mod.rs:979-988 | crates/sui-benchmark/src/workloads/composite/mod.rs:1035-1044 — both copies are in the same file, so extract the 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) crates/sui-benchmark/src/workloads/randomized_transaction.rs:185 — crates/sui-benchmark/src/workloads/randomized_transaction.rs:185-194 | crates/sui-benchmark/src/workloads/randomness.rs:81-90 — 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) crates/sui-bridge-indexer-alt/src/handlers/token_transfer_data_handler.rs:42 — crates/sui-bridge-indexer-alt/src/handlers/token_transfer_data_handler.rs:42-51 | crates/sui-bridge-indexer-alt/src/handlers/token_transfer_handler.rs:67-76 — 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) crates/sui-consistent-store/src/map.rs:617 — crates/sui-consistent-store/src/map.rs:617-626 | crates/sui-consistent-store/src/map.rs:642-651 — both copies are in the same file, so extract the 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) crates/sui-display/src/v2/mod.rs:210 — crates/sui-display/src/v2/mod.rs:210-219 | crates/sui-display/src/v2/mod.rs:235-244 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) crates/sui-indexer-alt-graphql/src/api/types/event/mod.rs:347 — crates/sui-indexer-alt-graphql/src/api/types/event/mod.rs:347-356 | crates/sui-indexer-alt-graphql/src/api/types/transaction/mod.rs:470-479 — `crates/sui-indexer-alt-graphql/src/api/types/event/mod.rs` and `crates/sui-indexer-alt-graphql/src/api/types/transaction/mod.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 4 separate duplicated blocks between them, totalling at least 42 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
  • Duplicated block (10 lines × 2) crates/sui-indexer-alt-graphql/src/api/types/service_config.rs:152 — crates/sui-indexer-alt-graphql/src/api/types/service_config.rs:152-161 | crates/sui-indexer-alt-graphql/src/api/types/service_config.rs:179-188 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) crates/sui-json-rpc-types/src/sui_transaction.rs:371 — crates/sui-json-rpc-types/src/sui_transaction.rs:371-380 | crates/sui/src/displays/dry_run_tx_block.rs:84-93 — before extracting anything, compare `crates/sui-json-rpc-types/src/sui_transaction.rs` and `crates/sui/src/displays/dry_run_tx_block.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 67 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) crates/sui-json-rpc-types/src/sui_transaction.rs:2066 — crates/sui-json-rpc-types/src/sui_transaction.rs:2066-2075 | crates/sui-types/src/transaction.rs:1855-1864 — before extracting anything, compare `crates/sui-json-rpc-types/src/sui_transaction.rs` and `crates/sui-types/src/transaction.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 40 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) crates/sui-kv-rpc/src/v2/move_package_service.rs:236 — crates/sui-kv-rpc/src/v2/move_package_service.rs:236-245 | crates/sui-rpc-api/src/grpc/v2/move_package_service/list_package_versions.rs:54-65 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (10 lines × 2) crates/sui-kvstore/src/handlers/packages_by_checkpoint.rs:23 — crates/sui-kvstore/src/handlers/packages_by_checkpoint.rs:23-32 | crates/sui-kvstore/src/handlers/packages_by_id.rs:22-31 — 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) crates/sui-protocol-config/src/lib.rs:4616 — crates/sui-protocol-config/src/lib.rs:4616-4625 | crates/sui-protocol-config/src/lib.rs:4771-4780 — both copies are in the same file, so extract the 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) crates/sui-rpc-api/src/grpc/v2/ledger_service/list_checkpoints.rs:110 — crates/sui-rpc-api/src/grpc/v2/ledger_service/list_checkpoints.rs:110-119 | crates/sui-rpc-api/src/grpc/v2/ledger_service/list_transactions.rs:107-116 — before extracting anything, compare `crates/sui-rpc-api/src/grpc/v2/ledger_service/list_checkpoints.rs` and `crates/sui-rpc-api/src/grpc/v2/ledger_service/list_transactions.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 33 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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) crates/sui-rpc-store/src/schema/object_version_by_checkpoint.rs:82 — crates/sui-rpc-store/src/schema/object_version_by_checkpoint.rs:82-91 | crates/sui-rpc-store/src/schema/package_versions.rs:53-62 — 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) crates/sui-tool/src/lib.rs:956 — crates/sui-tool/src/lib.rs:956-965 | crates/sui-tool/src/lib.rs:1024-1033 — both copies are in the same file, so extract the 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) crates/sui-types/src/bridge.rs:283 — crates/sui-types/src/bridge.rs:283-292 | crates/sui-types/src/bridge.rs:316-325 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) crates/sui-types/src/sui_system_state/sui_system_state_inner_v1.rs:632 — crates/sui-types/src/sui_system_state/sui_system_state_inner_v1.rs:632-641 | crates/sui-types/src/sui_system_state/sui_system_state_inner_v2.rs:191-200 — before extracting anything, compare `crates/sui-types/src/sui_system_state/sui_system_state_inner_v1.rs` and `crates/sui-types/src/sui_system_state/sui_system_state_inner_v2.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 184 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) REDACTED:107 — REDACTED:107-117 | REDACTED:186-195 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 53 separate duplicated blocks between them, totalling at least 869 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) sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs:482 — sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs:482-491 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs:638-647 — before extracting anything, compare `sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs` and `sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 256 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) sui-execution/historical-versions/v3/sui-adapter/src/gas_meter.rs:202 — sui-execution/historical-versions/v3/sui-adapter/src/gas_meter.rs:202-211 | sui-execution/latest/sui-adapter/src/gas_meter.rs:221-230 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/gas_meter.rs` and `sui-execution/latest/sui-adapter/src/gas_meter.rs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 123 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) sui-execution/historical-versions/v3/sui-adapter/src/gas_meter.rs:269 — sui-execution/historical-versions/v3/sui-adapter/src/gas_meter.rs:269-278 | sui-execution/latest/sui-adapter/src/gas_meter.rs:288-297 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/gas_meter.rs` and `sui-execution/latest/sui-adapter/src/gas_meter.rs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 123 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.
  • + 32 more in this group — see findings.md.
D4 · Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) · ×53
  • Members sharing a duplicated core (5 members, 50+ identical tokens) crates/sui-bridge/src/sui_transaction_builder.rs:115 — crates/sui-bridge/src/sui_transaction_builder.rs:115-294 | crates/sui-bridge/src/sui_transaction_builder.rs:302-354 | crates/sui-bridge/src/sui_transaction_builder.rs:362-421 | crates/sui-bridge/src/sui_transaction_builder.rs:429-484 | crates/sui-bridge/src/sui_transaction_builder.rs:492-547 — 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) crates/sui-rosetta/src/types/internal_operation/pay_coin.rs:330 — crates/sui-rosetta/src/types/internal_operation/pay_coin.rs:330-409 | crates/sui-rosetta/src/types/internal_operation/pay_sui.rs:193-295 | crates/sui-rosetta/src/types/internal_operation/pay_sui.rs:304-355 | crates/sui-rosetta/src/types/internal_operation/stake.rs:216-327 | crates/sui-rosetta/src/types/internal_operation/stake.rs:337-409 — 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) crates/sui-types/src/gas_model/tables.rs:362 — crates/sui-types/src/gas_model/tables.rs:362-406 | crates/sui-types/src/gas_model/tables.rs:408-458 | crates/sui-types/src/gas_model/tables.rs:460-507 | crates/sui-types/src/gas_model/tables.rs:509-537 | crates/sui-types/src/gas_model/tables.rs:539-569 — 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) crates/sui-types/src/sui_system_state/simtest_sui_system_state_inner.rs:172 — crates/sui-types/src/sui_system_state/simtest_sui_system_state_inner.rs:172-194 | crates/sui-types/src/sui_system_state/simtest_sui_system_state_inner.rs:297-319 | crates/sui-types/src/sui_system_state/simtest_sui_system_state_inner.rs:451-473 | crates/sui-types/src/sui_system_state/sui_system_state_inner_v1.rs:575-597 | crates/sui-types/src/sui_system_state/sui_system_state_inner_v2.rs:134-156 — 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) crates/sui-types/src/sui_system_state/simtest_sui_system_state_inner.rs:203 — crates/sui-types/src/sui_system_state/simtest_sui_system_state_inner.rs:203-231 | crates/sui-types/src/sui_system_state/simtest_sui_system_state_inner.rs:328-356 | crates/sui-types/src/sui_system_state/simtest_sui_system_state_inner.rs:482-510 | crates/sui-types/src/sui_system_state/sui_system_state_inner_v1.rs:613-641 | crates/sui-types/src/sui_system_state/sui_system_state_inner_v2.rs:172-200 — 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) sui-execution/historical-versions/v0/sui-adapter/src/adapter.rs:99 — sui-execution/historical-versions/v0/sui-adapter/src/adapter.rs:99-127 | sui-execution/historical-versions/v1/sui-adapter/src/adapter.rs:101-129 | sui-execution/historical-versions/v2/sui-adapter/src/adapter.rs:99-127 | sui-execution/historical-versions/v3/sui-adapter/src/adapter.rs:106-134 | sui-execution/latest/sui-adapter/src/adapter.rs:120-148 — 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) sui-execution/historical-versions/v0/sui-adapter/src/execution_engine.rs:75 — sui-execution/historical-versions/v0/sui-adapter/src/execution_engine.rs:75-151 | sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs:80-163 | sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs:86-183 | sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.rs:110-235 | sui-execution/latest/sui-adapter/src/execution_engine.rs:1056-1219 — 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) sui-execution/historical-versions/v0/sui-adapter/src/execution_engine.rs:470 — sui-execution/historical-versions/v0/sui-adapter/src/execution_engine.rs:470-499 | sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs:674-703 | sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs:701-730 | sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.rs:825-854 | sui-execution/latest/sui-adapter/src/execution_engine.rs:1859-1888 — 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) sui-execution/historical-versions/v0/sui-adapter/src/gas_charger.rs:226 — sui-execution/historical-versions/v0/sui-adapter/src/gas_charger.rs:226-239 | sui-execution/historical-versions/v1/sui-adapter/src/gas_charger.rs:235-248 | sui-execution/historical-versions/v2/sui-adapter/src/gas_charger.rs:236-249 | sui-execution/historical-versions/v3/sui-adapter/src/gas_charger.rs:265-278 | sui-execution/latest/sui-adapter/src/gas_charger.rs:519-532 — 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) sui-execution/historical-versions/v0/sui-adapter/src/gas_meter.rs:86 — sui-execution/historical-versions/v0/sui-adapter/src/gas_meter.rs:86-119 | sui-execution/historical-versions/v1/sui-adapter/src/gas_meter.rs:86-119 | sui-execution/historical-versions/v2/sui-adapter/src/gas_meter.rs:86-119 | sui-execution/historical-versions/v3/sui-adapter/src/gas_meter.rs:88-123 | sui-execution/latest/sui-adapter/src/gas_meter.rs:110-145 — 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) sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/context.rs:297 — sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/context.rs:297-323 | sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:281-308 | sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs:286-313 | sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/context.rs:322-366 | sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/context.rs:466-490 — 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) REDACTED:697 — REDACTED:697-734 | REDACTED:644-681 | REDACTED:650-687 | REDACTED:869-926 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/context.rs:2539-2595 — 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) REDACTED:792 — REDACTED:792-815 | REDACTED:727-750 | REDACTED:733-756 | REDACTED:972-995 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/context.rs:2509-2532 — 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) REDACTED:1113 — REDACTED:1113-1132 | REDACTED:1032-1051 | REDACTED:1044-1063 | REDACTED:1281-1304 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/context.rs:2036-2065 — 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) REDACTED:1534 — REDACTED:1534-1552 | REDACTED:1491-1509 | REDACTED:1503-1521 | REDACTED:1987-2005 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/context.rs:2125-2143 — 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) REDACTED:1579 — REDACTED:1579-1635 | REDACTED:1536-1592 | REDACTED:1548-1604 | REDACTED:2032-2088 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/context.rs:2167-2223 — 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) REDACTED:1681 — REDACTED:1681-1704 | REDACTED:1638-1661 | REDACTED:1650-1673 | REDACTED:2134-2157 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/context.rs:2269-2292 — 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) sui-execution/historical-versions/v0/sui-adapter/src/temporary_store.rs:797 — sui-execution/historical-versions/v0/sui-adapter/src/temporary_store.rs:797-830 | sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs:862-895 | sui-execution/historical-versions/v2/sui-adapter/src/temporary_store.rs:914-947 | sui-execution/historical-versions/v3/sui-adapter/src/temporary_store.rs:897-930 | sui-execution/latest/sui-adapter/src/temporary_store/invariants.rs:516-549 — 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) sui-execution/historical-versions/v0/sui-move-natives/src/address.rs:29 — sui-execution/historical-versions/v0/sui-move-natives/src/address.rs:29-53 | sui-execution/historical-versions/v1/sui-move-natives/src/address.rs:29-53 | sui-execution/historical-versions/v2/sui-move-natives/src/address.rs:29-53 | sui-execution/historical-versions/v3/sui-move-natives/src/address.rs:29-51 | sui-execution/latest/sui-move-natives/src/address.rs:33-55 — 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) sui-execution/historical-versions/v0/sui-move-natives/src/address.rs:68 — sui-execution/historical-versions/v0/sui-move-natives/src/address.rs:68-91 | sui-execution/historical-versions/v1/sui-move-natives/src/address.rs:68-91 | sui-execution/historical-versions/v2/sui-move-natives/src/address.rs:68-91 | sui-execution/historical-versions/v3/sui-move-natives/src/address.rs:66-87 | sui-execution/latest/sui-move-natives/src/address.rs:70-92 — 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) sui-execution/historical-versions/v0/sui-move-natives/src/address.rs:107 — sui-execution/historical-versions/v0/sui-move-natives/src/address.rs:107-130 | sui-execution/historical-versions/v1/sui-move-natives/src/address.rs:107-130 | sui-execution/historical-versions/v2/sui-move-natives/src/address.rs:107-130 | sui-execution/historical-versions/v3/sui-move-natives/src/address.rs:103-124 | sui-execution/latest/sui-move-natives/src/address.rs:108-128 — 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) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_k1.rs:147 — sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_k1.rs:147-178 | sui-execution/historical-versions/v1/sui-move-natives/src/crypto/ecdsa_k1.rs:147-178 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/ecdsa_k1.rs:147-178 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/ecdsa_k1.rs:158-187 | sui-execution/latest/sui-move-natives/src/crypto/ecdsa_k1.rs:160-189 — 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) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecvrf.rs:46 — sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecvrf.rs:46-100 | sui-execution/historical-versions/v1/sui-move-natives/src/crypto/ecvrf.rs:46-100 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/ecvrf.rs:46-100 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/ecvrf.rs:46-98 | sui-execution/latest/sui-move-natives/src/crypto/ecvrf.rs:48-100 — 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) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/hash.rs:30 — sui-execution/historical-versions/v0/sui-move-natives/src/crypto/hash.rs:30-54 | sui-execution/historical-versions/v1/sui-move-natives/src/crypto/hash.rs:30-54 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/hash.rs:30-54 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/hash.rs:30-54 | sui-execution/latest/sui-move-natives/src/crypto/hash.rs:32-56 — 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) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/hmac.rs:41 — sui-execution/historical-versions/v0/sui-move-natives/src/crypto/hmac.rs:41-88 | sui-execution/historical-versions/v1/sui-move-natives/src/crypto/hmac.rs:41-88 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/hmac.rs:41-88 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/hmac.rs:41-86 | sui-execution/latest/sui-move-natives/src/crypto/hmac.rs:44-88 — 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.
  • + 28 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (5 lines × 2) · ×52
  • Duplicated block (5 lines × 2) crates/sui-benchmark/src/workloads/composite/mod.rs:2027 — crates/sui-benchmark/src/workloads/composite/mod.rs:2027-2031 | crates/sui-benchmark/src/workloads/composite/mod.rs:2380-2385 — both copies are in the same file, so extract the 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) crates/sui-indexer-alt-consistent-store/src/schema/object_by_owner.rs:81 — crates/sui-indexer-alt-consistent-store/src/schema/object_by_owner.rs:81-85 | crates/sui-rpc-store/src/schema/object_by_owner.rs:59-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 (5 lines × 2) crates/sui-indexer-alt-graphql/src/error.rs:216 — crates/sui-indexer-alt-graphql/src/error.rs:216-220 | crates/sui-indexer-alt-graphql/src/error.rs:233-237 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) crates/sui-rpc-api/src/client/mod.rs:734 — crates/sui-rpc-api/src/client/mod.rs:734-738 | crates/sui-rpc-api/src/client/mod.rs:758-762 — both copies are in the same file, so extract the 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) crates/sui-tls/src/certgen.rs:70 — crates/sui-tls/src/certgen.rs:70-74 | crates/sui-tls/src/verifier.rs:338-342 — 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) crates/sui-types/src/transaction.rs:5404 — crates/sui-types/src/transaction.rs:5404-5408 | crates/sui-types/src/transaction.rs:5437-5441 — both copies are in the same file, so extract the 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) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/context.rs:556 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/context.rs:556-560 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/context.rs:854-858 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/context.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/context.rs` as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 625 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/context.rs:631 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/context.rs:631-635 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/context.rs:929-933 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/context.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/context.rs` as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 625 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/values.rs:244 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/values.rs:244-248 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/values.rs:301-305 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/values.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/values.rs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 118 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/translate.rs:194 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/translate.rs:194-198 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/translate.rs:209-213 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/translate.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/translate.rs` as WHOLE FILES: this scan already matched 40 separate duplicated blocks between them, totalling at least 589 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/translate.rs:1167 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/translate.rs:1167-1171 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/translate.rs:1231-1235 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/translate.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/translate.rs` as WHOLE FILES: this scan already matched 40 separate duplicated blocks between them, totalling at least 589 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/translate.rs:1371 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/translate.rs:1371-1375 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/translate.rs:1414-1418 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/translate.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/translate.rs` as WHOLE FILES: this scan already matched 40 separate duplicated blocks between them, totalling at least 589 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/drop_safety.rs:241 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/drop_safety.rs:241-245 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/verify/drop_safety.rs:243-247 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/drop_safety.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/verify/drop_safety.rs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 196 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/drop_safety.rs:286 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/drop_safety.rs:286-291 | sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/memory_safety.rs:258-262 — 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) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/drop_safety.rs:445 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/drop_safety.rs:445-449 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/verify/drop_safety.rs:454-458 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/drop_safety.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/verify/drop_safety.rs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 196 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/memory_safety.rs:615 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/memory_safety.rs:615-619 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/verify/memory_safety.rs:682-686 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/memory_safety.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/verify/memory_safety.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 120 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/mod.rs:23 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/mod.rs:23-27 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/verify/mod.rs:21-25 — 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) sui-execution/historical-versions/v3/sui-verifier/src/id_leak_verifier.rs:283 — sui-execution/historical-versions/v3/sui-verifier/src/id_leak_verifier.rs:283-287 | sui-execution/latest/sui-verifier/src/id_leak_verifier.rs:289-293 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-verifier/src/id_leak_verifier.rs` and `sui-execution/latest/sui-verifier/src/id_leak_verifier.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 357 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 2) crates/simulacrum/src/store/in_mem_store.rs:291 — crates/simulacrum/src/store/in_mem_store.rs:291-295 | crates/sui-transactional-test-runner/src/simulator_persisted_store.rs:463-467 — before extracting anything, compare `crates/simulacrum/src/store/in_mem_store.rs` and `crates/sui-transactional-test-runner/src/simulator_persisted_store.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 59 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 2) crates/sui-indexer-alt-graphql/src/api/types/event/filter.rs:265 — crates/sui-indexer-alt-graphql/src/api/types/event/filter.rs:265-269 | crates/sui-indexer-alt-graphql/src/api/types/transaction/filter.rs:314-318 — 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) crates/sui-kvstore/src/tables/checkpoints_by_digest.rs:26 — crates/sui-kvstore/src/tables/checkpoints_by_digest.rs:26-30 | crates/sui-kvstore/src/tables/system_packages.rs:27-31 — 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) crates/sui-rpc-store/src/schema/event_bitmap.rs:56 — crates/sui-rpc-store/src/schema/event_bitmap.rs:56-60 | crates/sui-rpc-store/src/schema/transaction_bitmap.rs:57-61 — before extracting anything, compare `crates/sui-rpc-store/src/schema/event_bitmap.rs` and `crates/sui-rpc-store/src/schema/transaction_bitmap.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 65 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) crates/sui-storage/src/object_store/http/gcs.rs:73 — crates/sui-storage/src/object_store/http/gcs.rs:73-77 | crates/sui-storage/src/object_store/http/s3.rs:71-75 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (5 lines × 2) crates/sui-types/src/multisig.rs:604 — crates/sui-types/src/multisig.rs:604-608 | crates/sui-types/src/multisig_legacy.rs:344-348 — before extracting anything, compare `crates/sui-types/src/multisig.rs` and `crates/sui-types/src/multisig_legacy.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 42 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 2) sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/mod.rs:449 — sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/mod.rs:449-453 | sui-execution/historical-versions/v2/sui-move-natives/src/object_runtime/mod.rs:411-415 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/mod.rs` and `sui-execution/historical-versions/v2/sui-move-natives/src/object_runtime/mod.rs` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 314 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.
  • + 27 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (13 lines × 2) · ×49
  • Duplicated block (13 lines × 2) consensus/core/src/authority_service.rs:253 — consensus/core/src/authority_service.rs:253-265 | consensus/core/src/observer_service.rs:163-175 — before extracting anything, compare `consensus/core/src/authority_service.rs` and `consensus/core/src/observer_service.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 85 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (13 lines × 2) consensus/core/src/network/observer.rs:399 — consensus/core/src/network/observer.rs:399-411 | consensus/core/src/network/tonic_network.rs:277-289 — before extracting anything, compare `consensus/core/src/network/observer.rs` and `consensus/core/src/network/tonic_network.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 185 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (13 lines × 2) crates/mysten-metrics/src/monitored_mpsc.rs:284 — crates/mysten-metrics/src/monitored_mpsc.rs:284-296 | crates/mysten-metrics/src/monitored_mpsc.rs:481-493 — both copies are in the same file, so extract the 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) crates/sui-benchmark/src/workloads/randomized_transaction.rs:710 — crates/sui-benchmark/src/workloads/randomized_transaction.rs:710-722 | crates/sui-benchmark/src/workloads/randomness.rs:254-266 — 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) crates/sui-bridge/src/server/mod.rs:556 — crates/sui-bridge/src/server/mod.rs:556-568 | crates/sui-bridge/src/server/mod.rs:643-655 — both copies are in the same file, so extract the 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) crates/sui-bridge/src/server/mod.rs:575 — crates/sui-bridge/src/server/mod.rs:575-587 | crates/sui-bridge/src/server/mod.rs:673-685 — both copies are in the same file, so extract the 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) crates/sui-core/src/authority/authority_store_pruner.rs:952 — crates/sui-core/src/authority/authority_store_pruner.rs:952-964 | crates/sui-core/src/authority/authority_store_pruner.rs:1028-1040 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) crates/sui-core/src/global_state_hasher.rs:229 — crates/sui-core/src/global_state_hasher.rs:229-241 | crates/sui-core/src/global_state_hasher.rs:293-305 — both copies are in the same file, so extract the 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) crates/sui-data-store/src/gql_queries.rs:140 — crates/sui-data-store/src/gql_queries.rs:140-152 | crates/sui-fork/src/gql/queries.rs:86-98 — before extracting anything, compare `crates/sui-data-store/src/gql_queries.rs` and `crates/sui-fork/src/gql/queries.rs` 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 (13 lines × 2) crates/sui-data-store/src/stores/in_memory.rs:277 — crates/sui-data-store/src/stores/in_memory.rs:277-289 | crates/sui-data-store/src/stores/in_memory_lru.rs:211-223 — before extracting anything, compare `crates/sui-data-store/src/stores/in_memory.rs` and `crates/sui-data-store/src/stores/in_memory_lru.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 144 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (13 lines × 2) crates/sui-indexer-alt-reader/src/object_versions.rs:299 — crates/sui-indexer-alt-reader/src/object_versions.rs:299-311 | crates/sui-indexer-alt-reader/src/packages.rs:217-229 — before extracting anything, compare `crates/sui-indexer-alt-reader/src/object_versions.rs` and `crates/sui-indexer-alt-reader/src/packages.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 55 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (13 lines × 2) crates/sui-kv-rpc/src/v2/get_epoch.rs:32 — crates/sui-kv-rpc/src/v2/get_epoch.rs:32-44 | crates/sui-rpc-api/src/grpc/v2/ledger_service/get_epoch.rs:25-37 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (13 lines × 2) crates/sui-kvstore/src/bigtable/client/mod.rs:2214 — crates/sui-kvstore/src/bigtable/client/mod.rs:2214-2226 | crates/sui-kvstore/src/bigtable/client/mod.rs:2277-2289 — both copies are in the same file, so extract the 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) crates/sui-rosetta/src/operations.rs:1166 — crates/sui-rosetta/src/operations.rs:1166-1178 | crates/sui-rosetta/src/operations.rs:1197-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.
  • Duplicated block (13 lines × 2) crates/sui-rpc-api/src/grpc/v2/subscription_service.rs:130 — crates/sui-rpc-api/src/grpc/v2/subscription_service.rs:130-142 | crates/sui-rpc-api/src/grpc/v2/subscription_service.rs:231-243 — both copies are in the same file, so extract the 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) crates/sui-rpc-store/src/schema/event_bitmap.rs:242 — crates/sui-rpc-store/src/schema/event_bitmap.rs:242-254 | crates/sui-rpc-store/src/schema/transaction_bitmap.rs:230-246 — before extracting anything, compare `crates/sui-rpc-store/src/schema/event_bitmap.rs` and `crates/sui-rpc-store/src/schema/transaction_bitmap.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 65 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (13 lines × 2) crates/sui-types/src/rpc_proto_conversions.rs:2329 — crates/sui-types/src/rpc_proto_conversions.rs:2329-2341 | crates/sui-types/src/rpc_proto_conversions.rs:2347-2359 — both copies are in the same file, so extract the 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) crates/typed-store/src/rocks/options.rs:162 — crates/typed-store/src/rocks/options.rs:162-174 | crates/typed-store/src/rocks/options.rs:207-219 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:240 — sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:240-252 | sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs:245-257 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs` and `sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs` as WHOLE FILES: this scan already matched 61 separate duplicated blocks between them, totalling at least 1074 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (13 lines × 2) sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs:115 — sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs:115-127 | sui-execution/historical-versions/v2/sui-adapter/src/temporary_store.rs:133-145 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs` and `sui-execution/historical-versions/v2/sui-adapter/src/temporary_store.rs` as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 779 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (13 lines × 2) sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs:279 — sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs:279-291 | sui-execution/historical-versions/v2/sui-adapter/src/temporary_store.rs:297-309 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs` and `sui-execution/historical-versions/v2/sui-adapter/src/temporary_store.rs` as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 779 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (13 lines × 2) sui-execution/historical-versions/v1/sui-adapter/src/type_layout_resolver.rs:39 — sui-execution/historical-versions/v1/sui-adapter/src/type_layout_resolver.rs:39-51 | sui-execution/historical-versions/v2/sui-adapter/src/type_layout_resolver.rs:39-51 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (13 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/context.rs:1582 — sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/context.rs:1582-1594 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/context.rs:2442-2454 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/context.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/context.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (13 lines × 2) REDACTED:1055 — REDACTED:1055-1067 | sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/context.rs:828-840 — before extracting anything, compare `REDACTED` and `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/context.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 56 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (13 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/context.rs:201 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/context.rs:201-213 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/context.rs:310-322 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/context.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/context.rs` as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 625 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.
  • + 24 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×49
  • Duplicated block (12 lines × 2) consensus/core/src/authority_node.rs:484 — consensus/core/src/authority_node.rs:484-495 | consensus/core/src/authority_node.rs:512-523 — both copies are in the same file, so extract the 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) consensus/core/src/storage/mem_store.rs:178 — consensus/core/src/storage/mem_store.rs:178-189 | consensus/core/src/storage/rocksdb_store.rs:309-320 — 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) crates/sui-analytics-indexer/src/handlers/tables/transaction_objects.rs:60 — crates/sui-analytics-indexer/src/handlers/tables/transaction_objects.rs:60-71 | crates/sui-analytics-indexer/src/handlers/tables/transaction_objects.rs:77-88 — both copies are in the same file, so extract the 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) crates/sui-benchmark/src/workloads/shared_counter.rs:264 — crates/sui-benchmark/src/workloads/shared_counter.rs:264-275 | crates/sui-benchmark/src/workloads/shared_object_deletion.rs:295-306 — before extracting anything, compare `crates/sui-benchmark/src/workloads/shared_counter.rs` and `crates/sui-benchmark/src/workloads/shared_object_deletion.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 66 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 2) crates/sui-bridge/src/client/bridge_client.rs:130 — crates/sui-bridge/src/client/bridge_client.rs:130-141 | crates/sui-bridge/src/client/bridge_client.rs:156-167 — both copies are in the same file, so extract the 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) crates/sui-data-store/src/stores/in_memory.rs:259 — crates/sui-data-store/src/stores/in_memory.rs:259-270 | crates/sui-data-store/src/stores/in_memory_lru.rs:194-205 — before extracting anything, compare `crates/sui-data-store/src/stores/in_memory.rs` and `crates/sui-data-store/src/stores/in_memory_lru.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 144 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 2) crates/sui-indexer-alt-graphql/src/api/types/event/mod.rs:273 — crates/sui-indexer-alt-graphql/src/api/types/event/mod.rs:273-284 | crates/sui-indexer-alt-graphql/src/api/types/transaction/mod.rs:408-419 — `crates/sui-indexer-alt-graphql/src/api/types/event/mod.rs` and `crates/sui-indexer-alt-graphql/src/api/types/transaction/mod.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 4 separate duplicated blocks between them, totalling at least 42 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 lines × 2) crates/sui-indexer-alt-reader/src/object_versions.rs:141 — crates/sui-indexer-alt-reader/src/object_versions.rs:141-152 | crates/sui-indexer-alt-reader/src/object_versions.rs:215-226 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) crates/sui-indexer-alt-reader/src/pg_reader.rs:122 — crates/sui-indexer-alt-reader/src/pg_reader.rs:122-133 | crates/sui-indexer-alt-reader/src/pg_reader.rs:153-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.
  • Duplicated block (12 lines × 2) crates/sui-light-client/src/verifier.rs:64 — crates/sui-light-client/src/verifier.rs:64-75 | crates/sui-light-client/src/verifier.rs:158-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.
  • Duplicated block (12 lines × 2) crates/sui-rosetta/src/operations.rs:321 — crates/sui-rosetta/src/operations.rs:321-332 | crates/sui-rosetta/src/operations.rs:367-378 — both copies are in the same file, so extract the 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) crates/sui-rosetta/src/types/internal_operation/consolidate_to_fungible.rs:98 — crates/sui-rosetta/src/types/internal_operation/consolidate_to_fungible.rs:98-109 | crates/sui-rosetta/src/types/internal_operation/withdraw_stake.rs:114-125 — 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) crates/sui-rosetta/src/types/internal_operation/consolidate_to_fungible.rs:152 — crates/sui-rosetta/src/types/internal_operation/consolidate_to_fungible.rs:152-163 | crates/sui-rosetta/src/types/internal_operation/consolidate_to_fungible.rs:198-209 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) crates/sui-rpc-api/src/ledger_history/filter.rs:196 — crates/sui-rpc-api/src/ledger_history/filter.rs:196-207 | crates/sui-rpc-api/src/ledger_history/filter.rs:219-230 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) crates/sui-rpc-store/src/indexer/object_by_owner.rs:95 — crates/sui-rpc-store/src/indexer/object_by_owner.rs:95-106 | crates/sui-rpc-store/src/indexer/object_by_type.rs:87-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.
  • Duplicated block (12 lines × 2) crates/sui-transaction-builder/src/lib.rs:681 — crates/sui-transaction-builder/src/lib.rs:681-692 | crates/sui-transaction-builder/src/lib.rs:714-725 — both copies are in the same file, so extract the 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) crates/sui-types/src/multisig.rs:390 — crates/sui-types/src/multisig.rs:390-401 | crates/sui-types/src/multisig_legacy.rs:170-181 — before extracting anything, compare `crates/sui-types/src/multisig.rs` and `crates/sui-types/src/multisig_legacy.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 42 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 2) crates/sui-types/src/object.rs:1525 — crates/sui-types/src/object.rs:1525-1536 | crates/sui-types/src/object.rs:1541-1552 — both copies are in the same file, so extract the 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) crates/sui-types/src/sui_system_state/mock.rs:74 — crates/sui-types/src/sui_system_state/mock.rs:74-85 | crates/sui-types/src/sui_system_state/mock.rs:110-121 — both copies are in the same file, so extract the 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) crates/sui-types/src/transaction.rs:4750 — crates/sui-types/src/transaction.rs:4750-4761 | crates/sui-types/src/transaction.rs:4768-4779 — both copies are in the same file, so extract the 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) crates/typed-store/src/rocks/mod.rs:820 — crates/typed-store/src/rocks/mod.rs:820-831 | crates/typed-store/src/rocks/mod.rs:1761-1772 — both copies are in the same file, so extract the 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) sui-execution/historical-versions/v0/sui-adapter/src/temporary_store.rs:639 — sui-execution/historical-versions/v0/sui-adapter/src/temporary_store.rs:639-650 | sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs:722-733 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/temporary_store.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 195 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 2) sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:1206 — sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:1206-1217 | sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs:1263-1274 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs` and `sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs` as WHOLE FILES: this scan already matched 61 separate duplicated blocks between them, totalling at least 1074 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/context.rs:1561 — sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/context.rs:1561-1572 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/context.rs:2425-2436 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/context.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/context.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/env.rs:229 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/env.rs:229-240 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/env.rs:271-282 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/env.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/env.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 78 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.
  • + 24 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (14 lines × 2) · ×43
  • Duplicated block (14 lines × 2) crates/sui-analytics-indexer/src/main.rs:72 — crates/sui-analytics-indexer/src/main.rs:72-85 | crates/sui-kvstore/src/bin/sui-kvstore-alt.rs:163-176 — 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 (14 lines × 2) crates/sui-indexer-alt-consistent-store/src/config.rs:149 — crates/sui-indexer-alt-consistent-store/src/config.rs:149-162 | crates/sui-rpc-store/src/config.rs:382-395 — 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 (14 lines × 2) crates/sui-indexer-alt-consistent-store/src/db/mod.rs:521 — crates/sui-indexer-alt-consistent-store/src/db/mod.rs:521-534 | crates/sui-indexer-alt-consistent-store/src/db/mod.rs:596-609 — both copies are in the same file, so extract the 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) crates/sui-indexer-alt-consistent-store/src/db/mod.rs:560 — crates/sui-indexer-alt-consistent-store/src/db/mod.rs:560-573 | crates/sui-indexer-alt-consistent-store/src/db/mod.rs:632-645 — both copies are in the same file, so extract the 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) crates/sui-indexer-alt-graphql/src/api/types/event/mod.rs:319 — crates/sui-indexer-alt-graphql/src/api/types/event/mod.rs:319-332 | crates/sui-indexer-alt-graphql/src/api/types/transaction/mod.rs:453-466 — `crates/sui-indexer-alt-graphql/src/api/types/event/mod.rs` and `crates/sui-indexer-alt-graphql/src/api/types/transaction/mod.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 4 separate duplicated blocks between them, totalling at least 42 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 (14 lines × 2) crates/sui-indexer-alt-graphql/src/api/types/move_package.rs:720 — crates/sui-indexer-alt-graphql/src/api/types/move_package.rs:720-733 | crates/sui-indexer-alt-graphql/src/api/types/move_package.rs:753-766 — both copies are in the same file, so extract the 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) crates/sui-indexer-alt-object-store/src/lib.rs:323 — crates/sui-indexer-alt-object-store/src/lib.rs:323-336 | crates/sui-indexer-alt-object-store/src/lib.rs:343-356 — both copies are in the same file, so extract the 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) crates/sui-json-rpc-types/src/sui_transaction.rs:690 — crates/sui-json-rpc-types/src/sui_transaction.rs:690-703 | crates/sui-types/src/transaction.rs:2307-2320 — before extracting anything, compare `crates/sui-json-rpc-types/src/sui_transaction.rs` and `crates/sui-types/src/transaction.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 40 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) crates/sui-keys/src/external.rs:749 — crates/sui-keys/src/external.rs:749-762 | crates/sui-keys/src/keystore.rs:357-370 — before extracting anything, compare `crates/sui-keys/src/external.rs` and `crates/sui-keys/src/keystore.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 40 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) crates/sui-kv-rpc/src/v2/list_checkpoints.rs:161 — crates/sui-kv-rpc/src/v2/list_checkpoints.rs:161-174 | crates/sui-kv-rpc/src/v2/list_transactions.rs:144-157 — before extracting anything, compare `crates/sui-kv-rpc/src/v2/list_checkpoints.rs` and `crates/sui-kv-rpc/src/v2/list_transactions.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 46 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) crates/sui-network/src/discovery/mod.rs:420 — crates/sui-network/src/discovery/mod.rs:420-433 | crates/sui-network/src/state_sync/mod.rs:789-802 — 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 (14 lines × 2) crates/sui-replay-2/src/package_tools.rs:381 — crates/sui-replay-2/src/package_tools.rs:381-394 | crates/sui-replay-2/src/package_tools.rs:399-412 — both copies are in the same file, so extract the 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) crates/sui-rpc-api/src/ledger_history/filter.rs:47 — crates/sui-rpc-api/src/ledger_history/filter.rs:47-60 | crates/sui-rpc-api/src/ledger_history/filter.rs:80-93 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14 lines × 2) crates/sui-rpc-store/src/reader/indexes.rs:487 — crates/sui-rpc-store/src/reader/indexes.rs:487-500 | crates/sui-rpc-store/src/reader/indexes.rs:520-533 — both copies are in the same file, so extract the 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) crates/sui-rpc-store/src/schema/event_bitmap.rs:65 — crates/sui-rpc-store/src/schema/event_bitmap.rs:65-78 | crates/sui-rpc-store/src/schema/transaction_bitmap.rs:66-79 — before extracting anything, compare `crates/sui-rpc-store/src/schema/event_bitmap.rs` and `crates/sui-rpc-store/src/schema/transaction_bitmap.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 65 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) crates/sui-sql-macro/src/lib.rs:127 — crates/sui-sql-macro/src/lib.rs:127-140 | crates/sui-sql-macro/src/lib.rs:187-200 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14 lines × 2) crates/sui-types/src/rpc_proto_conversions.rs:1769 — crates/sui-types/src/rpc_proto_conversions.rs:1769-1782 | crates/sui-types/src/rpc_proto_conversions.rs:1787-1800 — both copies are in the same file, so extract the 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) crates/sui/src/upgrade_compatibility/mod.rs:1094 — crates/sui/src/upgrade_compatibility/mod.rs:1094-1107 | crates/sui/src/upgrade_compatibility/mod.rs:2378-2391 — both copies are in the same file, so extract the 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) crates/sui/src/upgrade_compatibility/mod.rs:1820 — crates/sui/src/upgrade_compatibility/mod.rs:1820-1833 | crates/sui/src/upgrade_compatibility/mod.rs:1952-1965 — both copies are in the same file, so extract the 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) sui-execution/historical-versions/v0/sui-verifier/src/entry_points_verifier.rs:182 — sui-execution/historical-versions/v0/sui-verifier/src/entry_points_verifier.rs:182-195 | sui-execution/historical-versions/v1/sui-verifier/src/entry_points_verifier.rs:177-190 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-verifier/src/entry_points_verifier.rs` and `sui-execution/historical-versions/v1/sui-verifier/src/entry_points_verifier.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 130 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) sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/mod.rs:547 — sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/mod.rs:547-560 | sui-execution/historical-versions/v2/sui-move-natives/src/object_runtime/mod.rs:515-528 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/mod.rs` and `sui-execution/historical-versions/v2/sui-move-natives/src/object_runtime/mod.rs` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 314 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) sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.rs:787 — sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.rs:787-800 | sui-execution/latest/sui-adapter/src/execution_engine.rs:1821-1834 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.rs` and `sui-execution/latest/sui-adapter/src/execution_engine.rs` as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 689 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) sui-execution/historical-versions/v3/sui-adapter/src/gas_charger.rs:328 — sui-execution/historical-versions/v3/sui-adapter/src/gas_charger.rs:328-341 | sui-execution/latest/sui-adapter/src/gas_charger.rs:557-570 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/gas_charger.rs` and `sui-execution/latest/sui-adapter/src/gas_charger.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 54 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) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/context.rs:236 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/context.rs:236-249 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/context.rs:349-362 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/context.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/context.rs` as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 625 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) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/context.rs:467 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/context.rs:467-480 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/context.rs:707-720 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/context.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/context.rs` as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 625 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.
  • + 18 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (17 lines × 2) · ×39
  • Duplicated block (17 lines × 2) consensus/core/src/authority_service.rs:266 — consensus/core/src/authority_service.rs:266-282 | consensus/core/src/observer_service.rs:177-193 — before extracting anything, compare `consensus/core/src/authority_service.rs` and `consensus/core/src/observer_service.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 85 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (17 lines × 2) crates/sui-core/src/traffic_controller/mod.rs:629 — crates/sui-core/src/traffic_controller/mod.rs:629-645 | crates/sui-core/src/traffic_controller/mod.rs:664-680 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (17 lines × 2) crates/sui-data-store/src/gql_queries.rs:179 — crates/sui-data-store/src/gql_queries.rs:179-195 | crates/sui-fork/src/gql/queries.rs:142-158 — before extracting anything, compare `crates/sui-data-store/src/gql_queries.rs` and `crates/sui-fork/src/gql/queries.rs` 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 (17 lines × 2) crates/sui-indexer-alt-consistent-store/src/main.rs:45 — crates/sui-indexer-alt-consistent-store/src/main.rs:45-61 | crates/sui-indexer-alt-consistent-store/src/main.rs:91-107 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (17 lines × 2) crates/sui-indexer-alt-graphql/src/api/types/balance.rs:205 — crates/sui-indexer-alt-graphql/src/api/types/balance.rs:205-221 | crates/sui-indexer-alt-graphql/src/api/types/object.rs:1057-1073 — 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 (17 lines × 2) crates/sui-indexer-alt/src/main.rs:90 — crates/sui-indexer-alt/src/main.rs:90-106 | crates/sui-kvstore/src/bin/sui-kvstore-alt.rs:157-173 — 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 (17 lines × 2) crates/sui-keys/src/key_derive.rs:96 — crates/sui-keys/src/key_derive.rs:96-112 | crates/sui-keys/src/key_derive.rs:195-211 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (17 lines × 2) crates/sui-keys/src/key_derive.rs:129 — crates/sui-keys/src/key_derive.rs:129-145 | crates/sui-keys/src/key_derive.rs:162-178 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (17 lines × 2) crates/sui-replay-2/src/lib.rs:467 — crates/sui-replay-2/src/lib.rs:467-483 | crates/sui-replay-2/src/lib.rs:490-506 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (17 lines × 2) crates/sui-rosetta/src/types/internal_operation/pay_coin.rs:240 — crates/sui-rosetta/src/types/internal_operation/pay_coin.rs:240-256 | crates/sui-rosetta/src/types/internal_operation/pay_sui.rs:279-295 — before extracting anything, compare `crates/sui-rosetta/src/types/internal_operation/pay_coin.rs` and `crates/sui-rosetta/src/types/internal_operation/pay_sui.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 117 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (17 lines × 2) crates/sui-rpc-api/src/grpc/v2/state_service/list_dynamic_fields.rs:104 — crates/sui-rpc-api/src/grpc/v2/state_service/list_dynamic_fields.rs:104-120 | crates/sui-rpc-api/src/grpc/v2/state_service/list_owned_objects.rs:117-133 — before extracting anything, compare `crates/sui-rpc-api/src/grpc/v2/state_service/list_dynamic_fields.rs` and `crates/sui-rpc-api/src/grpc/v2/state_service/list_owned_objects.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 46 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (17 lines × 2) crates/sui/src/client_commands.rs:1468 — crates/sui/src/client_commands.rs:1468-1486 | crates/sui/src/client_commands.rs:1500-1516 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (17 lines × 2) sui-execution/historical-versions/v0/sui-move-natives/src/object_runtime/mod.rs:243 — sui-execution/historical-versions/v0/sui-move-natives/src/object_runtime/mod.rs:243-259 | sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/mod.rs:262-278 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/object_runtime/mod.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/mod.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 208 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (17 lines × 2) sui-execution/historical-versions/v0/sui-move-natives/src/object_runtime/object_store.rs:323 — sui-execution/historical-versions/v0/sui-move-natives/src/object_runtime/object_store.rs:323-340 | sui-execution/historical-versions/v0/sui-move-natives/src/object_runtime/object_store.rs:379-395 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (17 lines × 2) sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/mod.rs:571 — sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/mod.rs:571-587 | sui-execution/historical-versions/v2/sui-move-natives/src/object_runtime/mod.rs:539-555 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/mod.rs` and `sui-execution/historical-versions/v2/sui-move-natives/src/object_runtime/mod.rs` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 314 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (17 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/env.rs:612 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/env.rs:612-628 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/env.rs:552-568 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/env.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/env.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 78 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (17 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/context.rs:1218 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/context.rs:1218-1234 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/context.rs:1596-1612 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/context.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/context.rs` as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 625 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (17 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/interpreter.rs:83 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/interpreter.rs:83-99 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/interpreter.rs:94-110 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/interpreter.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/interpreter.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 170 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (17 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/loading/ast.rs:202 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/loading/ast.rs:202-218 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/loading/ast.rs:292-308 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/loading/ast.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/loading/ast.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 134 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (17 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/loading/translate.rs:32 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/loading/translate.rs:32-48 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/loading/translate.rs:41-57 — 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 (17 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/metering/pre_translation.rs:20 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/metering/pre_translation.rs:20-36 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/metering/pre_translation.rs:20-36 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/metering/pre_translation.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/metering/pre_translation.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 (17 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/input_arguments.rs:104 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/input_arguments.rs:104-120 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/verify/input_arguments.rs:98-114 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/input_arguments.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/verify/input_arguments.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 132 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (17 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/temporary_store.rs:220 — sui-execution/historical-versions/v3/sui-adapter/src/temporary_store.rs:220-236 | sui-execution/latest/sui-adapter/src/temporary_store.rs:467-483 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/temporary_store.rs` and `sui-execution/latest/sui-adapter/src/temporary_store.rs` as WHOLE FILES: this scan already matched 32 separate duplicated blocks between them, totalling at least 517 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (17 lines × 2) sui-execution/historical-versions/v3/sui-move-natives/src/crypto/bls12381.rs:124 — sui-execution/historical-versions/v3/sui-move-natives/src/crypto/bls12381.rs:124-140 | sui-execution/latest/sui-move-natives/src/crypto/bls12381.rs:123-139 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-move-natives/src/crypto/bls12381.rs` and `sui-execution/latest/sui-move-natives/src/crypto/bls12381.rs` as WHOLE FILES: this scan already matched 5 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 (17 lines × 2) sui-execution/historical-versions/v3/sui-move-natives/src/crypto/vdf.rs:150 — sui-execution/historical-versions/v3/sui-move-natives/src/crypto/vdf.rs:150-166 | sui-execution/latest/sui-move-natives/src/crypto/vdf.rs:151-167 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-move-natives/src/crypto/vdf.rs` and `sui-execution/latest/sui-move-natives/src/crypto/vdf.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. 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.
  • + 14 more in this group — see findings.md.
D3 · God Classes · TooManyMethods · ×37
  • TooManyMethods: AuthorityPerEpochStore crates/sui-core/src/authority/authority_per_epoch_store.rs:312 — TooManyMethods — 148 methods. The bar is 30 methods; this is 118 over it, 4.93× 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: AuthorityState crates/sui-core/src/authority.rs:1011 — TooManyMethods — 136 methods. The bar is 30 methods; this is 106 over it, 4.53× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: CheckpointStore crates/sui-core/src/checkpoints/mod.rs:378 — TooManyMethods — 60 methods. The bar is 30 methods; this is 30 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.
  • TooManyMethods: ProtocolConfig crates/sui-protocol-config/src/lib.rs:1512 — TooManyMethods — 60 methods. The bar is 30 methods; this is 30 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.
  • TooManyMethods: AuthorityStore crates/sui-core/src/authority/authority_store.rs:101 — TooManyMethods — 53 methods. The bar is 30 methods; this is 23 over it, 1.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: SuiNode crates/sui-node/src/lib.rs:255 — TooManyMethods — 53 methods. The bar is 30 methods; this is 23 over it, 1.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: DagState consensus/core/src/dag_state.rs:42 — TooManyMethods — 52 methods. The bar is 30 methods; this is 22 over it, 1.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: MovePackage crates/sui-indexer-alt-graphql/src/api/types/move_package.rs:78 — TooManyMethods — 43 methods. The bar is 30 methods; this is 13 over it, 1.43× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Object crates/sui-indexer-alt-graphql/src/api/types/object.rs:169 — TooManyMethods — 42 methods. The bar is 30 methods; this is 12 over it, 1.40× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: TemporaryStore sui-execution/latest/sui-adapter/src/temporary_store.rs:96 — TooManyMethods — 42 methods. The bar is 30 methods; this is 12 over it, 1.40× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: ExecutionContext sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/context.rs:84 — TooManyMethods — 41 methods. The bar is 30 methods; this is 11 over it, 1.37× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Operations crates/sui-rosetta/src/operations.rs:51 — TooManyMethods — 40 methods. The bar is 30 methods; this is 10 over it, 1.33× 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: ConfigBuilder crates/sui-swarm-config/src/network_config_builder.rs:106 — TooManyMethods — 40 methods. The bar is 30 methods; this is 10 over it, 1.33× 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: CoinMetadata crates/sui-indexer-alt-graphql/src/api/types/coin_metadata.rs:62 — TooManyMethods — 39 methods. The bar is 30 methods; this is 9 over it, 1.30× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: DynamicField crates/sui-indexer-alt-graphql/src/api/types/dynamic_field.rs:62 — TooManyMethods — 39 methods. The bar is 30 methods; this is 9 over it, 1.30× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: BigTableClient crates/sui-kvstore/src/bigtable/client/mod.rs:183 — TooManyMethods — 39 methods. The bar is 30 methods; this is 9 over it, 1.30× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: WalletContext crates/sui-sdk/src/wallet_context.rs:26 — TooManyMethods — 39 methods. The bar is 30 methods; this is 9 over it, 1.30× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Query crates/sui-indexer-alt-graphql/src/api/query.rs:90 — TooManyMethods — 38 methods. The bar is 30 methods; this is 8 over it, 1.27× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: SwarmBuilder crates/sui-swarm/src/memory/swarm.rs:40 — TooManyMethods — 38 methods. The bar is 30 methods; this is 8 over it, 1.27× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: AuthorityPerpetualTables crates/sui-core/src/authority/authority_store_tables.rs:61 — TooManyMethods — 35 methods. The bar is 30 methods; this is 5 over it, 1.17× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: ConsensusHandler crates/sui-core/src/consensus_handler.rs:722 — TooManyMethods — 35 methods. The bar is 30 methods; this is 5 over it, 1.17× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Client crates/sui-rpc-api/src/client/mod.rs:41 — TooManyMethods — 35 methods. The bar is 30 methods; this is 5 over it, 1.17× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: TransactionBuilder crates/sui-transaction-builder/src/lib.rs:49 — TooManyMethods — 35 methods. The bar is 30 methods; this is 5 over it, 1.17× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: MoveObject crates/sui-indexer-alt-graphql/src/api/types/move_object.rs:52 — TooManyMethods — 34 methods. The bar is 30 methods; this is 4 over it, 1.13× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: MoveObjectType crates/sui-types/src/base_types.rs:277 — TooManyMethods — 34 methods. The bar is 30 methods; this is 4 over it, 1.13× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • + 12 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (16 lines × 2) · ×30
  • Duplicated block (16 lines × 2) crates/simulacrum/src/lib.rs:703 — crates/simulacrum/src/lib.rs:703-718 | crates/sui-indexer-alt-e2e-tests/src/lib.rs:886-901 — 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 (16 lines × 2) crates/sui-benchmark/src/workloads/shared_counter.rs:221 — crates/sui-benchmark/src/workloads/shared_counter.rs:221-236 | crates/sui-benchmark/src/workloads/shared_object_deletion.rs:252-267 — before extracting anything, compare `crates/sui-benchmark/src/workloads/shared_counter.rs` and `crates/sui-benchmark/src/workloads/shared_object_deletion.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 66 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (16 lines × 2) crates/sui-checkpoint-blob-indexer/src/config.rs:46 — crates/sui-checkpoint-blob-indexer/src/config.rs:46-61 | crates/sui-kvstore/src/config.rs:169-184 — before extracting anything, compare `crates/sui-checkpoint-blob-indexer/src/config.rs` and `crates/sui-kvstore/src/config.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 70 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (16 lines × 2) crates/sui-consistent-store/src/restore/storage.rs:76 — crates/sui-consistent-store/src/restore/storage.rs:76-91 | crates/sui-indexer-alt-consistent-store/src/restore/storage.rs:61-76 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (16 lines × 2) crates/sui-indexer-alt-graphql/src/api/types/move_package.rs:508 — crates/sui-indexer-alt-graphql/src/api/types/move_package.rs:508-523 | crates/sui-indexer-alt-graphql/src/api/types/move_package.rs:549-564 — both copies are in the same file, so extract the 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) crates/sui-indexer-alt-object-store/src/lib.rs:301 — crates/sui-indexer-alt-object-store/src/lib.rs:301-316 | crates/sui-kvstore/src/store/mod.rs:589-604 — 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 (16 lines × 2) crates/sui-json-rpc-types/src/sui_transaction.rs:2208 — crates/sui-json-rpc-types/src/sui_transaction.rs:2208-2223 | crates/sui-types/src/transaction.rs:1830-1845 — before extracting anything, compare `crates/sui-json-rpc-types/src/sui_transaction.rs` and `crates/sui-types/src/transaction.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (16 lines × 2) sui-execution/historical-versions/v0/sui-adapter/src/temporary_store.rs:652 — sui-execution/historical-versions/v0/sui-adapter/src/temporary_store.rs:652-667 | sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs:735-750 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/temporary_store.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 195 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (16 lines × 2) sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/object_store.rs:322 — sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/object_store.rs:322-337 | sui-execution/historical-versions/v2/sui-move-natives/src/object_runtime/object_store.rs:329-344 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/object_store.rs` and `sui-execution/historical-versions/v2/sui-move-natives/src/object_runtime/object_store.rs` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 415 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (16 lines × 2) sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs:87 — sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs:87-102 | sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.rs:111-126 — before extracting anything, compare `sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs` and `sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.rs` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 603 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (16 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/context.rs:850 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/context.rs:850-865 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/context.rs:1135-1150 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/context.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/context.rs` as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 625 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (16 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/interpreter.rs:199 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/interpreter.rs:199-214 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/interpreter.rs:233-248 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/interpreter.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/interpreter.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 170 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (16 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/linkage/resolution.rs:147 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/linkage/resolution.rs:147-162 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/linkage/resolution.rs:199-214 — 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 (16 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/loading/ast.rs:363 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/loading/ast.rs:363-378 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/loading/ast.rs:459-474 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/loading/ast.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/loading/ast.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 134 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (16 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs:497 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs:497-512 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs:1444-1459 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs` as WHOLE FILES: this scan already matched 35 separate duplicated blocks between them, totalling at least 484 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (16 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/translate.rs:339 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/translate.rs:339-354 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/translate.rs:356-371 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/translate.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/translate.rs` as WHOLE FILES: this scan already matched 40 separate duplicated blocks between them, totalling at least 589 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (16 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/translate.rs:543 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/translate.rs:543-558 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/translate.rs:547-562 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/translate.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/translate.rs` as WHOLE FILES: this scan already matched 40 separate duplicated blocks between them, totalling at least 589 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (16 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/memory_safety.rs:283 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/memory_safety.rs:283-298 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/verify/memory_safety.rs:304-319 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/memory_safety.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/verify/memory_safety.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 120 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (16 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/private_entry_arguments.rs:233 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/private_entry_arguments.rs:233-248 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/verify/private_entry_arguments.rs:241-256 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/private_entry_arguments.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/verify/private_entry_arguments.rs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 136 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (16 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/temporary_store.rs:278 — sui-execution/historical-versions/v3/sui-adapter/src/temporary_store.rs:278-293 | sui-execution/latest/sui-adapter/src/temporary_store.rs:525-540 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/temporary_store.rs` and `sui-execution/latest/sui-adapter/src/temporary_store.rs` as WHOLE FILES: this scan already matched 32 separate duplicated blocks between them, totalling at least 517 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (16 lines × 2) sui-execution/historical-versions/v3/sui-move-natives/src/address.rs:67 — sui-execution/historical-versions/v3/sui-move-natives/src/address.rs:67-82 | sui-execution/latest/sui-move-natives/src/address.rs:71-86 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-move-natives/src/address.rs` and `sui-execution/latest/sui-move-natives/src/address.rs` 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.
  • Duplicated block (16 lines × 2) sui-execution/historical-versions/v3/sui-move-natives/src/address.rs:104 — sui-execution/historical-versions/v3/sui-move-natives/src/address.rs:104-119 | sui-execution/latest/sui-move-natives/src/address.rs:109-124 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-move-natives/src/address.rs` and `sui-execution/latest/sui-move-natives/src/address.rs` 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.
  • Duplicated block (16 lines × 2) sui-execution/historical-versions/v3/sui-move-natives/src/crypto/bls12381.rs:46 — sui-execution/historical-versions/v3/sui-move-natives/src/crypto/bls12381.rs:46-61 | sui-execution/latest/sui-move-natives/src/crypto/bls12381.rs:45-60 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-move-natives/src/crypto/bls12381.rs` and `sui-execution/latest/sui-move-natives/src/crypto/bls12381.rs` as WHOLE FILES: this scan already matched 5 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 (16 lines × 2) sui-execution/historical-versions/v3/sui-move-natives/src/crypto/ecvrf.rs:47 — sui-execution/historical-versions/v3/sui-move-natives/src/crypto/ecvrf.rs:47-62 | sui-execution/latest/sui-move-natives/src/crypto/ecvrf.rs:49-64 — 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 (16 lines × 2) sui-execution/historical-versions/v3/sui-move-natives/src/crypto/hmac.rs:42 — sui-execution/historical-versions/v3/sui-move-natives/src/crypto/hmac.rs:42-57 | sui-execution/latest/sui-move-natives/src/crypto/hmac.rs:45-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.
  • + 5 more in this group — see findings.md.
D15 · Churn × Complexity Hotspots · Hotspot · ×29
  • Hotspot: crates/sui-protocol-config/src/lib.rs crates/sui-protocol-config/src/lib.rs:2695 — crates/sui-protocol-config/src/lib.rs changed 45 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 282 in ProtocolConfig::get_for_version_impl at line 2695. 2 of those changes were fix/bug commits, and the other 43 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-07-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 22:19:49 -07:00' --until='2026-10-26 22:19:49 -07:00' --full-history --no-merges -- crates/sui-protocol-config/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: crates/sui-transactional-test-runner/src/test_adapter.rs crates/sui-transactional-test-runner/src/test_adapter.rs:719 — crates/sui-transactional-test-runner/src/test_adapter.rs changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 81 in SuiTestAdapter::handle_subcommand at line 719. 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-07-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 22:19:49 -07:00' --until='2026-10-26 22:19:49 -07:00' --full-history --no-merges -- crates/sui-transactional-test-runner/src/test_adapter.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: crates/sui-types/src/transaction.rs crates/sui-types/src/transaction.rs:3427 — crates/sui-types/src/transaction.rs changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 51 in TransactionDataV1::validity_check at line 3427. 3 of those changes were fix/bug commits, and the other 9 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-07-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 22:19:49 -07:00' --until='2026-10-26 22:19:49 -07:00' --full-history --no-merges -- crates/sui-types/src/transaction.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: crates/sui/src/client_commands.rs crates/sui/src/client_commands.rs:872 — crates/sui/src/client_commands.rs changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 78 in SuiClientCommands::execute at line 872. 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-07-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 22:19:49 -07:00' --until='2026-10-26 22:19:49 -07:00' --full-history --no-merges -- crates/sui/src/client_commands.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: crates/sui-core/src/consensus_handler.rs crates/sui-core/src/consensus_handler.rs:2722 — crates/sui-core/src/consensus_handler.rs changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 33 in ConsensusHandler::filter_consensus_txns at line 2722. 1 of those changes was a fix/bug commit, 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-07-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 22:19:49 -07:00' --until='2026-10-26 22:19:49 -07:00' --full-history --no-merges -- crates/sui-core/src/consensus_handler.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: crates/sui-core/src/authority_server.rs crates/sui-core/src/authority_server.rs:697 — crates/sui-core/src/authority_server.rs changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 74 in ValidatorService::handle_submit_transaction_inner at line 697. 1 of those changes was a fix/bug commit, and the other 4 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-07-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 22:19:49 -07:00' --until='2026-10-26 22:19:49 -07:00' --full-history --no-merges -- crates/sui-core/src/authority_server.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: sui-execution/latest/sui-adapter/src/execution_engine.rs sui-execution/latest/sui-adapter/src/execution_engine.rs:1572 — sui-execution/latest/sui-adapter/src/execution_engine.rs changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 30 in sui_adapter_latest::execution_engine::checked::execution_loop at line 1572. 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-07-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 22:19:49 -07:00' --until='2026-10-26 22:19:49 -07:00' --full-history --no-merges -- sui-execution/latest/sui-adapter/src/execution_engine.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: crates/sui-node/src/lib.rs crates/sui-node/src/lib.rs:478 — crates/sui-node/src/lib.rs changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in SuiNode::start_async at line 478. 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-07-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 22:19:49 -07:00' --until='2026-10-26 22:19:49 -07:00' --full-history --no-merges -- crates/sui-node/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: crates/sui-core/src/authority.rs crates/sui-core/src/authority.rs:1987 — crates/sui-core/src/authority.rs changed 15 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in AuthorityState::execute_certificate at line 1987. 1 of those changes was a fix/bug commit, and the other 14 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 22:19:49 -07:00' --until='2026-10-26 22:19:49 -07:00' --full-history --no-merges -- crates/sui-core/src/authority.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: sui-execution/latest/sui-adapter/src/temporary_store/invariants.rs sui-execution/latest/sui-adapter/src/temporary_store/invariants.rs:632 — sui-execution/latest/sui-adapter/src/temporary_store/invariants.rs changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 30 in InvariantChecker::check_ownership_invariants at line 632. 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-07-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 22:19:49 -07:00' --until='2026-10-26 22:19:49 -07:00' --full-history --no-merges -- sui-execution/latest/sui-adapter/src/temporary_store/invariants.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: sui-execution/latest/sui-move-natives/src/test_scenario.rs sui-execution/latest/sui-move-natives/src/test_scenario.rs:235 — sui-execution/latest/sui-move-natives/src/test_scenario.rs changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 35 in sui_move_natives_latest::test_scenario::end_transaction at line 235. 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-07-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 22:19:49 -07:00' --until='2026-10-26 22:19:49 -07:00' --full-history --no-merges -- sui-execution/latest/sui-move-natives/src/test_scenario.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: crates/sui-benchmark/src/workloads/composite/mod.rs crates/sui-benchmark/src/workloads/composite/mod.rs:1898 — crates/sui-benchmark/src/workloads/composite/mod.rs changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 39 in CompositeWorkload::init at line 1898. 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-07-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 22:19:49 -07:00' --until='2026-10-26 22:19:49 -07:00' --full-history --no-merges -- crates/sui-benchmark/src/workloads/composite/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: crates/sui-rpc-api/src/grpc/v2/transaction_execution_service/simulate/mod.rs crates/sui-rpc-api/src/grpc/v2/transaction_execution_service/simulate/mod.rs:45 — crates/sui-rpc-api/src/grpc/v2/transaction_execution_service/simulate/mod.rs changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in sui_rpc_api::grpc::v2::transaction_execution_service::simulate::simulate_transaction at line 45. 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-07-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 22:19:49 -07:00' --until='2026-10-26 22:19:49 -07:00' --full-history --no-merges -- crates/sui-rpc-api/src/grpc/v2/transaction_execution_service/simulate/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: crates/sui-rpc-api/src/grpc/v2/ledger_service/list_checkpoints.rs crates/sui-rpc-api/src/grpc/v2/ledger_service/list_checkpoints.rs:513 — crates/sui-rpc-api/src/grpc/v2/ledger_service/list_checkpoints.rs changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in sui_rpc_api::grpc::v2::ledger_service::list_checkpoints::next_filtered_checkpoint_chunk at line 513. 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-07-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 22:19:49 -07:00' --until='2026-10-26 22:19:49 -07:00' --full-history --no-merges -- crates/sui-rpc-api/src/grpc/v2/ledger_service/list_checkpoints.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: crates/sui-rpc-api/src/grpc/v2/ledger_service/list_events.rs crates/sui-rpc-api/src/grpc/v2/ledger_service/list_events.rs:281 — crates/sui-rpc-api/src/grpc/v2/ledger_service/list_events.rs changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in sui_rpc_api::grpc::v2::ledger_service::list_events::next_event_chunk at line 281. 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-07-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 22:19:49 -07:00' --until='2026-10-26 22:19:49 -07:00' --full-history --no-merges -- crates/sui-rpc-api/src/grpc/v2/ledger_service/list_events.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: crates/sui-kvstore/src/bigtable/mock_server.rs crates/sui-kvstore/src/bigtable/mock_server.rs:785 — crates/sui-kvstore/src/bigtable/mock_server.rs changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in MockBigtableServer::read_rows at line 785. 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-07-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 22:19:49 -07:00' --until='2026-10-26 22:19:49 -07:00' --full-history --no-merges -- crates/sui-kvstore/src/bigtable/mock_server.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: crates/sui-core/src/consensus_transaction_pool.rs crates/sui-core/src/consensus_transaction_pool.rs:1018 — crates/sui-core/src/consensus_transaction_pool.rs changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in ConsensusTransactionPool::take at line 1018. 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-07-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 22:19:49 -07:00' --until='2026-10-26 22:19:49 -07:00' --full-history --no-merges -- crates/sui-core/src/consensus_transaction_pool.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: crates/sui-indexer-alt-graphql/src/api/subscription/scan_then_live.rs crates/sui-indexer-alt-graphql/src/api/subscription/scan_then_live.rs:595 — crates/sui-indexer-alt-graphql/src/api/subscription/scan_then_live.rs changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 15 in sui_indexer_alt_graphql::api::subscription::scan_then_live::live at line 595. 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-07-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 22:19:49 -07:00' --until='2026-10-26 22:19:49 -07:00' --full-history --no-merges -- crates/sui-indexer-alt-graphql/src/api/subscription/scan_then_live.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: crates/sui-rpc-api/src/grpc/v2/ledger_service/list_transactions.rs crates/sui-rpc-api/src/grpc/v2/ledger_service/list_transactions.rs:279 — crates/sui-rpc-api/src/grpc/v2/ledger_service/list_transactions.rs changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in sui_rpc_api::grpc::v2::ledger_service::list_transactions::next_transaction_chunk at line 279. 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-07-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 22:19:49 -07:00' --until='2026-10-26 22:19:49 -07:00' --full-history --no-merges -- crates/sui-rpc-api/src/grpc/v2/ledger_service/list_transactions.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: crates/test-cluster/src/lib.rs crates/test-cluster/src/lib.rs:1663 — crates/test-cluster/src/lib.rs changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in TestClusterBuilder::start_swarm at line 1663. 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-07-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 22:19:49 -07:00' --until='2026-10-26 22:19:49 -07:00' --full-history --no-merges -- crates/test-cluster/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: sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs:820 — sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in sui_adapter_latest::static_programmable_transactions::typing::invariant_checks::memory_safety::call at line 820. 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-07-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 22:19:49 -07:00' --until='2026-10-26 22:19:49 -07:00' --full-history --no-merges -- sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.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: crates/sui-kv-rpc/src/v2/list_events.rs crates/sui-kv-rpc/src/v2/list_events.rs:79 — crates/sui-kv-rpc/src/v2/list_events.rs changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in sui_kv_rpc::v2::list_events::list_events at line 79. 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-07-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 22:19:49 -07:00' --until='2026-10-26 22:19:49 -07:00' --full-history --no-merges -- crates/sui-kv-rpc/src/v2/list_events.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: crates/sui-core/src/consensus_adapter.rs crates/sui-core/src/consensus_adapter.rs:449 — crates/sui-core/src/consensus_adapter.rs changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in ConsensusAdapter::submit_and_wait_inner at line 449. 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-07-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 22:19:49 -07:00' --until='2026-10-26 22:19:49 -07:00' --full-history --no-merges -- crates/sui-core/src/consensus_adapter.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: crates/sui-kv-rpc/src/v2/list_transactions.rs crates/sui-kv-rpc/src/v2/list_transactions.rs:83 — crates/sui-kv-rpc/src/v2/list_transactions.rs changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in sui_kv_rpc::v2::list_transactions::list_transactions at line 83. 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-07-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 22:19:49 -07:00' --until='2026-10-26 22:19:49 -07:00' --full-history --no-merges -- crates/sui-kv-rpc/src/v2/list_transactions.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: crates/sui-core/src/authority/authority_store_pruner.rs crates/sui-core/src/authority/authority_store_pruner.rs:912 — crates/sui-core/src/authority/authority_store_pruner.rs changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in AuthorityStorePruner::setup_pruning at line 912. 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-07-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 22:19:49 -07:00' --until='2026-10-26 22:19:49 -07:00' --full-history --no-merges -- crates/sui-core/src/authority/authority_store_pruner.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.
  • + 4 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (15 lines × 2) · ×29
  • Duplicated block (15 lines × 2) crates/sui-bridge/src/server/mod.rs:540 — crates/sui-bridge/src/server/mod.rs:540-554 | crates/sui-bridge/src/server/mod.rs:626-640 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (15 lines × 2) crates/sui-core/src/consensus_handler.rs:1967 — crates/sui-core/src/consensus_handler.rs:1967-1981 | crates/sui-core/src/consensus_handler.rs:2018-2032 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (15 lines × 2) crates/sui-indexer-alt-consistent-store/src/handlers/object_by_owner.rs:105 — crates/sui-indexer-alt-consistent-store/src/handlers/object_by_owner.rs:105-119 | crates/sui-indexer-alt-consistent-store/src/handlers/object_by_type.rs:105-119 — before extracting anything, compare `crates/sui-indexer-alt-consistent-store/src/handlers/object_by_owner.rs` and `crates/sui-indexer-alt-consistent-store/src/handlers/object_by_type.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 59 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (15 lines × 2) crates/sui-indexer-alt-reader/src/fullnode_client.rs:106 — crates/sui-indexer-alt-reader/src/fullnode_client.rs:106-120 | crates/sui-rpc-api/src/client/mod.rs:267-281 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (15 lines × 2) crates/sui-oracle/src/lib.rs:706 — crates/sui-oracle/src/lib.rs:706-720 | crates/sui-transaction-builder/src/lib.rs:408-422 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (15 lines × 2) crates/sui-rosetta/src/operations.rs:262 — crates/sui-rosetta/src/operations.rs:262-276 | crates/sui-rosetta/src/operations.rs:292-306 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (15 lines × 2) crates/sui-rpc-api/src/grpc/v2/subscription_service.rs:201 — crates/sui-rpc-api/src/grpc/v2/subscription_service.rs:201-215 | crates/sui-rpc-api/src/grpc/v2/subscription_service.rs:318-332 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (15 lines × 2) crates/sui-rpc-api/src/grpc/v2/transaction_execution_service/mod.rs:211 — crates/sui-rpc-api/src/grpc/v2/transaction_execution_service/mod.rs:211-225 | crates/sui-rpc-api/src/grpc/v2/transaction_execution_service/simulate/mod.rs:311-325 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (15 lines × 2) sui-execution/historical-versions/v0/sui-move-natives/src/object_runtime/mod.rs:170 — sui-execution/historical-versions/v0/sui-move-natives/src/object_runtime/mod.rs:170-184 | sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/mod.rs:186-200 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/object_runtime/mod.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/mod.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 208 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (15 lines × 2) sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/object_store.rs:373 — sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/object_store.rs:373-387 | sui-execution/historical-versions/v2/sui-move-natives/src/object_runtime/object_store.rs:382-396 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/object_store.rs` and `sui-execution/historical-versions/v2/sui-move-natives/src/object_runtime/object_store.rs` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 415 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (15 lines × 2) sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/object_store.rs:581 — sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/object_store.rs:581-595 | sui-execution/historical-versions/v2/sui-move-natives/src/object_runtime/object_store.rs:603-617 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/object_store.rs` and `sui-execution/historical-versions/v2/sui-move-natives/src/object_runtime/object_store.rs` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 415 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (15 lines × 2) sui-execution/historical-versions/v1/sui-verifier/src/entry_points_verifier.rs:49 — sui-execution/historical-versions/v1/sui-verifier/src/entry_points_verifier.rs:49-63 | sui-execution/historical-versions/v2/sui-verifier/src/entry_points_verifier.rs:52-66 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-verifier/src/entry_points_verifier.rs` and `sui-execution/historical-versions/v2/sui-verifier/src/entry_points_verifier.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 160 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (15 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.rs:258 — sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.rs:258-272 | sui-execution/latest/sui-adapter/src/execution_engine.rs:542-556 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.rs` and `sui-execution/latest/sui-adapter/src/execution_engine.rs` as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 689 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (15 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/context.rs:354 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/context.rs:354-368 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/context.rs:550-564 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/context.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/context.rs` as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 625 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (15 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/interpreter.rs:157 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/interpreter.rs:157-171 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/interpreter.rs:168-182 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/interpreter.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/interpreter.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 170 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (15 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/interpreter.rs:216 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/interpreter.rs:216-230 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/interpreter.rs:250-264 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/interpreter.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/interpreter.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 170 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (15 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/loading/ast.rs:185 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/loading/ast.rs:185-199 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/loading/ast.rs:275-289 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/loading/ast.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/loading/ast.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 134 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (15 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/loading/ast.rs:220 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/loading/ast.rs:220-234 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/loading/ast.rs:316-330 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/loading/ast.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/loading/ast.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 134 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (15 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/loading/ast.rs:257 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/loading/ast.rs:257-271 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/loading/ast.rs:353-367 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/loading/ast.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/loading/ast.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 134 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (15 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/input_arguments.rs:178 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/input_arguments.rs:178-192 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/verify/input_arguments.rs:173-187 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/input_arguments.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/verify/input_arguments.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 132 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (15 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/memory_safety.rs:564 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/memory_safety.rs:564-578 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/verify/memory_safety.rs:631-645 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/memory_safety.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/verify/memory_safety.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 120 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (15 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/private_entry_arguments.rs:107 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/private_entry_arguments.rs:107-121 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/verify/private_entry_arguments.rs:105-119 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/private_entry_arguments.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/verify/private_entry_arguments.rs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 136 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (15 lines × 2) sui-execution/historical-versions/v3/sui-move-natives/src/lib.rs:1381 — sui-execution/historical-versions/v3/sui-move-natives/src/lib.rs:1381-1395 | sui-execution/latest/sui-move-natives/src/lib.rs:1553-1567 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-move-natives/src/lib.rs` and `sui-execution/latest/sui-move-natives/src/lib.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 511 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (15 lines × 2) sui-execution/historical-versions/v3/sui-move-natives/src/object.rs:31 — sui-execution/historical-versions/v3/sui-move-natives/src/object.rs:31-45 | sui-execution/latest/sui-move-natives/src/object.rs:34-48 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-move-natives/src/object.rs` and `sui-execution/latest/sui-move-natives/src/object.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 55 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (15 lines × 2) sui-execution/historical-versions/v3/sui-move-natives/src/object_runtime/object_store.rs:470 — sui-execution/historical-versions/v3/sui-move-natives/src/object_runtime/object_store.rs:470-484 | sui-execution/latest/sui-move-natives/src/object_runtime/object_store.rs:472-486 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-move-natives/src/object_runtime/object_store.rs` and `sui-execution/latest/sui-move-natives/src/object_runtime/object_store.rs` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 521 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.
  • + 4 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (19 lines × 2) · ×25
  • Duplicated block (19 lines × 2) consensus/core/src/network/observer.rs:568 — consensus/core/src/network/observer.rs:568-586 | consensus/core/src/network/tonic_network.rs:742-760 — before extracting anything, compare `consensus/core/src/network/observer.rs` and `consensus/core/src/network/tonic_network.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 185 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 (19 lines × 2) crates/sui-bridge-indexer-alt/src/handlers/token_transfer_handler.rs:85 — crates/sui-bridge-indexer-alt/src/handlers/token_transfer_handler.rs:85-103 | crates/sui-bridge-indexer-alt/src/handlers/token_transfer_handler.rs:112-130 — both copies are in the same file, so extract the 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 (19 lines × 2) crates/sui-bridge/src/encoding.rs:201 — crates/sui-bridge/src/encoding.rs:201-219 | crates/sui-bridge/src/encoding.rs:245-263 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (19 lines × 2) crates/sui-data-store/src/gql_queries.rs:154 — crates/sui-data-store/src/gql_queries.rs:154-172 | crates/sui-fork/src/gql/queries.rs:100-118 — before extracting anything, compare `crates/sui-data-store/src/gql_queries.rs` and `crates/sui-fork/src/gql/queries.rs` 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 (19 lines × 2) crates/sui-indexer-alt-consistent-store/src/main.rs:69 — crates/sui-indexer-alt-consistent-store/src/main.rs:69-87 | crates/sui-indexer-alt-graphql/src/main.rs:112-130 — 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 (19 lines × 2) crates/sui-rosetta/src/operations.rs:1015 — crates/sui-rosetta/src/operations.rs:1015-1033 | crates/sui-rosetta/src/operations.rs:1288-1306 — both copies are in the same file, so extract the 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 (19 lines × 2) sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs:174 — sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs:174-192 | sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs:194-212 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs` and `sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs` as WHOLE FILES: this scan already matched 39 separate duplicated blocks between them, totalling at least 959 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (19 lines × 2) sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:557 — sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:557-575 | sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs:575-593 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs` and `sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs` as WHOLE FILES: this scan already matched 61 separate duplicated blocks between them, totalling at least 1074 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (19 lines × 2) sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:743 — sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:743-761 | sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs:800-818 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs` and `sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs` as WHOLE FILES: this scan already matched 61 separate duplicated blocks between them, totalling at least 1074 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (19 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/trace_utils.rs:72 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/trace_utils.rs:72-90 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/trace_utils.rs:67-85 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/trace_utils.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/trace_utils.rs` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 272 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (19 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/translate.rs:1212 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/translate.rs:1212-1230 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/translate.rs:1276-1294 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/translate.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/translate.rs` as WHOLE FILES: this scan already matched 40 separate duplicated blocks between them, totalling at least 589 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (19 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/temporary_store.rs:195 — sui-execution/historical-versions/v3/sui-adapter/src/temporary_store.rs:195-213 | sui-execution/latest/sui-adapter/src/temporary_store.rs:442-460 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/temporary_store.rs` and `sui-execution/latest/sui-adapter/src/temporary_store.rs` as WHOLE FILES: this scan already matched 32 separate duplicated blocks between them, totalling at least 517 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (19 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/temporary_store.rs:1164 — sui-execution/historical-versions/v3/sui-adapter/src/temporary_store.rs:1164-1182 | sui-execution/latest/sui-adapter/src/temporary_store.rs:1339-1357 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/temporary_store.rs` and `sui-execution/latest/sui-adapter/src/temporary_store.rs` as WHOLE FILES: this scan already matched 32 separate duplicated blocks between them, totalling at least 517 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (19 lines × 2) sui-execution/historical-versions/v3/sui-move-natives/src/config.rs:43 — sui-execution/historical-versions/v3/sui-move-natives/src/config.rs:43-61 | sui-execution/latest/sui-move-natives/src/config.rs:44-62 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-move-natives/src/config.rs` and `sui-execution/latest/sui-move-natives/src/config.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 104 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (19 lines × 2) sui-execution/historical-versions/v3/sui-move-natives/src/crypto/ecdsa_k1.rs:374 — sui-execution/historical-versions/v3/sui-move-natives/src/crypto/ecdsa_k1.rs:374-392 | sui-execution/latest/sui-move-natives/src/crypto/ecdsa_k1.rs:376-394 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-move-natives/src/crypto/ecdsa_k1.rs` and `sui-execution/latest/sui-move-natives/src/crypto/ecdsa_k1.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 212 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (19 lines × 2) sui-execution/historical-versions/v3/sui-move-natives/src/dynamic_field.rs:226 — sui-execution/historical-versions/v3/sui-move-natives/src/dynamic_field.rs:226-244 | sui-execution/latest/sui-move-natives/src/dynamic_field.rs:223-241 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-move-natives/src/dynamic_field.rs` and `sui-execution/latest/sui-move-natives/src/dynamic_field.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 177 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (19 lines × 2) sui-execution/historical-versions/v3/sui-move-natives/src/transaction_context.rs:96 — sui-execution/historical-versions/v3/sui-move-natives/src/transaction_context.rs:96-114 | sui-execution/latest/sui-move-natives/src/transaction_context.rs:96-114 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (19 lines × 2) sui-execution/historical-versions/v3/sui-move-natives/src/tx_context.rs:106 — sui-execution/historical-versions/v3/sui-move-natives/src/tx_context.rs:106-124 | sui-execution/latest/sui-move-natives/src/tx_context.rs:108-126 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-move-natives/src/tx_context.rs` and `sui-execution/latest/sui-move-natives/src/tx_context.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 258 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (19 lines × 2) sui-execution/historical-versions/v3/sui-move-natives/src/tx_context.rs:139 — sui-execution/historical-versions/v3/sui-move-natives/src/tx_context.rs:139-157 | sui-execution/latest/sui-move-natives/src/tx_context.rs:141-159 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-move-natives/src/tx_context.rs` and `sui-execution/latest/sui-move-natives/src/tx_context.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 258 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (19 lines × 2) sui-execution/historical-versions/v3/sui-move-natives/src/tx_context.rs:172 — sui-execution/historical-versions/v3/sui-move-natives/src/tx_context.rs:172-190 | sui-execution/latest/sui-move-natives/src/tx_context.rs:174-192 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-move-natives/src/tx_context.rs` and `sui-execution/latest/sui-move-natives/src/tx_context.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 258 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (19 lines × 2) sui-execution/historical-versions/v3/sui-move-natives/src/tx_context.rs:205 — sui-execution/historical-versions/v3/sui-move-natives/src/tx_context.rs:205-223 | sui-execution/latest/sui-move-natives/src/tx_context.rs:207-225 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-move-natives/src/tx_context.rs` and `sui-execution/latest/sui-move-natives/src/tx_context.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 258 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (19 lines × 2) sui-execution/historical-versions/v3/sui-move-natives/src/tx_context.rs:267 — sui-execution/historical-versions/v3/sui-move-natives/src/tx_context.rs:267-285 | sui-execution/latest/sui-move-natives/src/tx_context.rs:269-287 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-move-natives/src/tx_context.rs` and `sui-execution/latest/sui-move-natives/src/tx_context.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 258 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (19 lines × 2) sui-execution/historical-versions/v3/sui-move-natives/src/tx_context.rs:300 — sui-execution/historical-versions/v3/sui-move-natives/src/tx_context.rs:300-318 | sui-execution/latest/sui-move-natives/src/tx_context.rs:302-320 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-move-natives/src/tx_context.rs` and `sui-execution/latest/sui-move-natives/src/tx_context.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 258 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (19 lines × 2) sui-execution/historical-versions/v3/sui-move-natives/src/tx_context.rs:333 — sui-execution/historical-versions/v3/sui-move-natives/src/tx_context.rs:333-351 | sui-execution/latest/sui-move-natives/src/tx_context.rs:335-353 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-move-natives/src/tx_context.rs` and `sui-execution/latest/sui-move-natives/src/tx_context.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 258 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (19 lines × 2) sui-execution/historical-versions/v3/sui-verifier/src/id_leak_verifier.rs:579 — sui-execution/historical-versions/v3/sui-verifier/src/id_leak_verifier.rs:579-597 | sui-execution/latest/sui-verifier/src/id_leak_verifier.rs:585-603 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-verifier/src/id_leak_verifier.rs` and `sui-execution/latest/sui-verifier/src/id_leak_verifier.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 357 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.
D30 · Dependency Vulnerabilities · Medium CVE · ×23
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D6 · Cohesion (LCOM4) · Low cohesion · ×23
  • Low cohesion: ServiceConfig (LCOM4 21) crates/sui-indexer-alt-graphql/src/api/types/service_config.rs:17 — ServiceConfig's methods fall into 21 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 21 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: RpcService (LCOM4 12) crates/sui-rpc-api/src/lib.rs:64 — RpcService's methods fall into 12 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 12 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: AuthorityPerEpochStore (LCOM4 9) crates/sui-core/src/authority/authority_per_epoch_store.rs:312 — AuthorityPerEpochStore's methods fall into 9 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 9 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: AuthorityPerpetualTables (LCOM4 9) crates/sui-core/src/authority/authority_store_tables.rs:61 — AuthorityPerpetualTables's methods fall into 9 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 9 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: Client (LCOM4 9) crates/sui-rpc-api/src/client/mod.rs:41 — Client's methods fall into 9 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 9 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: TelemetryConfig (LCOM4 9) crates/telemetry-subscribers/src/lib.rs:169 — TelemetryConfig's methods fall into 9 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 9 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: OffchainCluster (LCOM4 6) crates/sui-indexer-alt-e2e-tests/src/lib.rs:111 — OffchainCluster's methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 6 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: Context (LCOM4 6) external-crates/move/crates/move-ir-to-bytecode/src/context.rs:249 — Context's methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 6 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: Env (LCOM4 6) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/env.rs:54 — Env's methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 6 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: Connection (LCOM4 5) crates/sui-pg-db/src/lib.rs:84 — Connection's methods fall into 5 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 5 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: ProtocolConfig (LCOM4 5) crates/sui-protocol-config/src/lib.rs:1512 — ProtocolConfig's methods fall into 5 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 5 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: TransactionBuilder (LCOM4 5) crates/sui-transaction-builder/src/lib.rs:49 — TransactionBuilder's methods fall into 5 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 5 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: PersistedStore (LCOM4 5) crates/sui-transactional-test-runner/src/simulator_persisted_store.rs:46 — PersistedStore's methods fall into 5 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 5 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: UnusedReturnValueAI (LCOM4 5) external-crates/move/crates/move-compiler/src/linters/unused_return_value.rs:36 — UnusedReturnValueAI's methods fall into 5 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 5 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: UnusedObjWithFieldsAI (LCOM4 5) external-crates/move/crates/move-compiler/src/sui_mode/linters/unused_object_with_fields.rs:69 — UnusedObjWithFieldsAI's methods fall into 5 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 5 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: Env (LCOM4 5) sui-execution/latest/sui-adapter/src/static_programmable_transactions/env.rs:55 — Env's methods fall into 5 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 5 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: BridgeOrchestratorTables (LCOM4 4) crates/sui-bridge/src/storage.rs:17 — BridgeOrchestratorTables'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: ExecutionCacheMetrics (LCOM4 4) crates/sui-core/src/execution_cache/metrics.rs:13 — ExecutionCacheMetrics'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: FallibleMockStore (LCOM4 4) crates/sui-indexer-alt-framework/src/mocks/store.rs:53 — FallibleMockStore'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: MultiSigLegacy (LCOM4 4) crates/sui-types/src/multisig_legacy.rs:45 — MultiSigLegacy'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: ShareOwnedVerifierAI (LCOM4 4) external-crates/move/crates/move-compiler/src/sui_mode/linters/share_owned.rs:54 — ShareOwnedVerifierAI'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: Variant (LCOM4 4) external-crates/move/crates/move-model-2/src/model.rs:132 — Variant'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: LinkedDataStore (LCOM4 4) sui-execution/historical-versions/v3/sui-adapter/src/data_store/linked_data_store.rs:22 — LinkedDataStore'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.
D4 · Code Duplication · Duplicated block (18 lines × 2) · ×22
  • Duplicated block (18 lines × 2) crates/sui-bridge/src/encoding.rs:113 — crates/sui-bridge/src/encoding.rs:113-130 | crates/sui-bridge/src/encoding.rs:155-172 — both copies are in the same file, so extract the 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) crates/sui-data-store/src/stores/filesystem.rs:532 — crates/sui-data-store/src/stores/filesystem.rs:532-549 | crates/sui-data-store/src/stores/graphql.rs:156-173 — before extracting anything, compare `crates/sui-data-store/src/stores/filesystem.rs` and `crates/sui-data-store/src/stores/graphql.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.
  • Duplicated block (18 lines × 2) crates/sui-indexer-alt-graphql/src/api/types/object.rs:554 — crates/sui-indexer-alt-graphql/src/api/types/object.rs:554-571 | crates/sui-indexer-alt-graphql/src/api/types/object.rs:595-612 — both copies are in the same file, so extract the 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) crates/sui-rosetta/src/types/internal_operation/consolidate_to_fungible.rs:128 — crates/sui-rosetta/src/types/internal_operation/consolidate_to_fungible.rs:128-145 | crates/sui-rosetta/src/types/internal_operation/consolidate_to_fungible.rs:174-191 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (18 lines × 2) crates/sui-rosetta/src/types/internal_operation/pay_coin.rs:222 — crates/sui-rosetta/src/types/internal_operation/pay_coin.rs:222-239 | crates/sui-rosetta/src/types/internal_operation/pay_coin.rs:277-294 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (18 lines × 2) crates/sui-rpc-api/src/grpc/v2/ledger_service/list_events.rs:432 — crates/sui-rpc-api/src/grpc/v2/ledger_service/list_events.rs:432-449 | crates/sui-rpc-api/src/grpc/v2/ledger_service/list_events.rs:529-546 — both copies are in the same file, so extract the 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) crates/sui/src/client_commands.rs:1163 — crates/sui/src/client_commands.rs:1163-1180 | crates/sui/src/client_commands.rs:1750-1767 — both copies are in the same file, so extract the 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) sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:446 — sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:446-463 | sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs:464-481 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs` and `sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs` as WHOLE FILES: this scan already matched 61 separate duplicated blocks between them, totalling at least 1074 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 (18 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.rs:344 — sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.rs:344-361 | sui-execution/latest/sui-adapter/src/execution_engine.rs:1289-1306 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.rs` and `sui-execution/latest/sui-adapter/src/execution_engine.rs` as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 689 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 (18 lines × 2) REDACTED:871 — REDACTED:871-888 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/context.rs:2541-2558 — before extracting anything, compare `REDACTED` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/context.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 255 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 (18 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/context.rs:991 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/context.rs:991-1008 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/context.rs:1359-1376 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/context.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/context.rs` as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 625 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 (18 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/context.rs:1388 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/context.rs:1388-1405 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/context.rs:1807-1824 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/context.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/context.rs` as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 625 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 (18 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/trace_utils.rs:448 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/trace_utils.rs:448-465 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/trace_utils.rs:438-455 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/trace_utils.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/trace_utils.rs` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 272 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 (18 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/loading/ast.rs:237 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/loading/ast.rs:237-254 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/loading/ast.rs:333-350 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/loading/ast.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/loading/ast.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 134 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 (18 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs:470 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs:470-487 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs:1416-1433 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs` as WHOLE FILES: this scan already matched 35 separate duplicated blocks between them, totalling at least 484 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 (18 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/type_check.rs:137 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/type_check.rs:137-154 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/type_check.rs:159-176 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/type_check.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/type_check.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 289 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 (18 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/private_entry_arguments.rs:252 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/private_entry_arguments.rs:252-269 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/verify/private_entry_arguments.rs:260-277 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/private_entry_arguments.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/verify/private_entry_arguments.rs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 136 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 (18 lines × 2) sui-execution/historical-versions/v3/sui-move-natives/src/dynamic_field.rs:385 — sui-execution/historical-versions/v3/sui-move-natives/src/dynamic_field.rs:385-402 | sui-execution/latest/sui-move-natives/src/dynamic_field.rs:386-403 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-move-natives/src/dynamic_field.rs` and `sui-execution/latest/sui-move-natives/src/dynamic_field.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 177 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 (18 lines × 2) sui-execution/historical-versions/v3/sui-move-natives/src/dynamic_field.rs:455 — sui-execution/historical-versions/v3/sui-move-natives/src/dynamic_field.rs:455-472 | sui-execution/latest/sui-move-natives/src/dynamic_field.rs:461-478 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-move-natives/src/dynamic_field.rs` and `sui-execution/latest/sui-move-natives/src/dynamic_field.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 177 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 (18 lines × 2) sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs:715 — sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs:715-732 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs:1501-1518 — both copies are in the same file, so extract the 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) sui-execution/historical-versions/v3/sui-move-natives/src/test_scenario.rs:651 — sui-execution/historical-versions/v3/sui-move-natives/src/test_scenario.rs:651-668 | sui-execution/latest/sui-move-natives/src/test_scenario.rs:826-843 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-move-natives/src/test_scenario.rs` and `sui-execution/latest/sui-move-natives/src/test_scenario.rs` as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 610 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 (18 lines × 2) sui-execution/historical-versions/v3/sui-move-natives/src/test_scenario.rs:735 — sui-execution/historical-versions/v3/sui-move-natives/src/test_scenario.rs:735-752 | sui-execution/latest/sui-move-natives/src/test_scenario.rs:909-926 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-move-natives/src/test_scenario.rs` and `sui-execution/latest/sui-move-natives/src/test_scenario.rs` as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 610 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.
PF3 · Async & latency hygiene · Sync-over-async blocking · ×21
  • Sync-over-async blocking crates/sui-swarm/src/memory/container.rs:43 — `spawn` is async and calls block_on — a blocking call inside async code stalls the executor thread, and every task scheduled on it for as long as it runs.
  • Sync-over-async blocking examples/trading/api/sui-utils.ts:79 — `execSync` in `publishPackage` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking examples/trading/api/sui-utils.ts:98 — `writeFileSync` in `publishPackage` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking external-crates/move/crates/move-analyzer/editors/code/src/main.ts:21 — `childProcess.spawnSync` in `serverVersion` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking external-crates/move/crates/move-analyzer/editors/code/src/main.ts:57 — `fs.readdirSync` in `containsManifest` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking external-crates/move/crates/move-analyzer/editors/code/src/main.ts:79 — `childProcess.spawnSync` in `suiMoveCmd` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking external-crates/move/crates/move-analyzer/editors/code/src/main.ts:171 — `childProcess.spawnSync` in `activate` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking external-crates/move/crates/move-analyzer/trace-adapter/src/runtime.ts:478 — `fs.readdirSync` in `start` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking external-crates/move/crates/move-analyzer/trace-adapter/src/runtime.ts:481 — `fs.statSync` in `callback to extRootContents.filter` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking external-crates/move/crates/move-analyzer/trace-adapter/src/runtime.ts:499 — `fs.existsSync` in `start` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking external-crates/move/crates/move-analyzer/trace-adapter/src/runtime.ts:560 — `fs.existsSync` in `start` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking external-crates/move/crates/move-analyzer/trace-adapter/src/runtime.ts:572 — `fs.existsSync` in `start` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking external-crates/move/crates/move-analyzer/trace-adapter/src/runtime.ts:1931 — `fs.readdirSync` in `containsManifest` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking external-crates/move/crates/move-analyzer/trace-adapter/src/trace_utils.ts:557 — `fs.readFileSync` in `readTrace` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking external-crates/move/crates/move-analyzer/trace-debug/src/add_source.ts:303 — `fs.existsSync` in `prepareSourceDir` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking external-crates/move/crates/move-analyzer/trace-debug/src/add_source.ts:303 — `fs.readdirSync` in `prepareSourceDir` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking external-crates/move/crates/move-analyzer/trace-debug/src/add_source.ts:313 — `fs.rmSync` in `prepareSourceDir` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking external-crates/move/crates/move-analyzer/trace-debug/src/add_source.ts:315 — `fs.mkdirSync` in `prepareSourceDir` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking external-crates/move/crates/move-analyzer/trace-debug/src/add_source.ts:384 — `fs.cpSync` in `addSourceToTrace` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking external-crates/move/crates/move-analyzer/trace-debug/src/add_source.ts:389 — `fs.rmSync` in `addSourceToTrace` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking external-crates/move/crates/move-analyzer/trace-debug/src/extension.ts:540 — `fs.readdirSync` in `containsManifest` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
D4 · Code Duplication · Duplicated block (7 lines × 3) · ×20
  • Duplicated block (7 lines × 3) crates/sui-bridge/src/sui_transaction_builder.rs:309 — crates/sui-bridge/src/sui_transaction_builder.rs:309-315 | crates/sui-bridge/src/sui_transaction_builder.rs:371-378 | crates/sui-bridge/src/sui_transaction_builder.rs:438-444 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (7 lines × 3) crates/sui-rpc-api/src/grpc/v2/ledger_service/list_checkpoints.rs:86 — crates/sui-rpc-api/src/grpc/v2/ledger_service/list_checkpoints.rs:86-92 | crates/sui-rpc-api/src/grpc/v2/ledger_service/list_events.rs:78-84 | crates/sui-rpc-api/src/grpc/v2/ledger_service/list_transactions.rs:83-89 — before extracting anything, compare `crates/sui-rpc-api/src/grpc/v2/ledger_service/list_checkpoints.rs` and `crates/sui-rpc-api/src/grpc/v2/ledger_service/list_transactions.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 33 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 3) REDACTED:1316 — REDACTED:1316-1322 | REDACTED:1239-1245 | REDACTED:1251-1257 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 54 separate duplicated blocks between them, totalling at least 1035 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 3) sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/linkage_view.rs:304 — sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/linkage_view.rs:304-310 | sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/linkage_view.rs:241-247 | sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/linkage_view.rs:241-247 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/linkage_view.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/linkage_view.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 128 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 3) sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:1040 — sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:1040-1046 | sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs:1097-1103 | sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/context.rs:1690-1696 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs` and `sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs` as WHOLE FILES: this scan already matched 61 separate duplicated blocks between them, totalling at least 1074 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 3) sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:1328 — sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:1328-1338 | sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs:1385-1395 | sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/context.rs:2064-2070 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs` and `sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs` as WHOLE FILES: this scan already matched 61 separate duplicated blocks between them, totalling at least 1074 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 3) REDACTED:1241 — REDACTED:1241-1247 | REDACTED:1253-1259 | REDACTED:1520-1526 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 77 separate duplicated blocks between them, totalling at least 1502 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 3) sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs:724 — sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs:724-730 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs:873-879 | sui-execution/latest/sui-move-natives/src/crypto/group_ops.rs:875-881 — before extracting anything, compare `sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs` and `sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 256 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 3) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs:397 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs:397-403 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs:532-538 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs:1343-1349 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs` as WHOLE FILES: this scan already matched 35 separate duplicated blocks between them, totalling at least 484 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 3) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs:425 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs:425-431 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs:560-566 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs:1371-1377 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs` as WHOLE FILES: this scan already matched 35 separate duplicated blocks between them, totalling at least 484 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 3) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs:459 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs:459-465 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs:622-628 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs:1405-1411 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs` as WHOLE FILES: this scan already matched 35 separate duplicated blocks between them, totalling at least 484 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 3) sui-execution/historical-versions/v2/sui-adapter/src/temporary_store.rs:495 — sui-execution/historical-versions/v2/sui-adapter/src/temporary_store.rs:495-501 | sui-execution/historical-versions/v3/sui-adapter/src/temporary_store.rs:463-469 | sui-execution/latest/sui-adapter/src/temporary_store.rs:720-726 — before extracting anything, compare `sui-execution/historical-versions/v2/sui-adapter/src/temporary_store.rs` and `sui-execution/historical-versions/v3/sui-adapter/src/temporary_store.rs` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 547 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 3) sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/trace_utils.rs:52 — sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/trace_utils.rs:52-58 | sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/trace_utils.rs:43-49 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/trace_utils.rs:38-44 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/trace_utils.rs` and `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/trace_utils.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 105 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 3) sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/trace_utils.rs:62 — sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/trace_utils.rs:62-68 | sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/trace_utils.rs:53-59 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/trace_utils.rs:48-54 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/trace_utils.rs` and `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/trace_utils.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 105 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 3) crates/sui-bridge-indexer-alt/src/handlers/error_handler.rs:54 — crates/sui-bridge-indexer-alt/src/handlers/error_handler.rs:54-60 | crates/sui-indexer-alt/src/handlers/kv_transactions.rs:72-78 | crates/sui-indexer-alt/src/handlers/obj_versions.rs:58-64 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
  • Duplicated block (7 lines × 3) crates/sui-indexer-alt-graphql/src/api/scalars/base64.rs:16 — crates/sui-indexer-alt-graphql/src/api/scalars/base64.rs:16-22 | crates/sui-indexer-alt-graphql/src/api/scalars/big_int.rs:22-28 | crates/sui-indexer-alt-graphql/src/api/scalars/date_time.rs:30-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 all 3 call sites, so a change lands once.
  • Duplicated block (7 lines × 3) crates/sui-types/src/rpc_proto_conversions.rs:289 — crates/sui-types/src/rpc_proto_conversions.rs:289-295 | crates/sui-types/src/rpc_proto_conversions.rs:448-454 | crates/sui-types/src/rpc_proto_conversions.rs:595-601 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (7 lines × 3) crates/sui-rpc-api/src/ledger_history/filter.rs:350 — crates/sui-rpc-api/src/ledger_history/filter.rs:350-356 | crates/sui-rpc-api/src/ledger_history/filter.rs:368-374 | crates/sui-rpc-api/src/ledger_history/filter.rs:390-396 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (7 lines × 3) crates/sui-json-rpc-types/src/sui_transaction.rs:1207 — crates/sui-json-rpc-types/src/sui_transaction.rs:1207-1213 | crates/sui-json-rpc-types/src/sui_transaction.rs:1294-1300 | crates/sui-json-rpc-types/src/sui_transaction.rs:1682-1688 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (7 lines × 3) sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs:583 — sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs:583-589 | sui-execution/historical-versions/v1/sui-move-natives/src/test_scenario.rs:578-584 | sui-execution/historical-versions/v2/sui-move-natives/src/test_scenario.rs:580-586 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/test_scenario.rs` as WHOLE FILES: this scan already matched 35 separate duplicated blocks between them, totalling at least 619 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.
D3 · God Classes · TooManyFields · ×19
  • TooManyFields: ProtocolConfig crates/sui-protocol-config/src/lib.rs:1512 — TooManyFields — 378 stored fields beside 60 methods. The bar is 30 stored fields; this is 348 over it, 12.60× 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: FeatureFlags crates/sui-protocol-config/src/lib.rs:516 — TooManyFields — 197 stored fields. The bar is 30 stored fields; this is 167 over it, 6.57× 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: NodeMetrics consensus/core/src/metrics.rs:126 — TooManyFields — 135 stored fields beside 1 method. The bar is 30 stored fields; this is 105 over it, 4.50× 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: AuthorityMetrics crates/sui-core/src/authority.rs:257 — TooManyFields — 72 stored fields beside 2 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: NativesCostTable sui-execution/latest/sui-move-natives/src/lib.rs:111 — TooManyFields — 62 stored fields beside 1 method. The bar is 30 stored fields; this is 32 over it, 2.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: NodeConfig crates/sui-config/src/node.rs:61 — TooManyFields — 54 stored fields beside 18 methods. The bar is 30 stored fields; this is 24 over it, 1.80× 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: IndexerMetrics crates/sui-indexer-alt-framework/src/metrics.rs:129 — TooManyFields — 53 stored fields beside 2 methods. The bar is 30 stored fields; this is 23 over it, 1.77× 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: NativesCostTable sui-execution/historical-versions/v3/sui-move-natives/src/lib.rs:98 — TooManyFields — 53 stored fields beside 1 method. The bar is 30 stored fields; this is 23 over it, 1.77× 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: TransactionRow crates/sui-analytics-indexer/src/tables.rs:39 — TooManyFields — 46 stored fields. The bar is 30 stored fields; this is 16 over it, 1.53× 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: GroupOpsCostParams sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs:87 — TooManyFields — 45 stored fields. The bar is 30 stored fields; this is 15 over it, 1.50× 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: GroupOpsCostParams sui-execution/latest/sui-move-natives/src/crypto/group_ops.rs:90 — TooManyFields — 45 stored fields. The bar is 30 stored fields; this is 15 over it, 1.50× 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: AuthorityPerEpochStore crates/sui-core/src/authority/authority_per_epoch_store.rs:312 — TooManyFields — 42 stored fields beside 148 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: NativesCostTable sui-execution/historical-versions/v2/sui-move-natives/src/lib.rs:78 — TooManyFields — 39 stored fields beside 1 method. The bar is 30 stored fields; this is 9 over it, 1.30× 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: SuiValidatorSummary crates/sui-types/src/sui_system_state/sui_system_state_summary.rs:238 — TooManyFields — 39 stored fields. The bar is 30 stored fields; this is 9 over it, 1.30× 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: SuiSystemStateSummary crates/sui-types/src/sui_system_state/sui_system_state_summary.rs:31 — TooManyFields — 37 stored fields beside 2 methods. The bar is 30 stored fields; this is 7 over it, 1.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: NativesCostTable sui-execution/historical-versions/v1/sui-move-natives/src/lib.rs:74 — TooManyFields — 37 stored fields beside 1 method. The bar is 30 stored fields; this is 7 over it, 1.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: BridgeMetrics crates/sui-bridge/src/metrics.rs:19 — TooManyFields — 36 stored fields beside 2 methods. 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: EpochMetrics crates/sui-core/src/epoch/epoch_metrics.rs:11 — TooManyFields — 34 stored fields beside 1 method. The bar is 30 stored fields; this is 4 over it, 1.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: NativesCostTable sui-execution/historical-versions/v0/sui-move-natives/src/lib.rs:63 — TooManyFields — 34 stored fields beside 1 method. The bar is 30 stored fields; this is 4 over it, 1.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.
D30 · Dependency Vulnerabilities · Medium advisory (unsound) · ×19
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D35 · Change Coupling · Change coupling · ×19
  • Change coupling: mem_store.rs ↔ rocksdb_store.rs consensus/core/src/storage/mem_store.rs:1 — `consensus/core/src/storage/mem_store.rs` and `consensus/core/src/storage/rocksdb_store.rs` change together 86% of the time (12 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 12 shared commits counted here, the most recent 3 are `d3a41ea2` [consensus] fail over to block sync when commit sync makes no progres…; `101d3b79` fix(consensus): handle VecDeque wraparound in scan_last_blocks_by_aut…; `bb47ac89` [consensus] only wait to replay until highest consumer processed comm… — run `git show` on any of them.
  • Change coupling: observer.rs ↔ observer_subscriber.rs consensus/core/src/network/observer.rs:1 — `consensus/core/src/network/observer.rs` and `consensus/core/src/observer_subscriber.rs` change together 80% of the time (8 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — 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 `b1ea8c05` [Block Streaming] filter blocks by authority (#27864); `c58c61ad` [consensus] finish tasks and propagate panics during authority shutdo…; `1a7258f2` [consensus] fix block publish/subscribe issues (#27057) — run `git show` on any of them.
  • Change coupling: translate.rs ↔ move_functions.rs sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/translate.rs:1 — `sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/translate.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/verify/move_functions.rs` change together 70% of the time (7 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — 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 7 shared commits counted here, the most recent 3 are `33ed140e` [static ptb] Automatically drop unused Results (#22934); `29a2aa06` [static ptb] Refactor Pure values into separate locals (#22719); `90181b7e` [static ptb] Add freeze operation (#22692) — run `git show` on any of them.
  • Change coupling: observer_service.rs ↔ observer_subscriber.rs consensus/core/src/observer_service.rs:1 — `consensus/core/src/observer_service.rs` and `consensus/core/src/observer_subscriber.rs` change together 70% of the time (7 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `b1ea8c05` [Block Streaming] filter blocks by authority (#27864); `1a7258f2` [consensus] fix block publish/subscribe issues (#27057); `9a52149a` [Block Streaming] broadcast randomness round signatures from Observer… — run `git show` on any of them.
  • Change coupling: naive_scheduler.rs ↔ mock_funds_read.rs crates/sui-core/src/execution_scheduler/funds_withdraw_scheduler/address_funds/naive_scheduler.rs:1 — `crates/sui-core/src/execution_scheduler/funds_withdraw_scheduler/address_funds/naive_scheduler.rs` and `crates/sui-core/src/execution_scheduler/funds_withdraw_scheduler/mock_funds_read.rs` change together 67% of the time (10 of the 15 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — 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 `8c1a5dbc` Split latest account amount reads (#26908); `79adab87` Make funds withdraw schedulers return more precise results (#24953); `84ae728b` Do not depend on old accumulator objects (#24721) — run `git show` on any of them.
  • Change coupling: effects_certifier.rs ↔ transaction_submitter.rs crates/sui-core/src/transaction_driver/effects_certifier.rs:1 — `crates/sui-core/src/transaction_driver/effects_certifier.rs` and `crates/sui-core/src/transaction_driver/transaction_submitter.rs` change together 62% of the time (10 of the 16 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 10 shared commits counted here, the most recent 3 are `c5b2bb36` Submit proposer-restricted transactions only to their allowed propose…; `26c1a99b` [MFP] add the block list for tx submission for transaction driver (#2…; `23904861` [MFP] add the ping label on the client monitor metrics (#23852) — run `git show` on any of them.
  • Change coupling: rpc_proto_conversions.rs ↔ sui_sdk_types_conversions.rs crates/sui-types/src/rpc_proto_conversions.rs:1 — `crates/sui-types/src/rpc_proto_conversions.rs` and `crates/sui-types/src/sui_sdk_types_conversions.rs` change together 61% of the time (20 of the 33 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 20 shared commits counted here, the most recent 3 are `719fb296` [feat] Add ML-DSA-65 to the gRPC and GraphQL APIs (#28257); `b368eb85` [feat] ML-DSA-65 account signature scheme (flag 0x07), devnet only (#…; `1e73ae92` Populate allowed proposers from the transaction driver in simulate (#… — run `git show` on any of them.
  • Change coupling: reader.rs ↔ worker_pool.rs crates/sui-data-ingestion-core/src/reader.rs:1 — `crates/sui-data-ingestion-core/src/reader.rs` and `crates/sui-data-ingestion-core/src/worker_pool.rs` change together 60% of the time (9 of the 15 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `384238af` Make max checkpoints configurable; `cf1cc2fe` ingestion: reduce memory footprint by wrapping checkpoints in Arcs; `646d0c4c` migrate indexer writer to data ingestion framework (#16680) — run `git show` on any of them.
  • Change coupling: authority_node.rs ↔ error.rs consensus/core/src/authority_node.rs:1 — `consensus/core/src/authority_node.rs` and `consensus/core/src/error.rs` change together 59% of the time (17 of the 29 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 17 shared commits counted here, the most recent 3 are `9aa45554` [Block Streaming] introduce the BlockSyncService and implement the Ob…; `11d6cee4` [Block Streaming] Introduce the PeersPool & Refactor synchornizer (#2…; `95dbf635` [consensus] improve synchronizer batching (#21610) — run `git show` on any of them.
  • Change coupling: filter.rs ↔ filter.rs crates/sui-indexer-alt-graphql/src/api/types/event/filter.rs:1 — `crates/sui-indexer-alt-graphql/src/api/types/event/filter.rs` and `crates/sui-indexer-alt-graphql/src/api/types/transaction/filter.rs` change together 58% of the time (7 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — 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 7 shared commits counted here, the most recent 3 are `42112ebf` Revert "graphql-alt: scan apis (#24900)"; `97e246f6` graphql-alt: scan apis (#24900); `1d4482e5` graphql-alt: join bounds query with filter query (#23563) — run `git show` on any of them.
  • Change coupling: authority_test_utils.rs ↔ test_utils.rs crates/sui-core/src/authority/authority_test_utils.rs:1 — `crates/sui-core/src/authority/authority_test_utils.rs` and `crates/sui-core/src/test_utils.rs` change together 56% of the time (15 of the 27 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — 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 15 shared commits counted here, the most recent 3 are `77e74b01` Do not panic when missing effects; `032dae37` Add ExecutionOutput; `388066e9` Use FullObjectRef everywhere for transfers (#22924) — run `git show` on any of them.
  • Change coupling: authority_per_epoch_store.rs ↔ authority_test_utils.rs crates/sui-core/src/authority/authority_per_epoch_store.rs:1 — `crates/sui-core/src/authority/authority_per_epoch_store.rs` and `crates/sui-core/src/authority/authority_test_utils.rs` change together 55% of the time (21 of the 38 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 21 shared commits counted here, the most recent 3 are `f0699cb9` Schedule execution in causal order to prevent blocking deadlocks (#27…; `80ad90e3` settle early in consensus handler (#25530); `6fed5401` Remove all congestion control modes other than `ExecutionTimeEstimate… — run `git show` on any of them.
  • Change coupling: scheduler.rs ↔ mock_funds_read.rs crates/sui-core/src/execution_scheduler/funds_withdraw_scheduler/address_funds/scheduler.rs:1 — `crates/sui-core/src/execution_scheduler/funds_withdraw_scheduler/address_funds/scheduler.rs` and `crates/sui-core/src/execution_scheduler/funds_withdraw_scheduler/mock_funds_read.rs` change together 53% of the time (8 of the 15 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — 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 `79adab87` Make funds withdraw schedulers return more precise results (#24953); `84ae728b` Do not depend on old accumulator objects (#24721); `305a4e3f` Check for available balances at voting time (#24269) (at that commit the files were still `crates/sui-core/src/execution_scheduler/balance_withdraw_scheduler/scheduler.rs` and `crates/sui-core/src/execution_scheduler/balance_withdraw_scheduler/mock_balance_read.rs`) — run `git show` on any of them.
  • Change coupling: scope.rs ↔ checkpoint_stream_task.rs crates/sui-indexer-alt-graphql/src/scope.rs:1 — `crates/sui-indexer-alt-graphql/src/scope.rs` and `crates/sui-indexer-alt-graphql/src/task/streaming/checkpoint_stream_task.rs` change together 50% of the time (8 of the 16 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — 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 `09ecee0d` Un-gate GraphQL subscriptions from the staging feature (#27942); `760c9019` [graphql-stream] Resumable transactions subscription [15/n] (#27140); `2cc1b040` [graphql-stream] Add Address.asTransactionObject [12/n] (#26495) — run `git show` on any of them.
  • Change coupling: authority.rs ↔ scheduler.rs crates/sui-core/src/authority.rs:1 — `crates/sui-core/src/authority.rs` and `crates/sui-core/src/execution_scheduler/funds_withdraw_scheduler/address_funds/scheduler.rs` change together 50% of the time (8 of the 16 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — 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 `b4bece70` Add metrics for funds scheduler; `6f8be71b` Add address funds scheduler config; `84ae728b` Do not depend on old accumulator objects (#24721) — run `git show` on any of them.
  • Change coupling: translate.rs ↔ input_arguments.rs sui-execution/latest/sui-adapter/src/static_programmable_transactions/loading/translate.rs:1 — `sui-execution/latest/sui-adapter/src/static_programmable_transactions/loading/translate.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/verify/input_arguments.rs` change together 50% of the time (7 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — 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 7 shared commits counted here, the most recent 3 are `d627bec2` [adapter][hardening] Add additional hardening and linkage consistency…; `7d6d5649` Improve `ExecutionTiming` for transactions with generated commands (#…; `c5990320` [sui-exploration] Unify address payment and gas smashing logic (#25728) — run `git show` on any of them.
  • Change coupling: objects.rs ↔ transactions.rs crates/sui-indexer-alt-reader/src/objects.rs:1 — `crates/sui-indexer-alt-reader/src/objects.rs` and `crates/sui-indexer-alt-reader/src/transactions.rs` change together 50% of the time (7 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `601f5afa` sui-indexer-alt-reader: drop Postgres KV fallback for ledger gRPC (#2…; `d163ed4f` sui-indexer-alt-reader: Remove direct Bigtable access (#27557); `7f0def55` sui-indexer-alt-reader: make LedgerGrpcReader's batch-chunking size c… — run `git show` on any of them.
  • Change coupling: logging.rs ↔ authority.rs crates/mysten-common/src/logging.rs:1 — `crates/mysten-common/src/logging.rs` and `crates/sui-core/src/authority.rs` change together 50% of the time (7 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — 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 7 shared commits counted here, the most recent 3 are `7a34409c` [antithesis] gate reachability assertions on protocol config (#27971); `9ae15a17` Run each simulation in its own process; make simulator test state pro…; `43cd04db` Do not emit invariant violation when randomness update execution lags… — run `git show` on any of them.
  • Change coupling: consensus_handler.rs ↔ mock_consensus.rs crates/sui-core/src/consensus_handler.rs:1 — `crates/sui-core/src/consensus_handler.rs` and `crates/sui-core/src/mock_consensus.rs` change together 50% of the time (7 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `1976f894` Delete old consensus handler (#24107); `4350ba1a` Remove deprecated TransactionManager and simplify ExecutionScheduler …; `357dbe6e` Rename contains_shared_object to is_consensus_tx (#22492) — run `git show` on any of them.
D4 · Code Duplication · Duplicated block (12 lines × 3) · ×19
  • Duplicated block (12 lines × 3) crates/simulacrum/src/lib.rs:701 — crates/simulacrum/src/lib.rs:701-712 | crates/sui-core/src/checkpoints/checkpoint_executor/data_ingestion_handler.rs:53-64 | crates/sui-indexer-alt-e2e-tests/src/lib.rs:884-895 — 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 (12 lines × 3) crates/simulacrum/src/store/in_mem_store.rs:273 — crates/simulacrum/src/store/in_mem_store.rs:273-284 | crates/sui-transactional-test-runner/src/simulator_persisted_store.rs:445-456 | crates/sui-types/src/in_memory_storage.rs:78-89 — before extracting anything, compare `crates/simulacrum/src/store/in_mem_store.rs` and `crates/sui-transactional-test-runner/src/simulator_persisted_store.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 59 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 3) crates/sui-benchmark/src/workloads/randomized_transaction.rs:608 — crates/sui-benchmark/src/workloads/randomized_transaction.rs:608-619 | crates/sui-benchmark/src/workloads/shared_counter.rs:242-253 | crates/sui-benchmark/src/workloads/shared_object_deletion.rs:272-283 — before extracting anything, compare `crates/sui-benchmark/src/workloads/shared_counter.rs` and `crates/sui-benchmark/src/workloads/shared_object_deletion.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 66 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 3) crates/sui-rosetta/src/types/internal_operation/consolidate_to_fungible.rs:127 — crates/sui-rosetta/src/types/internal_operation/consolidate_to_fungible.rs:127-139 | crates/sui-rosetta/src/types/internal_operation/consolidate_to_fungible.rs:173-185 | crates/sui-rosetta/src/types/internal_operation/merge_and_redeem.rs:235-246 — before extracting anything, compare `crates/sui-rosetta/src/types/internal_operation/consolidate_to_fungible.rs` and `crates/sui-rosetta/src/types/internal_operation/merge_and_redeem.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 45 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 3) crates/sui-rosetta/src/types/internal_operation/pay_coin.rs:81 — crates/sui-rosetta/src/types/internal_operation/pay_coin.rs:81-92 | crates/sui-rosetta/src/types/internal_operation/pay_sui.rs:83-94 | crates/sui-rosetta/src/types/internal_operation/stake.rs:89-100 — before extracting anything, compare `crates/sui-rosetta/src/types/internal_operation/pay_coin.rs` and `crates/sui-rosetta/src/types/internal_operation/pay_sui.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 117 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 3) crates/sui/src/upgrade_compatibility/mod.rs:1820 — crates/sui/src/upgrade_compatibility/mod.rs:1820-1831 | crates/sui/src/upgrade_compatibility/mod.rs:1952-1963 | crates/sui/src/upgrade_compatibility/mod.rs:2022-2035 — 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 (12 lines × 3) sui-execution/historical-versions/v0/sui-adapter/src/temporary_store.rs:265 — sui-execution/historical-versions/v0/sui-adapter/src/temporary_store.rs:265-276 | sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs:216-227 | sui-execution/historical-versions/v2/sui-adapter/src/temporary_store.rs:234-245 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/temporary_store.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 195 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 3) sui-execution/historical-versions/v0/sui-move-natives/src/event.rs:93 — sui-execution/historical-versions/v0/sui-move-natives/src/event.rs:93-104 | sui-execution/historical-versions/v1/sui-move-natives/src/event.rs:109-120 | sui-execution/historical-versions/v2/sui-move-natives/src/event.rs:112-123 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/event.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/event.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 70 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 3) sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/trace_utils.rs:321 — sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/trace_utils.rs:321-332 | sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/trace_utils.rs:302-313 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/trace_utils.rs:300-311 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/trace_utils.rs` and `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/trace_utils.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 105 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 3) sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/trace_utils.rs:339 — sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/trace_utils.rs:339-350 | sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/trace_utils.rs:320-331 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/trace_utils.rs:318-329 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/trace_utils.rs` and `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/trace_utils.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 105 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 3) crates/sui-checkpoint-blob-indexer/src/config.rs:157 — crates/sui-checkpoint-blob-indexer/src/config.rs:157-168 | crates/sui-indexer-alt-consistent-store/src/config.rs:166-177 | crates/sui-kvstore/src/config.rs:368-379 — before extracting anything, compare `crates/sui-checkpoint-blob-indexer/src/config.rs` and `crates/sui-kvstore/src/config.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 70 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 3) sui-execution/historical-versions/v0/sui-adapter/src/gas_meter.rs:238 — sui-execution/historical-versions/v0/sui-adapter/src/gas_meter.rs:238-249 | sui-execution/historical-versions/v1/sui-adapter/src/gas_meter.rs:238-249 | sui-execution/historical-versions/v2/sui-adapter/src/gas_meter.rs:238-249 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/gas_meter.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/gas_meter.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 155 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 3) sui-execution/historical-versions/v0/sui-adapter/src/gas_meter.rs:255 — sui-execution/historical-versions/v0/sui-adapter/src/gas_meter.rs:255-266 | sui-execution/historical-versions/v1/sui-adapter/src/gas_meter.rs:255-266 | sui-execution/historical-versions/v2/sui-adapter/src/gas_meter.rs:255-266 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/gas_meter.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/gas_meter.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 155 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 3) sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:905 — sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:905-916 | sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs:962-973 | sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/context.rs:1274-1285 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs` and `sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs` as WHOLE FILES: this scan already matched 61 separate duplicated blocks between them, totalling at least 1074 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 3) sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs:1012 — sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs:1012-1023 | sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.rs:1199-1210 | sui-execution/latest/sui-adapter/src/execution_engine.rs:2197-2208 — before extracting anything, compare `sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs` and `sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.rs` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 603 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 3) sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs:1135 — sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs:1135-1146 | sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.rs:1405-1416 | sui-execution/latest/sui-adapter/src/execution_engine.rs:2403-2414 — before extracting anything, compare `sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs` and `sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.rs` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 603 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 3) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs:731 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs:731-742 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs:919-930 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs:1689-1700 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs` as WHOLE FILES: this scan already matched 35 separate duplicated blocks between them, totalling at least 484 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 3) sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs:320 — sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs:320-331 | sui-execution/historical-versions/v1/sui-move-natives/src/test_scenario.rs:315-326 | sui-execution/historical-versions/v2/sui-move-natives/src/test_scenario.rs:317-328 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/test_scenario.rs` as WHOLE FILES: this scan already matched 35 separate duplicated blocks between them, totalling at least 619 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 3) sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs:562 — sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs:562-573 | sui-execution/historical-versions/v1/sui-move-natives/src/test_scenario.rs:557-568 | sui-execution/historical-versions/v2/sui-move-natives/src/test_scenario.rs:559-570 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/test_scenario.rs` as WHOLE FILES: this scan already matched 35 separate duplicated blocks between them, totalling at least 619 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (20 lines × 2) · ×17
  • Duplicated block (20 lines × 2) crates/sui-bridge-cli/src/main.rs:314 — crates/sui-bridge-cli/src/main.rs:314-333 | crates/sui-bridge-cli/src/main.rs:395-414 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (20 lines × 2) crates/sui-core/src/authority/authority_store_pruner.rs:981 — crates/sui-core/src/authority/authority_store_pruner.rs:981-1000 | crates/sui-core/src/authority/authority_store_pruner.rs:1056-1075 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (20 lines × 2) crates/sui-indexer-alt-consistent-store/src/rpc/pagination.rs:208 — crates/sui-indexer-alt-consistent-store/src/rpc/pagination.rs:208-227 | crates/sui-indexer-alt-consistent-store/src/rpc/pagination.rs:282-301 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (20 lines × 2) sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/context.rs:718 — sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/context.rs:718-737 | sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/context.rs:749-768 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (20 lines × 2) sui-execution/historical-versions/v0/sui-verifier/src/private_generics.rs:47 — sui-execution/historical-versions/v0/sui-verifier/src/private_generics.rs:47-66 | sui-execution/historical-versions/v1/sui-verifier/src/private_generics.rs:49-68 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-verifier/src/private_generics.rs` and `sui-execution/historical-versions/v1/sui-verifier/src/private_generics.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 144 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 (20 lines × 2) sui-execution/historical-versions/v1/sui-move-natives/src/event.rs:99 — sui-execution/historical-versions/v1/sui-move-natives/src/event.rs:99-118 | sui-execution/historical-versions/v2/sui-move-natives/src/event.rs:102-121 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-move-natives/src/event.rs` and `sui-execution/historical-versions/v2/sui-move-natives/src/event.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 124 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 (20 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.rs:1442 — sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.rs:1442-1461 | sui-execution/latest/sui-adapter/src/execution_engine.rs:2421-2440 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.rs` and `sui-execution/latest/sui-adapter/src/execution_engine.rs` as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 689 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 (20 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs:270 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs:270-289 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs:1200-1219 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs` as WHOLE FILES: this scan already matched 35 separate duplicated blocks between them, totalling at least 484 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 (20 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs:638 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs:638-657 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs:1588-1607 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs` as WHOLE FILES: this scan already matched 35 separate duplicated blocks between them, totalling at least 484 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 (20 lines × 2) sui-execution/historical-versions/v3/sui-move-natives/src/object.rs:61 — sui-execution/historical-versions/v3/sui-move-natives/src/object.rs:61-80 | sui-execution/latest/sui-move-natives/src/object.rs:64-83 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-move-natives/src/object.rs` and `sui-execution/latest/sui-move-natives/src/object.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 55 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (20 lines × 2) sui-execution/historical-versions/v3/sui-move-natives/src/object.rs:96 — sui-execution/historical-versions/v3/sui-move-natives/src/object.rs:96-115 | sui-execution/latest/sui-move-natives/src/object.rs:100-119 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-move-natives/src/object.rs` and `sui-execution/latest/sui-move-natives/src/object.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 55 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (20 lines × 2) sui-execution/historical-versions/v3/sui-move-natives/src/object_runtime/mod.rs:386 — sui-execution/historical-versions/v3/sui-move-natives/src/object_runtime/mod.rs:386-405 | sui-execution/latest/sui-move-natives/src/object_runtime/mod.rs:551-570 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-move-natives/src/object_runtime/mod.rs` and `sui-execution/latest/sui-move-natives/src/object_runtime/mod.rs` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 491 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 (20 lines × 2) sui-execution/historical-versions/v3/sui-move-natives/src/object_runtime/mod.rs:532 — sui-execution/historical-versions/v3/sui-move-natives/src/object_runtime/mod.rs:532-551 | sui-execution/latest/sui-move-natives/src/object_runtime/mod.rs:726-745 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-move-natives/src/object_runtime/mod.rs` and `sui-execution/latest/sui-move-natives/src/object_runtime/mod.rs` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 491 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 (20 lines × 2) sui-execution/historical-versions/v3/sui-verifier/src/entry_points_verifier.rs:52 — sui-execution/historical-versions/v3/sui-verifier/src/entry_points_verifier.rs:52-71 | sui-execution/latest/sui-verifier/src/entry_points_verifier.rs:52-71 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-verifier/src/entry_points_verifier.rs` and `sui-execution/latest/sui-verifier/src/entry_points_verifier.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 204 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 (20 lines × 2) sui-execution/historical-versions/v3/sui-verifier/src/private_generics_verifier_v2.rs:291 — sui-execution/historical-versions/v3/sui-verifier/src/private_generics_verifier_v2.rs:291-310 | sui-execution/latest/sui-verifier/src/private_generics_verifier_v2.rs:292-311 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-verifier/src/private_generics_verifier_v2.rs` and `sui-execution/latest/sui-verifier/src/private_generics_verifier_v2.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 169 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 (20 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/values.rs:359 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/values.rs:359-378 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/values.rs:412-431 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/values.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/values.rs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 118 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 (20 lines × 2) sui-execution/historical-versions/v3/sui-move-natives/src/crypto/hash.rs:115 — sui-execution/historical-versions/v3/sui-move-natives/src/crypto/hash.rs:115-134 | sui-execution/latest/sui-move-natives/src/crypto/hash.rs:117-136 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-move-natives/src/crypto/hash.rs` and `sui-execution/latest/sui-move-natives/src/crypto/hash.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 51 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (9 lines × 3) · ×17
  • Duplicated block (9 lines × 3) crates/sui-kv-rpc/src/v2/get_checkpoint.rs:31 — crates/sui-kv-rpc/src/v2/get_checkpoint.rs:31-39 | crates/sui-kv-rpc/src/v2/list_checkpoints.rs:107-115 | crates/sui-rpc-api/src/grpc/v2/ledger_service/get_checkpoint.rs:29-37 — 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) crates/sui-rpc-store/src/schema/object_version_by_checkpoint.rs:81 — crates/sui-rpc-store/src/schema/object_version_by_checkpoint.rs:81-89 | crates/sui-rpc-store/src/schema/objects.rs:59-67 | crates/sui-rpc-store/src/schema/package_versions.rs:52-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 all 3 call sites, so a change lands once.
  • Duplicated block (9 lines × 3) sui-execution/historical-versions/v0/sui-adapter/src/adapter.rs:43 — sui-execution/historical-versions/v0/sui-adapter/src/adapter.rs:43-51 | sui-execution/historical-versions/v1/sui-adapter/src/adapter.rs:43-51 | sui-execution/historical-versions/v2/sui-adapter/src/adapter.rs:42-50 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/adapter.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/adapter.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 100 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 3) sui-execution/historical-versions/v0/sui-move-natives/src/object_runtime/mod.rs:478 — sui-execution/historical-versions/v0/sui-move-natives/src/object_runtime/mod.rs:478-486 | sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/mod.rs:548-556 | sui-execution/historical-versions/v2/sui-move-natives/src/object_runtime/mod.rs:516-524 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/object_runtime/mod.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/mod.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 208 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 3) REDACTED:609 — REDACTED:609-617 | REDACTED:615-623 | REDACTED:794-802 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 77 separate duplicated blocks between them, totalling at least 1502 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 3) REDACTED:835 — REDACTED:835-843 | REDACTED:841-853 | REDACTED:1065-1077 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 77 separate duplicated blocks between them, totalling at least 1502 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 3) sui-execution/historical-versions/v2/sui-move-natives/src/crypto/poseidon.rs:104 — sui-execution/historical-versions/v2/sui-move-natives/src/crypto/poseidon.rs:104-112 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/poseidon.rs:107-115 | sui-execution/latest/sui-move-natives/src/crypto/poseidon.rs:108-116 — before extracting anything, compare `sui-execution/historical-versions/v2/sui-move-natives/src/crypto/poseidon.rs` and `sui-execution/historical-versions/v3/sui-move-natives/src/crypto/poseidon.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 47 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 3) crates/sui-benchmark/src/workloads/adversarial.rs:362 — crates/sui-benchmark/src/workloads/adversarial.rs:362-370 | crates/sui-benchmark/src/workloads/party.rs:151-159 | crates/sui-benchmark/src/workloads/slow.rs:113-121 — before extracting anything, compare `crates/sui-benchmark/src/workloads/adversarial.rs` and `crates/sui-benchmark/src/workloads/party.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. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 3) crates/sui-indexer-alt-consistent-store/src/config.rs:203 — crates/sui-indexer-alt-consistent-store/src/config.rs:203-211 | crates/sui-indexer-alt/src/config.rs:569-577 | crates/sui-rpc-store/src/config.rs:399-407 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
  • Duplicated block (9 lines × 3) sui-execution/historical-versions/v0/sui-adapter/src/gas_charger.rs:65 — sui-execution/historical-versions/v0/sui-adapter/src/gas_charger.rs:65-73 | sui-execution/historical-versions/v1/sui-adapter/src/gas_charger.rs:66-74 | sui-execution/historical-versions/v2/sui-adapter/src/gas_charger.rs:66-74 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/gas_charger.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/gas_charger.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 114 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 3) sui-execution/historical-versions/v0/sui-move-natives/src/object_runtime/object_store.rs:269 — sui-execution/historical-versions/v0/sui-move-natives/src/object_runtime/object_store.rs:269-277 | sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/object_store.rs:407-415 | sui-execution/historical-versions/v2/sui-move-natives/src/object_runtime/object_store.rs:420-428 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/object_runtime/object_store.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/object_store.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 237 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 3) sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:889 — sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:889-897 | sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs:946-954 | sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/context.rs:1258-1266 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs` and `sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs` as WHOLE FILES: this scan already matched 61 separate duplicated blocks between them, totalling at least 1074 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 3) sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:1377 — sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:1377-1385 | sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs:1434-1442 | sui-execution/historical-versions/v3/sui-adapter/src/data_store/legacy/sui_data_store.rs:36-44 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs` and `sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs` as WHOLE FILES: this scan already matched 61 separate duplicated blocks between them, totalling at least 1074 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 3) sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:1406 — sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:1406-1414 | sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs:1463-1471 | sui-execution/historical-versions/v3/sui-adapter/src/data_store/legacy/sui_data_store.rs:68-76 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs` and `sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs` as WHOLE FILES: this scan already matched 61 separate duplicated blocks between them, totalling at least 1074 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 3) crates/sui-benchmark/src/workloads/composite/operations.rs:377 — crates/sui-benchmark/src/workloads/composite/operations.rs:377-385 | crates/sui-benchmark/src/workloads/composite/operations.rs:526-536 | crates/sui-benchmark/src/workloads/composite/operations.rs:1039-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.
  • Duplicated block (9 lines × 3) crates/sui-config/src/node.rs:724 — crates/sui-config/src/node.rs:724-732 | crates/sui-config/src/node.rs:823-832 | crates/sui-config/src/node.rs:836-845 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (9 lines × 3) sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs:639 — sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs:639-647 | sui-execution/historical-versions/v1/sui-move-natives/src/test_scenario.rs:634-642 | sui-execution/historical-versions/v2/sui-move-natives/src/test_scenario.rs:636-644 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/test_scenario.rs` as WHOLE FILES: this scan already matched 35 separate duplicated blocks between them, totalling at least 619 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (6 lines × 3) · ×17
  • Duplicated block (6 lines × 3) crates/sui-bridge/src/utils.rs:413 — crates/sui-bridge/src/utils.rs:413-418 | crates/sui-bridge/src/utils.rs:422-427 | crates/sui-bridge/src/utils.rs:430-435 — 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) crates/sui-types/src/rpc_proto_conversions.rs:3202 — crates/sui-types/src/rpc_proto_conversions.rs:3202-3207 | crates/sui-types/src/rpc_proto_conversions.rs:3214-3219 | crates/sui-types/src/rpc_proto_conversions.rs:3226-3231 — 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) sui-execution/historical-versions/v0/sui-adapter/src/execution_value.rs:164 — sui-execution/historical-versions/v0/sui-adapter/src/execution_value.rs:164-169 | sui-execution/historical-versions/v1/sui-adapter/src/execution_value.rs:164-169 | sui-execution/historical-versions/v2/sui-adapter/src/execution_value.rs:164-169 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/execution_value.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/execution_value.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 64 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 3) sui-execution/historical-versions/v2/sui-adapter/src/temporary_store.rs:439 — sui-execution/historical-versions/v2/sui-adapter/src/temporary_store.rs:439-444 | sui-execution/historical-versions/v3/sui-adapter/src/temporary_store.rs:407-412 | sui-execution/latest/sui-adapter/src/temporary_store.rs:655-660 — before extracting anything, compare `sui-execution/historical-versions/v2/sui-adapter/src/temporary_store.rs` and `sui-execution/historical-versions/v3/sui-adapter/src/temporary_store.rs` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 547 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 3) sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs:235 — sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs:235-240 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs:323-328 | sui-execution/latest/sui-move-natives/src/crypto/group_ops.rs:326-331 — before extracting anything, compare `sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs` and `sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 256 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 3) sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs:292 — sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs:292-297 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs:396-401 | sui-execution/latest/sui-move-natives/src/crypto/group_ops.rs:399-404 — before extracting anything, compare `sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs` and `sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 256 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 3) sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs:349 — sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs:349-354 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs:469-474 | sui-execution/latest/sui-move-natives/src/crypto/group_ops.rs:472-477 — before extracting anything, compare `sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs` and `sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 256 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 3) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs:378 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs:378-383 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs:513-518 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs:1324-1329 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs` as WHOLE FILES: this scan already matched 35 separate duplicated blocks between them, totalling at least 484 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 3) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs:406 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs:406-411 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs:541-546 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs:1352-1357 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs` as WHOLE FILES: this scan already matched 35 separate duplicated blocks between them, totalling at least 484 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 3) crates/sui-types/src/rpc_proto_conversions.rs:3161 — crates/sui-types/src/rpc_proto_conversions.rs:3161-3171 | crates/sui-types/src/rpc_proto_conversions.rs:3177-3182 | crates/sui-types/src/rpc_proto_conversions.rs:3190-3195 — 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) crates/sui-keys/src/external.rs:741 — crates/sui-keys/src/external.rs:741-746 | crates/sui-keys/src/keystore.rs:373-378 | crates/sui-keys/src/keystore.rs:679-684 — before extracting anything, compare `crates/sui-keys/src/external.rs` and `crates/sui-keys/src/keystore.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 3) sui-execution/historical-versions/v0/sui-adapter/src/execution_value.rs:210 — sui-execution/historical-versions/v0/sui-adapter/src/execution_value.rs:210-215 | sui-execution/historical-versions/v1/sui-adapter/src/execution_value.rs:210-215 | sui-execution/historical-versions/v2/sui-adapter/src/execution_value.rs:210-215 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/execution_value.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/execution_value.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 64 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 3) sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:1395 — sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:1395-1400 | sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs:1452-1457 | sui-execution/historical-versions/v3/sui-adapter/src/data_store/legacy/sui_data_store.rs:57-62 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs` and `sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs` as WHOLE FILES: this scan already matched 61 separate duplicated blocks between them, totalling at least 1074 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 3) sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs:140 — sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs:140-145 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs:215-220 | sui-execution/latest/sui-move-natives/src/crypto/group_ops.rs:218-223 — before extracting anything, compare `sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs` and `sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 256 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 3) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs:262 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs:262-267 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs:403-408 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs:1192-1197 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs` as WHOLE FILES: this scan already matched 35 separate duplicated blocks between them, totalling at least 484 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 3) crates/sui-indexer-alt-graphql/src/api/types/checkpoint/mod.rs:349 — crates/sui-indexer-alt-graphql/src/api/types/checkpoint/mod.rs:349-354 | crates/sui-indexer-alt-graphql/src/api/types/event/mod.rs:204-209 | crates/sui-indexer-alt-graphql/src/api/types/transaction/mod.rs:345-350 — `crates/sui-indexer-alt-graphql/src/api/types/event/mod.rs` and `crates/sui-indexer-alt-graphql/src/api/types/transaction/mod.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 4 separate duplicated blocks between them, totalling at least 42 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 (6 lines × 3) crates/sui-indexer-alt-graphql/src/api/query.rs:248 — crates/sui-indexer-alt-graphql/src/api/query.rs:248-253 | crates/sui-indexer-alt-graphql/src/api/query.rs:322-327 | crates/sui-indexer-alt-graphql/src/api/query.rs:827-832 — 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.
P7 · Outbound HTTP resilience · Outbound HTTP without resilience · ×17
  • Outbound HTTP without resilience crates/sui-bridge/src/utils.rs:488 — `reqwest::Client::new(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience crates/sui-core/src/traffic_controller/nodefw_client.rs:27 — `reqwest::Client::new(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience crates/sui-light-client/src/graphql.rs:17 — `reqwest::Client::new(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience crates/sui-package-dump/src/client.rs:18 — `reqwest::Client::builder(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience crates/sui-rpc-benchmark/src/bin/pull_grafana_logs.rs:222 — `reqwest::Client::new(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience crates/sui-rpc-benchmark/src/json_rpc/runner.rs:188 — `reqwest::Client::new(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience crates/sui-source-verification/src/binary.rs:227 — `ureq::get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience crates/sui-source-verification/src/binary.rs:234 — `ureq::get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience crates/sui-storage/src/object_store/http/gcs.rs:25 — `ClientBuilder::new()` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience crates/sui-storage/src/object_store/http/s3.rs:25 — `ClientBuilder::new()` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience crates/sui-telemetry/src/lib.rs:78 — `reqwest::get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience crates/sui-telemetry/src/lib.rs:89 — `reqwest::Client::new(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience crates/sui/src/client_commands.rs:3106 — `reqwest::Client::new(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience crates/sui/src/keytool.rs:977 — `reqwest::Client::new(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience crates/sui/src/keytool.rs:1301 — `reqwest::Client::new(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience crates/sui/src/mvr_resolver.rs:51 — `reqwest::Client::new(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience crates/sui/src/zklogin_commands_util.rs:53 — `Client::new()` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
D30 · Dependency Vulnerabilities · Medium advisory (unmaintained) · ×16
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Duplicated block (8 lines × 3) · ×16
  • Duplicated block (8 lines × 3) crates/sui-bridge/src/sui_transaction_builder.rs:369 — crates/sui-bridge/src/sui_transaction_builder.rs:369-376 | crates/sui-bridge/src/sui_transaction_builder.rs:436-443 | crates/sui-bridge/src/sui_transaction_builder.rs:499-506 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (8 lines × 3) crates/sui-indexer-alt-reader/src/object_versions.rs:159 — crates/sui-indexer-alt-reader/src/object_versions.rs:159-166 | crates/sui-indexer-alt-reader/src/object_versions.rs:236-243 | crates/sui-indexer-alt-reader/src/packages.rs:154-161 — before extracting anything, compare `crates/sui-indexer-alt-reader/src/object_versions.rs` and `crates/sui-indexer-alt-reader/src/packages.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 55 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 3) crates/sui-kvstore/src/bigtable/client/mod.rs:344 — crates/sui-kvstore/src/bigtable/client/mod.rs:344-351 | crates/sui-kvstore/src/bigtable/client/mod.rs:376-383 | crates/sui-kvstore/src/bigtable/client/mod.rs:431-438 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (8 lines × 3) crates/sui-transactional-test-runner/src/programmable_transaction_test_parser/printer.rs:121 — crates/sui-transactional-test-runner/src/programmable_transaction_test_parser/printer.rs:121-128 | crates/sui-types/src/type_input.rs:90-97 | crates/sui-types/src/type_input.rs:320-327 — 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 (8 lines × 3) sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/context.rs:446 — sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/context.rs:446-453 | sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:445-452 | sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs:463-470 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/context.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 378 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) sui-execution/historical-versions/v0/sui-adapter/src/type_layout_resolver.rs:52 — sui-execution/historical-versions/v0/sui-adapter/src/type_layout_resolver.rs:52-59 | sui-execution/historical-versions/v1/sui-adapter/src/type_layout_resolver.rs:46-53 | sui-execution/historical-versions/v2/sui-adapter/src/type_layout_resolver.rs:46-53 — 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 (8 lines × 3) sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs:731 — sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs:731-738 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs:880-887 | sui-execution/latest/sui-move-natives/src/crypto/group_ops.rs:882-889 — before extracting anything, compare `sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs` and `sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 256 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) sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/context.rs:421 — sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/context.rs:421-430 | sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/translate.rs:660-667 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/translate.rs:665-672 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/translate.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/translate.rs` as WHOLE FILES: this scan already matched 40 separate duplicated blocks between them, totalling at least 589 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) REDACTED:837 — REDACTED:837-844 | sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/context.rs:1044-1051 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/context.rs:1422-1429 — before extracting anything, compare `REDACTED` and `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/context.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 56 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) crates/sui-checkpoint-blob-indexer/src/handlers/checkpoint_bcs.rs:52 — crates/sui-checkpoint-blob-indexer/src/handlers/checkpoint_bcs.rs:52-59 | crates/sui-checkpoint-blob-indexer/src/handlers/checkpoint_blob.rs:94-101 | crates/sui-checkpoint-blob-indexer/src/handlers/epochs.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 all 3 call sites, so a change lands once.
  • Duplicated block (8 lines × 3) crates/sui-kv-rpc/src/v2/list_checkpoints.rs:655 — crates/sui-kv-rpc/src/v2/list_checkpoints.rs:655-662 | crates/sui-kv-rpc/src/v2/list_events.rs:651-658 | crates/sui-kv-rpc/src/v2/list_transactions.rs:685-692 — before extracting anything, compare `crates/sui-kv-rpc/src/v2/list_checkpoints.rs` and `crates/sui-kv-rpc/src/v2/list_events.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.
  • Duplicated block (8 lines × 3) crates/sui-benchmark/src/workloads/randomized_transaction.rs:128 — crates/sui-benchmark/src/workloads/randomized_transaction.rs:128-135 | crates/sui-benchmark/src/workloads/randomized_transaction.rs:143-151 | crates/sui-benchmark/src/workloads/randomized_transaction.rs:163-170 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (8 lines × 3) crates/sui-bridge/src/sui_transaction_builder.rs:383 — crates/sui-bridge/src/sui_transaction_builder.rs:383-390 | crates/sui-bridge/src/sui_transaction_builder.rs:446-453 | crates/sui-bridge/src/sui_transaction_builder.rs:509-516 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (8 lines × 3) sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs:298 — sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs:298-305 | sui-execution/historical-versions/v1/sui-move-natives/src/test_scenario.rs:293-300 | sui-execution/historical-versions/v2/sui-move-natives/src/test_scenario.rs:295-302 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/test_scenario.rs` as WHOLE FILES: this scan already matched 35 separate duplicated blocks between them, totalling at least 619 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) sui-execution/historical-versions/v3/sui-move-natives/src/test_scenario.rs:389 — sui-execution/historical-versions/v3/sui-move-natives/src/test_scenario.rs:389-396 | sui-execution/historical-versions/v3/sui-move-natives/src/test_scenario.rs:490-497 | sui-execution/historical-versions/v3/sui-move-natives/src/test_scenario.rs:575-582 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (8 lines × 3) sui-execution/latest/sui-move-natives/src/test_scenario.rs:564 — sui-execution/latest/sui-move-natives/src/test_scenario.rs:564-571 | sui-execution/latest/sui-move-natives/src/test_scenario.rs:665-672 | sui-execution/latest/sui-move-natives/src/test_scenario.rs:750-757 — 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.
D2 · Cognitive Complexity · sui_rpc_api · ×15
  • sui_rpc_api::grpc::v2::transaction_execution_service::simulate::simulate_transaction (cognitive 42) crates/sui-rpc-api/src/grpc/v2/transaction_execution_service/simulate/mod.rs:45 — sui_rpc_api::grpc::v2::transaction_execution_service::simulate::simulate_transaction has cognitive complexity 42 (threshold 15). Drivers by points: if/else 16 (26 pts), match/switch 4 (9 pts), boolean chains 7 (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.
  • sui_rpc_api::grpc::v2::ledger_service::list_events::next_event_chunk (cognitive 41) crates/sui-rpc-api/src/grpc/v2/ledger_service/list_events.rs:281 — sui_rpc_api::grpc::v2::ledger_service::list_events::next_event_chunk has cognitive complexity 41 (threshold 15). Drivers by points: if/else 17 (26 pts), boolean chains 10, match/switch 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.
  • sui_rpc_api::grpc::v2::ledger_service::list_transactions::next_transaction_chunk (cognitive 33) crates/sui-rpc-api/src/grpc/v2/ledger_service/list_transactions.rs:279 — sui_rpc_api::grpc::v2::ledger_service::list_transactions::next_transaction_chunk has cognitive complexity 33 (threshold 15). Drivers by points: if/else 9 (18 pts), match/switch 3 (8 pts), boolean chains 6, 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.
  • sui_rpc_api::grpc::v2::ledger_service::list_checkpoints::next_filtered_checkpoint_chunk (cognitive 29) crates/sui-rpc-api/src/grpc/v2/ledger_service/list_checkpoints.rs:513 — sui_rpc_api::grpc::v2::ledger_service::list_checkpoints::next_filtered_checkpoint_chunk has cognitive complexity 29 (threshold 15). Drivers by points: if/else 14 (19 pts), boolean chains 8, loops 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.
  • sui_rpc_api::grpc::v2::ledger_service::get_epoch::get_epoch (cognitive 25) crates/sui-rpc-api/src/grpc/v2/ledger_service/get_epoch.rs:24 — sui_rpc_api::grpc::v2::ledger_service::get_epoch::get_epoch has cognitive complexity 25 (threshold 15). Drivers by points: if/else 17 (21 pts), boolean chains 4 (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.
  • sui_rpc_api::grpc::v2::state_service::list_dynamic_fields::load_dynamic_field (cognitive 24) crates/sui-rpc-api/src/grpc/v2/state_service/list_dynamic_fields.rs:191 — sui_rpc_api::grpc::v2::state_service::list_dynamic_fields::load_dynamic_field has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (19 pts), match/switch 3 (4 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.
  • sui_rpc_api::metrics::grpc_method_paths_from_file_descriptor_sets (cognitive 24) crates/sui-rpc-api/src/metrics.rs:232 — sui_rpc_api::metrics::grpc_method_paths_from_file_descriptor_sets has cognitive complexity 24 (threshold 15). Drivers by points: if/else 4 (14 pts), loops 4 (10 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.
  • sui_rpc_api::grpc::v2::ledger_service::ledger_read::get_tx_seq_digest_rows (cognitive 22) crates/sui-rpc-api/src/grpc/v2/ledger_service/ledger_read.rs:254 — sui_rpc_api::grpc::v2::ledger_service::ledger_read::get_tx_seq_digest_rows has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (18 pts), match/switch 1 (2 pts), boolean chains 1, 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.
  • sui_rpc_api::grpc::v2::ledger_service::get_checkpoint::get_checkpoint (cognitive 20) crates/sui-rpc-api/src/grpc/v2/ledger_service/get_checkpoint.rs:25 — sui_rpc_api::grpc::v2::ledger_service::get_checkpoint::get_checkpoint has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 2, match/switch 1 (nesting depth added 9). 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.
  • sui_rpc_api::grpc::v2::ledger_service::event_scan::push_event_refs_for_row_until_limit (cognitive 19) crates/sui-rpc-api/src/grpc/v2/ledger_service/event_scan.rs:176 — sui_rpc_api::grpc::v2::ledger_service::event_scan::push_event_refs_for_row_until_limit has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 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.
  • sui_rpc_api::grpc::v2::transaction_execution_service::simulate::select_gas (cognitive 19) crates/sui-rpc-api/src/grpc/v2/transaction_execution_service/simulate/mod.rs:639 — sui_rpc_api::grpc::v2::transaction_execution_service::simulate::select_gas has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 2, loops 1 (2 pts), match/switch 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.
  • sui_rpc_api::grpc::v2::ledger_service::bitmap_scan::drain_watermarked_buckets (cognitive 18) crates/sui-rpc-api/src/grpc/v2/ledger_service/bitmap_scan.rs:257 — sui_rpc_api::grpc::v2::ledger_service::bitmap_scan::drain_watermarked_buckets has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (15 pts), 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.
  • sui_rpc_api::grpc::v2::ledger_service::list_checkpoints::next_checkpoint_chunk (cognitive 18) crates/sui-rpc-api/src/grpc/v2/ledger_service/list_checkpoints.rs:281 — sui_rpc_api::grpc::v2::ledger_service::list_checkpoints::next_checkpoint_chunk has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 2, match/switch 1 (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • sui_rpc_api::grpc::v2::ledger_service::list_transactions::render_transaction_rows (cognitive 17) crates/sui-rpc-api/src/grpc/v2/ledger_service/list_transactions.rs:547 — sui_rpc_api::grpc::v2::ledger_service::list_transactions::render_transaction_rows has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (16 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.
  • sui_rpc_api::grpc::v2::transaction_execution_service::simulate::is_gasless_candidate (cognitive 16) crates/sui-rpc-api/src/grpc/v2/transaction_execution_service/simulate/mod.rs:939 — sui_rpc_api::grpc::v2::transaction_execution_service::simulate::is_gasless_candidate has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 pts), match/switch 2 (3 pts), 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.
D4 · Code Duplication · Duplicated block (21 lines × 2) · ×15
  • Duplicated block (21 lines × 2) consensus/core/src/network/metrics.rs:109 — consensus/core/src/network/metrics.rs:109-129 | crates/mysten-network/src/metrics.rs:137-157 — 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 (21 lines × 2) crates/sui-benchmark/src/workloads/shared_counter.rs:149 — crates/sui-benchmark/src/workloads/shared_counter.rs:149-169 | crates/sui-benchmark/src/workloads/shared_object_deletion.rs:183-203 — before extracting anything, compare `crates/sui-benchmark/src/workloads/shared_counter.rs` and `crates/sui-benchmark/src/workloads/shared_object_deletion.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 66 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 (21 lines × 2) crates/sui-data-store/src/gql_queries.rs:261 — crates/sui-data-store/src/gql_queries.rs:261-281 | crates/sui-fork/src/gql/queries.rs:1474-1494 — before extracting anything, compare `crates/sui-data-store/src/gql_queries.rs` and `crates/sui-fork/src/gql/queries.rs` 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 (21 lines × 2) crates/sui-data-store/src/stores/in_memory.rs:219 — crates/sui-data-store/src/stores/in_memory.rs:219-239 | crates/sui-data-store/src/stores/in_memory_lru.rs:158-178 — before extracting anything, compare `crates/sui-data-store/src/stores/in_memory.rs` and `crates/sui-data-store/src/stores/in_memory_lru.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 144 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 (21 lines × 2) sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/mod.rs:612 — sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/mod.rs:612-632 | sui-execution/historical-versions/v2/sui-move-natives/src/object_runtime/mod.rs:580-600 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/mod.rs` and `sui-execution/historical-versions/v2/sui-move-natives/src/object_runtime/mod.rs` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 314 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 (21 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.rs:718 — sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.rs:718-738 | sui-execution/latest/sui-adapter/src/execution_engine.rs:1755-1775 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.rs` and `sui-execution/latest/sui-adapter/src/execution_engine.rs` as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 689 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 (21 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/context.rs:1488 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/context.rs:1488-1508 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/context.rs:2662-2682 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/context.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/context.rs` as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 625 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 (21 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/trace_utils.rs:413 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/trace_utils.rs:413-433 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/trace_utils.rs:403-423 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/trace_utils.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/trace_utils.rs` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 272 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 (21 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/defining_ids_in_types.rs:12 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/defining_ids_in_types.rs:12-32 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/defining_ids_in_types.rs:15-35 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/defining_ids_in_types.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/defining_ids_in_types.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 76 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 (21 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs:436 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs:436-456 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs:1382-1402 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs` as WHOLE FILES: this scan already matched 35 separate duplicated blocks between them, totalling at least 484 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 (21 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs:699 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs:699-719 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs:1657-1677 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs` as WHOLE FILES: this scan already matched 35 separate duplicated blocks between them, totalling at least 484 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 (21 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/translate.rs:1061 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/translate.rs:1061-1081 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/translate.rs:1077-1097 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/translate.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/translate.rs` as WHOLE FILES: this scan already matched 40 separate duplicated blocks between them, totalling at least 589 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 (21 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/temporary_store.rs:1301 — sui-execution/historical-versions/v3/sui-adapter/src/temporary_store.rs:1301-1321 | sui-execution/latest/sui-adapter/src/temporary_store.rs:1489-1509 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/temporary_store.rs` and `sui-execution/latest/sui-adapter/src/temporary_store.rs` as WHOLE FILES: this scan already matched 32 separate duplicated blocks between them, totalling at least 517 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 (21 lines × 2) sui-execution/historical-versions/v3/sui-move-natives/src/tx_context.rs:71 — sui-execution/historical-versions/v3/sui-move-natives/src/tx_context.rs:71-91 | sui-execution/latest/sui-move-natives/src/tx_context.rs:73-93 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-move-natives/src/tx_context.rs` and `sui-execution/latest/sui-move-natives/src/tx_context.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 258 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 (21 lines × 2) sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs:366 — sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs:366-386 | sui-execution/historical-versions/v1/sui-move-natives/src/test_scenario.rs:361-381 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/test_scenario.rs` as WHOLE FILES: this scan already matched 35 separate duplicated blocks between them, totalling at least 619 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (7 lines × 4) · ×15
  • Duplicated block (7 lines × 4) crates/sui-analytics-indexer/src/handlers/tables/df.rs:141 — crates/sui-analytics-indexer/src/handlers/tables/df.rs:141-147 | crates/sui-analytics-indexer/src/handlers/tables/event.rs:50-56 | crates/sui-analytics-indexer/src/handlers/tables/move_call.rs:36-42 | crates/sui-analytics-indexer/src/handlers/tables/object.rs:248-254 — 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 (7 lines × 4) crates/sui-indexer-alt-reader/src/cp_sequence_numbers.rs:30 — crates/sui-indexer-alt-reader/src/cp_sequence_numbers.rs:30-36 | crates/sui-indexer-alt-reader/src/epochs.rs:43-49 | crates/sui-indexer-alt-reader/src/epochs.rs:70-76 | crates/sui-indexer-alt-reader/src/epochs.rs:132-138 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart.
  • Duplicated block (7 lines × 4) sui-execution/historical-versions/v0/sui-adapter/src/execution_value.rs:153 — sui-execution/historical-versions/v0/sui-adapter/src/execution_value.rs:153-159 | sui-execution/historical-versions/v1/sui-adapter/src/execution_value.rs:153-159 | sui-execution/historical-versions/v2/sui-adapter/src/execution_value.rs:153-159 | sui-execution/historical-versions/v3/sui-adapter/src/execution_value.rs:192-198 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/execution_value.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/execution_value.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 64 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 × 4) sui-execution/historical-versions/v0/sui-adapter/src/gas_meter.rs:56 — sui-execution/historical-versions/v0/sui-adapter/src/gas_meter.rs:56-62 | sui-execution/historical-versions/v1/sui-adapter/src/gas_meter.rs:56-62 | sui-execution/historical-versions/v2/sui-adapter/src/gas_meter.rs:56-62 | sui-execution/historical-versions/v3/sui-adapter/src/gas_meter.rs:58-64 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/gas_meter.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/gas_meter.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 155 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 × 4) REDACTED:229 — REDACTED:229-235 | REDACTED:233-239 | REDACTED:239-245 | REDACTED:364-370 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 54 separate duplicated blocks between them, totalling at least 1035 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 × 4) REDACTED:570 — REDACTED:570-576 | REDACTED:555-561 | REDACTED:561-567 | REDACTED:737-743 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 54 separate duplicated blocks between them, totalling at least 1035 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 × 4) REDACTED:1285 — REDACTED:1285-1291 | REDACTED:1206-1212 | REDACTED:1218-1224 | REDACTED:1489-1495 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 54 separate duplicated blocks between them, totalling at least 1035 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 × 4) sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/linkage_view.rs:316 — sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/linkage_view.rs:316-322 | sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/linkage_view.rs:253-259 | sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/linkage_view.rs:253-259 | sui-execution/historical-versions/v3/sui-adapter/src/data_store/legacy/linkage_view.rs:278-284 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/linkage_view.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/linkage_view.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 128 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 × 4) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/drop_safety.rs:271 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/drop_safety.rs:271-277 | sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/memory_safety.rs:130-136 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/verify/drop_safety.rs:274-280 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/verify/memory_safety.rs:140-146 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/drop_safety.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/verify/drop_safety.rs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 196 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 × 4) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/move_functions.rs:35 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/move_functions.rs:35-41 | sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/private_entry_arguments.rs:410-416 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/verify/move_functions.rs:46-52 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/verify/private_entry_arguments.rs:428-434 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/move_functions.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/verify/move_functions.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 4) sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/linkage_view.rs:230 — sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/linkage_view.rs:230-236 | sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/linkage_view.rs:266-272 | sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/linkage_view.rs:266-272 | sui-execution/historical-versions/v3/sui-adapter/src/data_store/legacy/linkage_view.rs:291-297 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/linkage_view.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/linkage_view.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 128 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 × 4) sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs:840 — sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs:840-846 | sui-execution/historical-versions/v2/sui-adapter/src/temporary_store.rs:892-898 | sui-execution/historical-versions/v3/sui-adapter/src/temporary_store.rs:875-881 | sui-execution/latest/sui-adapter/src/temporary_store.rs:1165-1171 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs` and `sui-execution/historical-versions/v2/sui-adapter/src/temporary_store.rs` as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 779 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 × 4) sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/context.rs:1006 — sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/context.rs:1006-1014 | sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:956-964 | sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs:1013-1021 | sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/context.rs:1383-1389 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/context.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 378 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 × 4) crates/sui-bridge/src/sui_transaction_builder.rs:316 — crates/sui-bridge/src/sui_transaction_builder.rs:316-322 | crates/sui-bridge/src/sui_transaction_builder.rs:383-389 | crates/sui-bridge/src/sui_transaction_builder.rs:446-452 | crates/sui-bridge/src/sui_transaction_builder.rs:509-515 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (7 lines × 4) sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs:124 — sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs:124-130 | sui-execution/historical-versions/v1/sui-move-natives/src/test_scenario.rs:118-124 | sui-execution/historical-versions/v2/sui-move-natives/src/test_scenario.rs:117-123 | sui-execution/historical-versions/v3/sui-move-natives/src/test_scenario.rs:206-212 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/test_scenario.rs` as WHOLE FILES: this scan already matched 35 separate duplicated blocks between them, totalling at least 619 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (14 lines × 3) · ×14
  • Duplicated block (14 lines × 3) crates/sui/src/upgrade_compatibility/mod.rs:1164 — crates/sui/src/upgrade_compatibility/mod.rs:1164-1177 | crates/sui/src/upgrade_compatibility/mod.rs:1211-1224 | crates/sui/src/upgrade_compatibility/mod.rs:1479-1492 — 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 (14 lines × 3) REDACTED:78 — REDACTED:78-91 | REDACTED:78-91 | REDACTED:78-91 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 54 separate duplicated blocks between them, totalling at least 1035 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 × 3) sui-execution/historical-versions/v0/sui-verifier/src/id_leak_verifier.rs:294 — sui-execution/historical-versions/v0/sui-verifier/src/id_leak_verifier.rs:294-307 | sui-execution/historical-versions/v1/sui-verifier/src/id_leak_verifier.rs:268-281 | sui-execution/historical-versions/v2/sui-verifier/src/id_leak_verifier.rs:283-296 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-verifier/src/id_leak_verifier.rs` and `sui-execution/historical-versions/v1/sui-verifier/src/id_leak_verifier.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 350 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 × 3) sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:1161 — sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:1161-1174 | sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs:1218-1231 | sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/context.rs:1824-1837 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs` and `sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs` as WHOLE FILES: this scan already matched 61 separate duplicated blocks between them, totalling at least 1074 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 × 3) sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs:1031 — sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs:1031-1044 | sui-execution/historical-versions/v2/sui-adapter/src/temporary_store.rs:1083-1096 | sui-execution/historical-versions/v3/sui-adapter/src/temporary_store.rs:1073-1086 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs` and `sui-execution/historical-versions/v2/sui-adapter/src/temporary_store.rs` as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 779 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 × 3) sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs:1049 — sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs:1049-1062 | sui-execution/historical-versions/v2/sui-adapter/src/temporary_store.rs:1101-1114 | sui-execution/historical-versions/v3/sui-adapter/src/temporary_store.rs:1098-1111 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs` and `sui-execution/historical-versions/v2/sui-adapter/src/temporary_store.rs` as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 779 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 × 3) sui-execution/historical-versions/v2/sui-adapter/src/temporary_store.rs:652 — sui-execution/historical-versions/v2/sui-adapter/src/temporary_store.rs:652-665 | sui-execution/historical-versions/v3/sui-adapter/src/temporary_store.rs:617-630 | sui-execution/latest/sui-adapter/src/temporary_store.rs:1010-1023 — before extracting anything, compare `sui-execution/historical-versions/v2/sui-adapter/src/temporary_store.rs` and `sui-execution/historical-versions/v3/sui-adapter/src/temporary_store.rs` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 547 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 × 3) sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs:186 — sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs:186-199 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs:259-272 | sui-execution/latest/sui-move-natives/src/crypto/group_ops.rs:262-275 — before extracting anything, compare `sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs` and `sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 256 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 × 3) sui-execution/historical-versions/v2/sui-verifier/src/entry_points_verifier.rs:182 — sui-execution/historical-versions/v2/sui-verifier/src/entry_points_verifier.rs:182-195 | sui-execution/historical-versions/v3/sui-verifier/src/entry_points_verifier.rs:182-195 | sui-execution/latest/sui-verifier/src/entry_points_verifier.rs:182-195 — before extracting anything, compare `sui-execution/historical-versions/v2/sui-verifier/src/entry_points_verifier.rs` and `sui-execution/historical-versions/v3/sui-verifier/src/entry_points_verifier.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 184 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 × 3) sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/trace_utils.rs:158 — sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/trace_utils.rs:158-171 | sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/trace_utils.rs:156-169 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/trace_utils.rs:154-167 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/trace_utils.rs` and `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/trace_utils.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 105 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 × 3) sui-execution/historical-versions/v2/sui-verifier/src/verifier.rs:58 — sui-execution/historical-versions/v2/sui-verifier/src/verifier.rs:58-71 | sui-execution/historical-versions/v3/sui-verifier/src/verifier.rs:63-76 | sui-execution/latest/sui-verifier/src/verifier.rs:66-79 — 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 (14 lines × 3) sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs:81 — sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs:81-94 | sui-execution/historical-versions/v1/sui-move-natives/src/test_scenario.rs:75-88 | sui-execution/historical-versions/v2/sui-move-natives/src/test_scenario.rs:74-87 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/test_scenario.rs` as WHOLE FILES: this scan already matched 35 separate duplicated blocks between them, totalling at least 619 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 × 3) sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs:401 — sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs:401-414 | sui-execution/historical-versions/v1/sui-move-natives/src/test_scenario.rs:396-409 | sui-execution/historical-versions/v2/sui-move-natives/src/test_scenario.rs:398-411 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/test_scenario.rs` as WHOLE FILES: this scan already matched 35 separate duplicated blocks between them, totalling at least 619 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 × 3) sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs:476 — sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs:476-489 | sui-execution/historical-versions/v1/sui-move-natives/src/test_scenario.rs:471-484 | sui-execution/historical-versions/v2/sui-move-natives/src/test_scenario.rs:473-486 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/test_scenario.rs` as WHOLE FILES: this scan already matched 35 separate duplicated blocks between them, totalling at least 619 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.
D5 · Coupling · Off the main sequence · ×14
  • Off the main sequence: prometheus-closure-metric — prometheus-closure-metric: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 2 project(s), so it's rigid to change.
  • Off the main sequence: sui-prompt — sui-prompt: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
  • Off the main sequence: sui-rpc-cursor — sui-rpc-cursor: 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: telemetry-subscribers — telemetry-subscribers: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 31 project(s), so it's rigid to change.
  • Off the main sequence: sui-protocol-config — sui-protocol-config: abstractness 0.00, instability 0.09, distance 0.91 — zone of pain — concrete and depended on by 48 project(s), so it's rigid to change.
  • Off the main sequence: sui-tls — sui-tls: abstractness 0.13, instability 0.00, distance 0.88 — zone of pain — concrete and depended on by 8 project(s), so it's rigid to change.
  • Off the main sequence: sui-futures — sui-futures: abstractness 0.17, instability 0.00, distance 0.83 — zone of pain — concrete and depended on by 15 project(s), so it's rigid to change.
  • Off the main sequence: sui-config — sui-config: abstractness 0.02, instability 0.16, distance 0.82 — zone of pain — concrete and depended on by 26 project(s), so it's rigid to change.
  • Off the main sequence: consensus-config — consensus-config: abstractness 0.00, instability 0.18, distance 0.82 — zone of pain — concrete and depended on by 9 project(s), so it's rigid to change.
  • Off the main sequence: mysten-metrics — mysten-metrics: abstractness 0.16, instability 0.04, distance 0.80 — zone of pain — concrete and depended on by 27 project(s), so it's rigid to change.
  • Off the main sequence: consensus-types — consensus-types: abstractness 0.00, instability 0.20, distance 0.80 — zone of pain — concrete and depended on by 4 project(s), so it's rigid to change.
  • Off the main sequence: mysten-network — mysten-network: abstractness 0.07, instability 0.13, distance 0.80 — zone of pain — concrete and depended on by 13 project(s), so it's rigid to change.
  • Off the main sequence: sui-indexer-alt-metrics — sui-indexer-alt-metrics: abstractness 0.00, instability 0.25, distance 0.75 — zone of pain — concrete and depended on by 9 project(s), so it's rigid to change.
  • Off the main sequence: sui-types — sui-types: abstractness 0.10, instability 0.16, distance 0.74 — zone of pain — concrete and depended on by 79 project(s), so it's rigid to change.
D4 · Code Duplication · Duplicated block (27 lines × 2) · ×13
  • Duplicated block (27 lines × 2) crates/sui-benchmark/src/workloads/expected_failure.rs:231 — crates/sui-benchmark/src/workloads/expected_failure.rs:231-257 | crates/sui-benchmark/src/workloads/transfer_object.rs:217-243 — before extracting anything, compare `crates/sui-benchmark/src/workloads/expected_failure.rs` and `crates/sui-benchmark/src/workloads/transfer_object.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 78 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 (27 lines × 2) crates/sui-indexer-alt-reader/src/fullnode_client.rs:202 — crates/sui-indexer-alt-reader/src/fullnode_client.rs:202-228 | crates/sui-indexer-alt-reader/src/fullnode_client.rs:263-289 — both copies are in the same file, so extract the 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 (27 lines × 2) crates/sui-kvstore/src/bigtable/client/mod.rs:1249 — crates/sui-kvstore/src/bigtable/client/mod.rs:1249-1275 | crates/sui-kvstore/src/bigtable/client/mod.rs:1290-1316 — both copies are in the same file, so extract the 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 (27 lines × 2) crates/sui-node/src/db_shell.rs:347 — crates/sui-node/src/db_shell.rs:347-373 | crates/sui-tool/src/db_shell/direct.rs:272-298 — 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 (27 lines × 2) sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs:351 — sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs:351-377 | sui-execution/historical-versions/v2/sui-adapter/src/temporary_store.rs:369-395 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs` and `sui-execution/historical-versions/v2/sui-adapter/src/temporary_store.rs` as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 779 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 (27 lines × 2) sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs:520 — sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs:520-546 | sui-execution/historical-versions/v2/sui-adapter/src/temporary_store.rs:562-588 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs` and `sui-execution/historical-versions/v2/sui-adapter/src/temporary_store.rs` as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 779 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 (27 lines × 2) sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/mod.rs:519 — sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/mod.rs:519-545 | sui-execution/historical-versions/v2/sui-move-natives/src/object_runtime/mod.rs:487-513 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/mod.rs` and `sui-execution/historical-versions/v2/sui-move-natives/src/object_runtime/mod.rs` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 314 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 (27 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/context.rs:1422 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/context.rs:1422-1448 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/context.rs:2004-2030 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/context.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/context.rs` as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 625 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 (27 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/memory_safety.rs:74 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/memory_safety.rs:74-100 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/verify/memory_safety.rs:80-106 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/memory_safety.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/verify/memory_safety.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 120 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 (27 lines × 2) sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs:343 — sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs:343-369 | sui-execution/latest/sui-move-natives/src/crypto/group_ops.rs:346-372 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs` and `sui-execution/latest/sui-move-natives/src/crypto/group_ops.rs` as WHOLE FILES: this scan already matched 33 separate duplicated blocks between them, totalling at least 590 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 (27 lines × 2) sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs:416 — sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs:416-442 | sui-execution/latest/sui-move-natives/src/crypto/group_ops.rs:419-445 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs` and `sui-execution/latest/sui-move-natives/src/crypto/group_ops.rs` as WHOLE FILES: this scan already matched 33 separate duplicated blocks between them, totalling at least 590 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 (27 lines × 2) sui-execution/historical-versions/v3/sui-move-natives/src/crypto/vdf.rs:122 — sui-execution/historical-versions/v3/sui-move-natives/src/crypto/vdf.rs:122-148 | sui-execution/latest/sui-move-natives/src/crypto/vdf.rs:123-149 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-move-natives/src/crypto/vdf.rs` and `sui-execution/latest/sui-move-natives/src/crypto/vdf.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. 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 (27 lines × 2) sui-execution/historical-versions/v3/sui-verifier/src/private_generics.rs:221 — sui-execution/historical-versions/v3/sui-verifier/src/private_generics.rs:221-247 | sui-execution/latest/sui-verifier/src/private_generics.rs:221-247 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-verifier/src/private_generics.rs` and `sui-execution/latest/sui-verifier/src/private_generics.rs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 218 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (23 lines × 2) · ×13
  • Duplicated block (23 lines × 2) crates/sui-indexer-alt-reader/src/consistent_reader.rs:247 — crates/sui-indexer-alt-reader/src/consistent_reader.rs:247-269 | crates/sui-indexer-alt-reader/src/consistent_reader.rs:301-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.
  • Duplicated block (23 lines × 2) crates/sui-rosetta/src/types/internal_operation/pay_sui.rs:151 — crates/sui-rosetta/src/types/internal_operation/pay_sui.rs:151-173 | crates/sui-rosetta/src/types/internal_operation/stake.rs:173-195 — before extracting anything, compare `crates/sui-rosetta/src/types/internal_operation/pay_sui.rs` and `crates/sui-rosetta/src/types/internal_operation/stake.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 218 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 (23 lines × 2) sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs:159 — sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs:159-181 | sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.rs:210-232 — before extracting anything, compare `sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs` and `sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.rs` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 603 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 (23 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.rs:1216 — sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.rs:1216-1238 | sui-execution/latest/sui-adapter/src/execution_engine.rs:2214-2236 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.rs` and `sui-execution/latest/sui-adapter/src/execution_engine.rs` as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 689 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 (23 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/context.rs:1521 — sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/context.rs:1521-1543 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/context.rs:2385-2407 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/context.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/context.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (23 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/context.rs:601 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/context.rs:601-623 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/context.rs:899-921 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/context.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/context.rs` as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 625 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 (23 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/memory_safety.rs:229 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/memory_safety.rs:229-251 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/verify/memory_safety.rs:246-268 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/memory_safety.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/verify/memory_safety.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 120 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 (23 lines × 2) sui-execution/historical-versions/v3/sui-move-natives/src/crypto/groth16.rs:187 — sui-execution/historical-versions/v3/sui-move-natives/src/crypto/groth16.rs:187-209 | sui-execution/latest/sui-move-natives/src/crypto/groth16.rs:211-233 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-move-natives/src/crypto/groth16.rs` and `sui-execution/latest/sui-move-natives/src/crypto/groth16.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 121 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 (23 lines × 2) sui-execution/historical-versions/v3/sui-move-natives/src/object_runtime/mod.rs:672 — sui-execution/historical-versions/v3/sui-move-natives/src/object_runtime/mod.rs:672-694 | sui-execution/latest/sui-move-natives/src/object_runtime/mod.rs:875-897 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-move-natives/src/object_runtime/mod.rs` and `sui-execution/latest/sui-move-natives/src/object_runtime/mod.rs` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 491 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 (23 lines × 2) sui-execution/historical-versions/v3/sui-move-natives/src/object_runtime/object_store.rs:835 — sui-execution/historical-versions/v3/sui-move-natives/src/object_runtime/object_store.rs:835-857 | sui-execution/latest/sui-move-natives/src/object_runtime/object_store.rs:812-834 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-move-natives/src/object_runtime/object_store.rs` and `sui-execution/latest/sui-move-natives/src/object_runtime/object_store.rs` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 521 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 (23 lines × 2) sui-execution/historical-versions/v3/sui-verifier/src/id_leak_verifier.rs:370 — sui-execution/historical-versions/v3/sui-verifier/src/id_leak_verifier.rs:370-392 | sui-execution/latest/sui-verifier/src/id_leak_verifier.rs:376-398 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-verifier/src/id_leak_verifier.rs` and `sui-execution/latest/sui-verifier/src/id_leak_verifier.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 357 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 (23 lines × 2) sui-execution/historical-versions/v3/sui-verifier/src/meter.rs:41 — sui-execution/historical-versions/v3/sui-verifier/src/meter.rs:41-63 | sui-execution/latest/sui-verifier/src/meter.rs:41-63 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-verifier/src/meter.rs` and `sui-execution/latest/sui-verifier/src/meter.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 52 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 (23 lines × 2) crates/sui-indexer-alt-reader/src/object_versions.rs:52 — crates/sui-indexer-alt-reader/src/object_versions.rs:52-78 | crates/sui-indexer-alt-reader/src/packages.rs:48-70 — before extracting anything, compare `crates/sui-indexer-alt-reader/src/object_versions.rs` and `crates/sui-indexer-alt-reader/src/packages.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 55 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (10 lines × 3) · ×13
  • Duplicated block (10 lines × 3) consensus/core/src/network/observer.rs:473 — consensus/core/src/network/observer.rs:473-483 | consensus/core/src/network/observer.rs:512-521 | consensus/core/src/network/observer.rs:559-568 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (10 lines × 3) crates/sui-transaction-builder/src/lib.rs:579 — crates/sui-transaction-builder/src/lib.rs:579-588 | crates/sui-transactional-test-runner/src/test_adapter.rs:1805-1814 | crates/sui-types/src/transaction.rs:2954-2963 — before extracting anything, compare `crates/sui-transaction-builder/src/lib.rs` and `crates/sui-types/src/transaction.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 45 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 × 3) crates/sui-types/src/sui_system_state/simtest_sui_system_state_inner.rs:222 — crates/sui-types/src/sui_system_state/simtest_sui_system_state_inner.rs:222-231 | crates/sui-types/src/sui_system_state/simtest_sui_system_state_inner.rs:347-356 | crates/sui-types/src/sui_system_state/simtest_sui_system_state_inner.rs:501-510 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (10 lines × 3) sui-execution/historical-versions/v0/sui-adapter/src/adapter.rs:64 — sui-execution/historical-versions/v0/sui-adapter/src/adapter.rs:64-73 | sui-execution/historical-versions/v1/sui-adapter/src/adapter.rs:64-73 | sui-execution/historical-versions/v2/sui-adapter/src/adapter.rs:62-71 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/adapter.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/adapter.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 100 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 × 3) sui-execution/historical-versions/v0/sui-adapter/src/gas_meter.rs:128 — sui-execution/historical-versions/v0/sui-adapter/src/gas_meter.rs:128-137 | sui-execution/historical-versions/v1/sui-adapter/src/gas_meter.rs:128-137 | sui-execution/historical-versions/v2/sui-adapter/src/gas_meter.rs:128-137 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/gas_meter.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/gas_meter.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 155 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 × 3) sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/context.rs:535 — sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/context.rs:535-544 | sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:544-553 | sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs:562-571 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/context.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 378 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 × 3) sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/context.rs:1005 — sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/context.rs:1005-1014 | sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:955-964 | sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs:1012-1021 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/context.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 378 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 × 3) sui-execution/historical-versions/v0/sui-move-natives/src/object_runtime/object_store.rs:285 — sui-execution/historical-versions/v0/sui-move-natives/src/object_runtime/object_store.rs:285-294 | sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/object_store.rs:423-432 | sui-execution/historical-versions/v2/sui-move-natives/src/object_runtime/object_store.rs:436-445 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/object_runtime/object_store.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/object_store.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 237 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 × 3) sui-execution/historical-versions/v0/sui-move-natives/src/transfer.rs:150 — sui-execution/historical-versions/v0/sui-move-natives/src/transfer.rs:150-159 | sui-execution/historical-versions/v1/sui-move-natives/src/transfer.rs:236-245 | sui-execution/historical-versions/v2/sui-move-natives/src/transfer.rs:236-245 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/transfer.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/transfer.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 115 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 × 3) sui-execution/historical-versions/v1/sui-adapter/src/gas_charger.rs:330 — sui-execution/historical-versions/v1/sui-adapter/src/gas_charger.rs:330-339 | sui-execution/historical-versions/v2/sui-adapter/src/gas_charger.rs:331-340 | sui-execution/historical-versions/v3/sui-adapter/src/gas_charger.rs:446-455 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-adapter/src/gas_charger.rs` and `sui-execution/historical-versions/v2/sui-adapter/src/gas_charger.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 205 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 × 3) sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:871 — sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:871-880 | sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs:928-937 | sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/context.rs:1239-1248 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs` and `sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs` as WHOLE FILES: this scan already matched 61 separate duplicated blocks between them, totalling at least 1074 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 × 3) sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/linkage_view.rs:232 — sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/linkage_view.rs:232-241 | sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/linkage_view.rs:232-241 | sui-execution/historical-versions/v3/sui-adapter/src/data_store/legacy/linkage_view.rs:257-266 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/linkage_view.rs` and `sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/linkage_view.rs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 158 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 × 3) sui-execution/historical-versions/v0/sui-adapter/src/gas_meter.rs:268 — sui-execution/historical-versions/v0/sui-adapter/src/gas_meter.rs:268-277 | sui-execution/historical-versions/v1/sui-adapter/src/gas_meter.rs:268-277 | sui-execution/historical-versions/v2/sui-adapter/src/gas_meter.rs:268-277 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/gas_meter.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/gas_meter.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 155 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.
D30 · Dependency Vulnerabilities · Medium vulnerability · ×12
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Duplicated block (22 lines × 2) · ×12
  • Duplicated block (22 lines × 2) crates/sui-indexer-alt/src/handlers/kv_feature_flags.rs:28 — crates/sui-indexer-alt/src/handlers/kv_feature_flags.rs:28-49 | crates/sui-indexer-alt/src/handlers/kv_protocol_configs.rs:28-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.
  • Duplicated block (22 lines × 2) sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:356 — sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:356-377 | sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs:374-395 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs` and `sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs` as WHOLE FILES: this scan already matched 61 separate duplicated blocks between them, totalling at least 1074 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 (22 lines × 2) sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:576 — sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:576-597 | sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs:595-616 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs` and `sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs` as WHOLE FILES: this scan already matched 61 separate duplicated blocks between them, totalling at least 1074 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 (22 lines × 2) REDACTED:646 — REDACTED:646-667 | REDACTED:652-673 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 77 separate duplicated blocks between them, totalling at least 1502 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 (22 lines × 2) REDACTED:1338 — REDACTED:1338-1359 | REDACTED:1624-1645 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 52 separate duplicated blocks between them, totalling at least 858 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 (22 lines × 2) sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/linkage_view.rs:104 — sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/linkage_view.rs:104-125 | sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/linkage_view.rs:104-125 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/linkage_view.rs` and `sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/linkage_view.rs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 158 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 (22 lines × 2) sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs:694 — sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs:694-715 | sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/context.rs:944-965 — before extracting anything, compare `sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs` and `sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/context.rs` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 478 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 (22 lines × 2) REDACTED:841 — REDACTED:841-862 | REDACTED:1065-1086 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 53 separate duplicated blocks between them, totalling at least 869 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 (22 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/error.rs:54 — sui-execution/historical-versions/v3/sui-adapter/src/error.rs:54-75 | sui-execution/latest/sui-adapter/src/error.rs:54-75 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/error.rs` and `sui-execution/latest/sui-adapter/src/error.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 72 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 (22 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/trace_utils.rs:274 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/trace_utils.rs:274-295 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/trace_utils.rs:272-293 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/trace_utils.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/trace_utils.rs` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 272 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 (22 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/temporary_store.rs:729 — sui-execution/historical-versions/v3/sui-adapter/src/temporary_store.rs:729-750 | sui-execution/latest/sui-adapter/src/temporary_store/invariants.rs:757-778 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/temporary_store.rs` and `sui-execution/latest/sui-adapter/src/temporary_store/invariants.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 124 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 (22 lines × 2) sui-execution/historical-versions/v3/sui-verifier/src/private_generics_verifier_v2.rs:217 — sui-execution/historical-versions/v3/sui-verifier/src/private_generics_verifier_v2.rs:217-238 | sui-execution/latest/sui-verifier/src/private_generics_verifier_v2.rs:218-239 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-verifier/src/private_generics_verifier_v2.rs` and `sui-execution/latest/sui-verifier/src/private_generics_verifier_v2.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 169 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (30 lines × 2) · ×11
  • Duplicated block (30 lines × 2) consensus/core/src/network/clients.rs:59 — consensus/core/src/network/clients.rs:59-88 | consensus/core/src/network/clients.rs:180-209 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (30 lines × 2) consensus/core/src/network/observer.rs:521 — consensus/core/src/network/observer.rs:521-550 | consensus/core/src/network/tonic_network.rs:697-726 — before extracting anything, compare `consensus/core/src/network/observer.rs` and `consensus/core/src/network/tonic_network.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 185 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 × 2) crates/typed-store/src/rocks/mod.rs:1968 — crates/typed-store/src/rocks/mod.rs:1968-1997 | crates/typed-store/src/rocks/mod.rs:2001-2030 — both copies are in the same file, so extract the 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 (30 lines × 2) REDACTED:372 — REDACTED:372-401 | REDACTED:378-407 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 77 separate duplicated blocks between them, totalling at least 1502 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 (30 lines × 2) REDACTED:608 — REDACTED:608-637 | REDACTED:614-643 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 77 separate duplicated blocks between them, totalling at least 1502 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 (30 lines × 2) REDACTED:1227 — REDACTED:1227-1256 | REDACTED:1239-1268 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 77 separate duplicated blocks between them, totalling at least 1502 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 (30 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/defining_ids_in_types.rs:77 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/defining_ids_in_types.rs:77-106 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/defining_ids_in_types.rs:83-112 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/defining_ids_in_types.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/defining_ids_in_types.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 76 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 (30 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs:811 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs:811-840 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs:1769-1798 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs` as WHOLE FILES: this scan already matched 35 separate duplicated blocks between them, totalling at least 484 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 (30 lines × 2) sui-execution/historical-versions/v3/sui-move-natives/src/object_runtime/mod.rs:407 — sui-execution/historical-versions/v3/sui-move-natives/src/object_runtime/mod.rs:407-436 | sui-execution/latest/sui-move-natives/src/object_runtime/mod.rs:589-618 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-move-natives/src/object_runtime/mod.rs` and `sui-execution/latest/sui-move-natives/src/object_runtime/mod.rs` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 491 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 (30 lines × 2) sui-execution/historical-versions/v3/sui-move-natives/src/validator.rs:31 — sui-execution/historical-versions/v3/sui-move-natives/src/validator.rs:31-60 | sui-execution/latest/sui-move-natives/src/validator.rs:32-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 (30 lines × 2) sui-execution/historical-versions/v3/sui-move-natives/src/test_scenario.rs:341 — sui-execution/historical-versions/v3/sui-move-natives/src/test_scenario.rs:341-370 | sui-execution/latest/sui-move-natives/src/test_scenario.rs:484-513 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-move-natives/src/test_scenario.rs` and `sui-execution/latest/sui-move-natives/src/test_scenario.rs` as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 610 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (25 lines × 2) · ×11
  • Duplicated block (25 lines × 2) crates/sui-data-store/src/stores/graphql.rs:393 — crates/sui-data-store/src/stores/graphql.rs:393-417 | crates/sui-data-store/src/stores/in_memory.rs:430-454 — before extracting anything, compare `crates/sui-data-store/src/stores/graphql.rs` and `crates/sui-data-store/src/stores/in_memory.rs` as WHOLE FILES: this scan already matched 3 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. 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 (25 lines × 2) crates/sui-json-rpc-types/src/sui_transaction.rs:337 — crates/sui-json-rpc-types/src/sui_transaction.rs:337-361 | crates/sui/src/displays/dry_run_tx_block.rs:52-76 — before extracting anything, compare `crates/sui-json-rpc-types/src/sui_transaction.rs` and `crates/sui/src/displays/dry_run_tx_block.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 67 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 (25 lines × 2) crates/sui-rosetta/src/types/internal_operation/pay_sui.rs:315 — crates/sui-rosetta/src/types/internal_operation/pay_sui.rs:315-339 | crates/sui-rosetta/src/types/internal_operation/stake.rs:370-394 — before extracting anything, compare `crates/sui-rosetta/src/types/internal_operation/pay_sui.rs` and `crates/sui-rosetta/src/types/internal_operation/stake.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 218 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 (25 lines × 2) sui-execution/historical-versions/v1/sui-adapter/src/gas_charger.rs:280 — sui-execution/historical-versions/v1/sui-adapter/src/gas_charger.rs:280-304 | sui-execution/historical-versions/v2/sui-adapter/src/gas_charger.rs:281-305 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-adapter/src/gas_charger.rs` and `sui-execution/historical-versions/v2/sui-adapter/src/gas_charger.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 205 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 (25 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.rs:693 — sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.rs:693-717 | sui-execution/latest/sui-adapter/src/execution_engine.rs:1730-1754 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.rs` and `sui-execution/latest/sui-adapter/src/execution_engine.rs` as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 689 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 (25 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/gas_meter.rs:91 — sui-execution/historical-versions/v3/sui-adapter/src/gas_meter.rs:91-115 | sui-execution/latest/sui-adapter/src/gas_meter.rs:113-137 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/gas_meter.rs` and `sui-execution/latest/sui-adapter/src/gas_meter.rs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 123 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 (25 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/context.rs:280 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/context.rs:280-304 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/context.rs:442-466 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/context.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/context.rs` as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 625 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 (25 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/ast.rs:265 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/ast.rs:265-289 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/ast.rs:279-303 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/ast.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/ast.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 74 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 (25 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/drop_safety.rs:98 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/drop_safety.rs:98-122 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/verify/drop_safety.rs:98-122 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/drop_safety.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/verify/drop_safety.rs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 196 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 (25 lines × 2) sui-execution/historical-versions/v3/sui-verifier/src/lib.rs:26 — sui-execution/historical-versions/v3/sui-verifier/src/lib.rs:26-50 | sui-execution/latest/sui-verifier/src/lib.rs:27-51 — 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 (25 lines × 2) sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs:635 — sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs:635-659 | sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs:653-677 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs` and `sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs` as WHOLE FILES: this scan already matched 39 separate duplicated blocks between them, totalling at least 959 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (18 lines × 3) · ×11
  • Duplicated block (18 lines × 3) crates/sui-benchmark/src/workloads/composite/operations.rs:580 — crates/sui-benchmark/src/workloads/composite/operations.rs:580-597 | crates/sui-benchmark/src/workloads/composite/operations.rs:661-678 | crates/sui-benchmark/src/workloads/composite/operations.rs:800-817 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (18 lines × 3) crates/sui-checkpoint-blob-indexer/src/config.rs:173 — crates/sui-checkpoint-blob-indexer/src/config.rs:173-190 | crates/sui-indexer-alt-consistent-store/src/config.rs:182-199 | crates/sui-kvstore/src/config.rs:384-401 — before extracting anything, compare `crates/sui-checkpoint-blob-indexer/src/config.rs` and `crates/sui-kvstore/src/config.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 70 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 (18 lines × 3) sui-execution/historical-versions/v0/sui-move-natives/src/address.rs:69 — sui-execution/historical-versions/v0/sui-move-natives/src/address.rs:69-86 | sui-execution/historical-versions/v1/sui-move-natives/src/address.rs:69-86 | sui-execution/historical-versions/v2/sui-move-natives/src/address.rs:69-86 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/address.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/address.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 108 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 (18 lines × 3) sui-execution/historical-versions/v0/sui-move-natives/src/address.rs:108 — sui-execution/historical-versions/v0/sui-move-natives/src/address.rs:108-125 | sui-execution/historical-versions/v1/sui-move-natives/src/address.rs:108-125 | sui-execution/historical-versions/v2/sui-move-natives/src/address.rs:108-125 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/address.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/address.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 108 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 (18 lines × 3) sui-execution/historical-versions/v0/sui-move-natives/src/object_runtime/mod.rs:281 — sui-execution/historical-versions/v0/sui-move-natives/src/object_runtime/mod.rs:281-298 | sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/mod.rs:306-323 | sui-execution/historical-versions/v2/sui-move-natives/src/object_runtime/mod.rs:268-285 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/object_runtime/mod.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/mod.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 208 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 (18 lines × 3) sui-execution/historical-versions/v0/sui-move-natives/src/object_runtime/object_store.rs:305 — sui-execution/historical-versions/v0/sui-move-natives/src/object_runtime/object_store.rs:305-322 | sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/object_store.rs:443-460 | sui-execution/historical-versions/v2/sui-move-natives/src/object_runtime/object_store.rs:456-473 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/object_runtime/object_store.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/object_store.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 237 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 (18 lines × 3) sui-execution/historical-versions/v0/sui-verifier/src/id_leak_verifier.rs:357 — sui-execution/historical-versions/v0/sui-verifier/src/id_leak_verifier.rs:357-374 | sui-execution/historical-versions/v1/sui-verifier/src/id_leak_verifier.rs:331-348 | sui-execution/historical-versions/v2/sui-verifier/src/id_leak_verifier.rs:346-363 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-verifier/src/id_leak_verifier.rs` and `sui-execution/historical-versions/v1/sui-verifier/src/id_leak_verifier.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 350 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 (18 lines × 3) sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:696 — sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:696-713 | sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs:717-734 | sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/context.rs:967-984 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs` and `sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs` as WHOLE FILES: this scan already matched 61 separate duplicated blocks between them, totalling at least 1074 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 (18 lines × 3) sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.rs:1163 — sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.rs:1163-1180 | sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.rs:1311-1328 | sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.rs:1384-1401 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (18 lines × 3) sui-execution/latest/sui-adapter/src/execution_engine.rs:2161 — sui-execution/latest/sui-adapter/src/execution_engine.rs:2161-2178 | sui-execution/latest/sui-adapter/src/execution_engine.rs:2309-2326 | sui-execution/latest/sui-adapter/src/execution_engine.rs:2382-2399 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (18 lines × 3) sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs:792 — sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs:792-809 | sui-execution/historical-versions/v2/sui-adapter/src/temporary_store.rs:844-861 | sui-execution/historical-versions/v3/sui-adapter/src/temporary_store.rs:827-844 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs` and `sui-execution/historical-versions/v2/sui-adapter/src/temporary_store.rs` as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 779 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (17 lines × 4) · ×11
  • Duplicated block (17 lines × 4) crates/sui-kv-rpc/src/v2/move_package_service.rs:166 — crates/sui-kv-rpc/src/v2/move_package_service.rs:166-182 | crates/sui-kv-rpc/src/v2/move_package_service.rs:192-208 | crates/sui-rpc-api/src/grpc/v2/move_package_service/get_datatype.rs:19-35 | crates/sui-rpc-api/src/grpc/v2/move_package_service/get_function.rs:20-36 — there are 4 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart.
  • Duplicated block (17 lines × 4) sui-execution/historical-versions/v0/sui-adapter/src/execution_mode.rs:264 — sui-execution/historical-versions/v0/sui-adapter/src/execution_mode.rs:264-280 | sui-execution/historical-versions/v1/sui-adapter/src/execution_mode.rs:264-280 | sui-execution/historical-versions/v2/sui-adapter/src/execution_mode.rs:264-280 | sui-execution/historical-versions/v3/sui-adapter/src/execution_mode.rs:359-375 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/execution_mode.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/execution_mode.rs` as WHOLE FILES: this scan already matched 3 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (17 lines × 4) sui-execution/historical-versions/v0/sui-adapter/src/execution_value.rs:172 — sui-execution/historical-versions/v0/sui-adapter/src/execution_value.rs:172-188 | sui-execution/historical-versions/v1/sui-adapter/src/execution_value.rs:172-188 | sui-execution/historical-versions/v2/sui-adapter/src/execution_value.rs:172-188 | sui-execution/historical-versions/v3/sui-adapter/src/execution_value.rs:220-236 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/execution_value.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/execution_value.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 64 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (17 lines × 4) sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/context.rs:1193 — sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/context.rs:1193-1209 | sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:1178-1194 | sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs:1235-1251 | sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/context.rs:1848-1864 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/context.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 378 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (17 lines × 4) REDACTED:419 — REDACTED:419-435 | REDACTED:423-439 | REDACTED:429-445 | REDACTED:603-619 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 54 separate duplicated blocks between them, totalling at least 1035 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (17 lines × 4) sui-execution/historical-versions/v0/sui-move-natives/src/address.rs:75 — sui-execution/historical-versions/v0/sui-move-natives/src/address.rs:75-91 | sui-execution/historical-versions/v1/sui-move-natives/src/address.rs:75-91 | sui-execution/historical-versions/v2/sui-move-natives/src/address.rs:75-91 | sui-execution/historical-versions/v3/sui-move-natives/src/address.rs:71-87 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/address.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/address.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 108 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (17 lines × 4) sui-execution/historical-versions/v0/sui-move-natives/src/address.rs:114 — sui-execution/historical-versions/v0/sui-move-natives/src/address.rs:114-130 | sui-execution/historical-versions/v1/sui-move-natives/src/address.rs:114-130 | sui-execution/historical-versions/v2/sui-move-natives/src/address.rs:114-130 | sui-execution/historical-versions/v3/sui-move-natives/src/address.rs:108-124 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/address.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/address.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 108 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (17 lines × 4) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/groth16.rs:138 — sui-execution/historical-versions/v0/sui-move-natives/src/crypto/groth16.rs:138-154 | sui-execution/historical-versions/v1/sui-move-natives/src/crypto/groth16.rs:138-154 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/groth16.rs:138-154 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/groth16.rs:138-154 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/crypto/groth16.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/crypto/groth16.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 227 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (17 lines × 4) sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs:149 — sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs:149-165 | sui-execution/historical-versions/v2/sui-adapter/src/temporary_store.rs:167-183 | sui-execution/historical-versions/v3/sui-adapter/src/temporary_store.rs:259-275 | sui-execution/latest/sui-adapter/src/temporary_store.rs:506-522 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs` and `sui-execution/historical-versions/v2/sui-adapter/src/temporary_store.rs` as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 779 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (17 lines × 4) sui-execution/historical-versions/v1/sui-verifier/src/entry_points_verifier.rs:228 — sui-execution/historical-versions/v1/sui-verifier/src/entry_points_verifier.rs:228-244 | sui-execution/historical-versions/v2/sui-verifier/src/entry_points_verifier.rs:244-260 | sui-execution/historical-versions/v3/sui-verifier/src/entry_points_verifier.rs:244-260 | sui-execution/latest/sui-verifier/src/entry_points_verifier.rs:244-260 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-verifier/src/entry_points_verifier.rs` and `sui-execution/historical-versions/v2/sui-verifier/src/entry_points_verifier.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 160 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (17 lines × 4) sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs:377 — sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs:377-393 | sui-execution/historical-versions/v1/sui-move-natives/src/test_scenario.rs:372-388 | sui-execution/historical-versions/v2/sui-move-natives/src/test_scenario.rs:374-390 | sui-execution/historical-versions/v3/sui-move-natives/src/test_scenario.rs:504-520 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/test_scenario.rs` as WHOLE FILES: this scan already matched 35 separate duplicated blocks between them, totalling at least 619 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (13 lines × 5) · ×11
  • Duplicated block (13 lines × 5) crates/sui-types/src/sui_system_state/simtest_sui_system_state_inner.rs:204 — crates/sui-types/src/sui_system_state/simtest_sui_system_state_inner.rs:204-216 | crates/sui-types/src/sui_system_state/simtest_sui_system_state_inner.rs:329-341 | crates/sui-types/src/sui_system_state/simtest_sui_system_state_inner.rs:483-495 | crates/sui-types/src/sui_system_state/sui_system_state_inner_v1.rs:614-626 | crates/sui-types/src/sui_system_state/sui_system_state_inner_v2.rs:173-185 — before extracting anything, compare `crates/sui-types/src/sui_system_state/sui_system_state_inner_v1.rs` and `crates/sui-types/src/sui_system_state/sui_system_state_inner_v2.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 184 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (13 lines × 5) sui-execution/historical-versions/v0/sui-adapter/src/gas_charger.rs:227 — sui-execution/historical-versions/v0/sui-adapter/src/gas_charger.rs:227-239 | sui-execution/historical-versions/v1/sui-adapter/src/gas_charger.rs:236-248 | sui-execution/historical-versions/v2/sui-adapter/src/gas_charger.rs:237-249 | sui-execution/historical-versions/v3/sui-adapter/src/gas_charger.rs:266-278 | sui-execution/latest/sui-adapter/src/gas_charger.rs:520-532 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/gas_charger.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/gas_charger.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 114 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (13 lines × 5) REDACTED:1115 — REDACTED:1115-1127 | REDACTED:1034-1046 | REDACTED:1046-1058 | REDACTED:1285-1297 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/context.rs:2043-2055 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 54 separate duplicated blocks between them, totalling at least 1035 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (13 lines × 5) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_k1.rs:166 — sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_k1.rs:166-178 | sui-execution/historical-versions/v1/sui-move-natives/src/crypto/ecdsa_k1.rs:166-178 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/ecdsa_k1.rs:166-178 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/ecdsa_k1.rs:175-187 | sui-execution/latest/sui-move-natives/src/crypto/ecdsa_k1.rs:177-189 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_k1.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/crypto/ecdsa_k1.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 263 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (13 lines × 5) sui-execution/historical-versions/v0/sui-verifier/src/id_leak_verifier.rs:211 — sui-execution/historical-versions/v0/sui-verifier/src/id_leak_verifier.rs:211-223 | sui-execution/historical-versions/v1/sui-verifier/src/id_leak_verifier.rs:185-197 | sui-execution/historical-versions/v2/sui-verifier/src/id_leak_verifier.rs:200-212 | sui-execution/historical-versions/v3/sui-verifier/src/id_leak_verifier.rs:227-239 | sui-execution/latest/sui-verifier/src/id_leak_verifier.rs:233-245 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-verifier/src/id_leak_verifier.rs` and `sui-execution/historical-versions/v1/sui-verifier/src/id_leak_verifier.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 350 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (13 lines × 5) sui-execution/historical-versions/v0/sui-verifier/src/meter.rs:17 — sui-execution/historical-versions/v0/sui-verifier/src/meter.rs:17-29 | sui-execution/historical-versions/v1/sui-verifier/src/meter.rs:17-29 | sui-execution/historical-versions/v2/sui-verifier/src/meter.rs:17-29 | sui-execution/historical-versions/v3/sui-verifier/src/meter.rs:17-29 | sui-execution/latest/sui-verifier/src/meter.rs:17-29 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-verifier/src/meter.rs` and `sui-execution/historical-versions/v1/sui-verifier/src/meter.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 54 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (13 lines × 5) sui-execution/latest/sui-move-natives/src/crypto/group_ops.rs:315 — sui-execution/latest/sui-move-natives/src/crypto/group_ops.rs:315-327 | sui-execution/latest/sui-move-natives/src/crypto/group_ops.rs:388-400 | sui-execution/latest/sui-move-natives/src/crypto/group_ops.rs:461-473 | sui-execution/latest/sui-move-natives/src/crypto/group_ops.rs:550-562 | sui-execution/latest/sui-move-natives/src/crypto/group_ops.rs:864-876 — 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 (13 lines × 5) REDACTED:775 — REDACTED:775-787 | REDACTED:710-722 | REDACTED:716-728 | REDACTED:955-967 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/context.rs:2492-2504 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 54 separate duplicated blocks between them, totalling at least 1035 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (13 lines × 5) sui-execution/historical-versions/v0/sui-verifier/src/id_leak_verifier.rs:187 — sui-execution/historical-versions/v0/sui-verifier/src/id_leak_verifier.rs:187-199 | sui-execution/historical-versions/v1/sui-verifier/src/id_leak_verifier.rs:161-173 | sui-execution/historical-versions/v2/sui-verifier/src/id_leak_verifier.rs:176-188 | sui-execution/historical-versions/v3/sui-verifier/src/id_leak_verifier.rs:203-215 | sui-execution/latest/sui-verifier/src/id_leak_verifier.rs:209-221 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-verifier/src/id_leak_verifier.rs` and `sui-execution/historical-versions/v1/sui-verifier/src/id_leak_verifier.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 350 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (13 lines × 5) sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs:277 — sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs:277-289 | sui-execution/historical-versions/v1/sui-move-natives/src/test_scenario.rs:272-284 | sui-execution/historical-versions/v2/sui-move-natives/src/test_scenario.rs:274-286 | sui-execution/historical-versions/v3/sui-move-natives/src/test_scenario.rs:401-413 | sui-execution/latest/sui-move-natives/src/test_scenario.rs:576-588 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/test_scenario.rs` as WHOLE FILES: this scan already matched 35 separate duplicated blocks between them, totalling at least 619 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (13 lines × 5) sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs:456 — sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs:456-468 | sui-execution/historical-versions/v1/sui-move-natives/src/test_scenario.rs:451-463 | sui-execution/historical-versions/v2/sui-move-natives/src/test_scenario.rs:453-465 | sui-execution/historical-versions/v3/sui-move-natives/src/test_scenario.rs:586-598 | sui-execution/latest/sui-move-natives/src/test_scenario.rs:761-773 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/test_scenario.rs` as WHOLE FILES: this scan already matched 35 separate duplicated blocks between them, totalling at least 619 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (12 lines × 4) · ×11
  • Duplicated block (12 lines × 4) crates/sui-keys/src/key_derive.rs:102 — crates/sui-keys/src/key_derive.rs:102-113 | crates/sui-keys/src/key_derive.rs:135-146 | crates/sui-keys/src/key_derive.rs:168-179 | crates/sui-keys/src/key_derive.rs:201-212 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (12 lines × 4) sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/context.rs:1173 — sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/context.rs:1173-1184 | sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:1158-1169 | sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs:1215-1226 | sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/context.rs:1821-1832 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/context.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 378 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 4) REDACTED:1142 — REDACTED:1142-1153 | REDACTED:1061-1072 | REDACTED:1073-1084 | REDACTED:1314-1325 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 54 separate duplicated blocks between them, totalling at least 1035 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 4) REDACTED:1187 — REDACTED:1187-1198 | REDACTED:1108-1119 | REDACTED:1120-1131 | REDACTED:1357-1368 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 54 separate duplicated blocks between them, totalling at least 1035 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 4) sui-execution/historical-versions/v0/sui-move-natives/src/validator.rs:58 — sui-execution/historical-versions/v0/sui-move-natives/src/validator.rs:58-69 | sui-execution/historical-versions/v1/sui-move-natives/src/validator.rs:58-69 | sui-execution/historical-versions/v2/sui-move-natives/src/validator.rs:58-69 | sui-execution/latest/sui-move-natives/src/validator.rs:57-68 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/validator.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/validator.rs` as WHOLE FILES: this scan already matched 3 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 4) sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs:576 — sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs:576-587 | sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs:596-607 | sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.rs:707-718 | sui-execution/latest/sui-adapter/src/execution_engine.rs:1744-1755 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs` and `sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs` as WHOLE FILES: this scan already matched 39 separate duplicated blocks between them, totalling at least 959 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 4) REDACTED:667 — REDACTED:667-678 | REDACTED:673-684 | REDACTED:909-920 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/context.rs:2578-2589 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 77 separate duplicated blocks between them, totalling at least 1502 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 4) sui-execution/historical-versions/v1/sui-verifier/src/entry_points_verifier.rs:45 — sui-execution/historical-versions/v1/sui-verifier/src/entry_points_verifier.rs:45-56 | sui-execution/historical-versions/v2/sui-verifier/src/entry_points_verifier.rs:48-59 | sui-execution/historical-versions/v3/sui-verifier/src/entry_points_verifier.rs:48-59 | sui-execution/latest/sui-verifier/src/entry_points_verifier.rs:48-59 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-verifier/src/entry_points_verifier.rs` and `sui-execution/historical-versions/v2/sui-verifier/src/entry_points_verifier.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 160 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 4) sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs:970 — sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs:970-981 | sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs:997-1008 | sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.rs:1184-1195 | sui-execution/latest/sui-adapter/src/execution_engine.rs:2182-2193 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs` and `sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs` as WHOLE FILES: this scan already matched 39 separate duplicated blocks between them, totalling at least 959 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 4) crates/sui-bridge-indexer/src/eth_bridge_indexer.rs:677 — crates/sui-bridge-indexer/src/eth_bridge_indexer.rs:677-688 | crates/sui-bridge-indexer/src/eth_bridge_indexer.rs:734-745 | crates/sui-bridge-indexer/src/eth_bridge_indexer.rs:794-805 | crates/sui-bridge-indexer/src/eth_bridge_indexer.rs:828-839 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (12 lines × 4) sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/linkage_view.rs:165 — sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/linkage_view.rs:165-176 | sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/linkage_view.rs:132-143 | sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/linkage_view.rs:132-143 | sui-execution/historical-versions/v3/sui-adapter/src/data_store/legacy/linkage_view.rs:145-156 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/linkage_view.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/linkage_view.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 128 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (26 lines × 2) · ×10
  • Duplicated block (26 lines × 2) crates/sui-transaction-builder/src/lib.rs:566 — crates/sui-transaction-builder/src/lib.rs:566-591 | crates/sui-types/src/transaction.rs:2941-2966 — before extracting anything, compare `crates/sui-transaction-builder/src/lib.rs` and `crates/sui-types/src/transaction.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 45 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 (26 lines × 2) sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:1072 — sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:1072-1097 | sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs:1129-1154 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs` and `sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs` as WHOLE FILES: this scan already matched 61 separate duplicated blocks between them, totalling at least 1074 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 (26 lines × 2) sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:1233 — sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:1233-1258 | sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs:1290-1315 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs` and `sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs` as WHOLE FILES: this scan already matched 61 separate duplicated blocks between them, totalling at least 1074 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 (26 lines × 2) REDACTED:764 — REDACTED:764-789 | REDACTED:770-795 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 77 separate duplicated blocks between them, totalling at least 1502 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 (26 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/adapter.rs:51 — sui-execution/historical-versions/v3/sui-adapter/src/adapter.rs:51-76 | sui-execution/latest/sui-adapter/src/adapter.rs:56-81 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/adapter.rs` and `sui-execution/latest/sui-adapter/src/adapter.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 130 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 (26 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs:94 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs:94-119 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs:1024-1049 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs` as WHOLE FILES: this scan already matched 35 separate duplicated blocks between them, totalling at least 484 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 (26 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/temporary_store.rs:1214 — sui-execution/historical-versions/v3/sui-adapter/src/temporary_store.rs:1214-1239 | sui-execution/latest/sui-adapter/src/temporary_store.rs:1397-1422 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/temporary_store.rs` and `sui-execution/latest/sui-adapter/src/temporary_store.rs` as WHOLE FILES: this scan already matched 32 separate duplicated blocks between them, totalling at least 517 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 (26 lines × 2) sui-execution/historical-versions/v3/sui-move-natives/src/crypto/ecdsa_k1.rs:326 — sui-execution/historical-versions/v3/sui-move-natives/src/crypto/ecdsa_k1.rs:326-351 | sui-execution/latest/sui-move-natives/src/crypto/ecdsa_k1.rs:328-353 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-move-natives/src/crypto/ecdsa_k1.rs` and `sui-execution/latest/sui-move-natives/src/crypto/ecdsa_k1.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 212 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 (26 lines × 2) sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs:271 — sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs:271-296 | sui-execution/latest/sui-move-natives/src/crypto/group_ops.rs:274-299 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs` and `sui-execution/latest/sui-move-natives/src/crypto/group_ops.rs` as WHOLE FILES: this scan already matched 33 separate duplicated blocks between them, totalling at least 590 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 (26 lines × 2) sui-execution/historical-versions/v3/sui-move-natives/src/transfer.rs:171 — sui-execution/historical-versions/v3/sui-move-natives/src/transfer.rs:171-196 | sui-execution/latest/sui-move-natives/src/transfer.rs:193-218 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-move-natives/src/transfer.rs` and `sui-execution/latest/sui-move-natives/src/transfer.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 122 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (20 lines × 3) · ×10
  • Duplicated block (20 lines × 3) REDACTED:318 — REDACTED:318-337 | REDACTED:322-341 | REDACTED:328-347 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 54 separate duplicated blocks between them, totalling at least 1035 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 (20 lines × 3) REDACTED:1088 — REDACTED:1088-1107 | REDACTED:1007-1026 | REDACTED:1019-1038 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 54 separate duplicated blocks between them, totalling at least 1035 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 (20 lines × 3) sui-execution/historical-versions/v0/sui-move-natives/src/address.rs:30 — sui-execution/historical-versions/v0/sui-move-natives/src/address.rs:30-49 | sui-execution/historical-versions/v1/sui-move-natives/src/address.rs:30-49 | sui-execution/historical-versions/v2/sui-move-natives/src/address.rs:30-49 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/address.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/address.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 108 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 (20 lines × 3) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/hash.rs:119 — sui-execution/historical-versions/v0/sui-move-natives/src/crypto/hash.rs:119-138 | sui-execution/historical-versions/v1/sui-move-natives/src/crypto/hash.rs:119-138 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/hash.rs:119-138 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/crypto/hash.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/crypto/hash.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 75 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 (20 lines × 3) sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:1106 — sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:1106-1125 | sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs:1163-1182 | sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/context.rs:1766-1785 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs` and `sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs` as WHOLE FILES: this scan already matched 61 separate duplicated blocks between them, totalling at least 1074 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 (20 lines × 3) REDACTED:391 — REDACTED:391-410 | REDACTED:397-416 | REDACTED:571-590 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 77 separate duplicated blocks between them, totalling at least 1502 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 (20 lines × 3) REDACTED:447 — REDACTED:447-466 | REDACTED:453-472 | REDACTED:627-646 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 77 separate duplicated blocks between them, totalling at least 1502 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 (20 lines × 3) sui-execution/historical-versions/v2/sui-adapter/src/temporary_store.rs:602 — sui-execution/historical-versions/v2/sui-adapter/src/temporary_store.rs:602-621 | sui-execution/historical-versions/v3/sui-adapter/src/temporary_store.rs:562-581 | sui-execution/latest/sui-adapter/src/temporary_store.rs:955-974 — before extracting anything, compare `sui-execution/historical-versions/v2/sui-adapter/src/temporary_store.rs` and `sui-execution/historical-versions/v3/sui-adapter/src/temporary_store.rs` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 547 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 (20 lines × 3) sui-execution/historical-versions/v2/sui-move-natives/src/object_runtime/object_store.rs:215 — sui-execution/historical-versions/v2/sui-move-natives/src/object_runtime/object_store.rs:215-234 | sui-execution/historical-versions/v3/sui-move-natives/src/object_runtime/object_store.rs:286-305 | sui-execution/latest/sui-move-natives/src/object_runtime/object_store.rs:268-287 — before extracting anything, compare `sui-execution/historical-versions/v2/sui-move-natives/src/object_runtime/object_store.rs` and `sui-execution/historical-versions/v3/sui-move-natives/src/object_runtime/object_store.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 179 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 (20 lines × 3) sui-execution/historical-versions/v2/sui-move-natives/src/test_scenario.rs:364 — sui-execution/historical-versions/v2/sui-move-natives/src/test_scenario.rs:364-383 | sui-execution/historical-versions/v3/sui-move-natives/src/test_scenario.rs:494-513 | sui-execution/latest/sui-move-natives/src/test_scenario.rs:669-688 — before extracting anything, compare `sui-execution/historical-versions/v2/sui-move-natives/src/test_scenario.rs` and `sui-execution/historical-versions/v3/sui-move-natives/src/test_scenario.rs` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 432 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (11 lines × 3) · ×10
  • Duplicated block (11 lines × 3) crates/sui-benchmark/src/workloads/composite/operations.rs:325 — crates/sui-benchmark/src/workloads/composite/operations.rs:325-335 | crates/sui-benchmark/src/workloads/composite/operations.rs:1260-1270 | crates/sui-single-node-benchmark/src/tx_generator/send_funds_tx_generator.rs:58-68 — 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 (11 lines × 3) crates/sui-kvstore/src/bigtable/client/mod.rs:1005 — crates/sui-kvstore/src/bigtable/client/mod.rs:1005-1015 | crates/sui-kvstore/src/bigtable/client/mod.rs:1253-1263 | crates/sui-kvstore/src/bigtable/client/mod.rs:1294-1304 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (11 lines × 3) crates/typed-store/src/rocks/mod.rs:1938 — crates/typed-store/src/rocks/mod.rs:1938-1948 | crates/typed-store/src/rocks/mod.rs:1975-1985 | crates/typed-store/src/rocks/mod.rs:2008-2018 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (11 lines × 3) sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs:538 — sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs:538-548 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs:688-698 | sui-execution/latest/sui-move-natives/src/crypto/group_ops.rs:691-701 — before extracting anything, compare `sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs` and `sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 256 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (11 lines × 3) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs:572 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs:572-582 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs:736-746 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs:1522-1532 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs` as WHOLE FILES: this scan already matched 35 separate duplicated blocks between them, totalling at least 484 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (11 lines × 3) sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:922 — sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:922-932 | sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs:979-989 | sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/context.rs:1291-1301 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs` and `sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs` as WHOLE FILES: this scan already matched 61 separate duplicated blocks between them, totalling at least 1074 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (11 lines × 3) consensus/core/src/synchronizer.rs:459 — consensus/core/src/synchronizer.rs:459-469 | consensus/core/src/synchronizer.rs:472-482 | crates/sui-network/src/discovery/mod.rs:422-434 — 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 (11 lines × 3) crates/sui-proxy/src/peers.rs:909 — crates/sui-proxy/src/peers.rs:909-919 | crates/sui-proxy/src/peers.rs:983-993 | crates/sui-proxy/src/peers.rs:1045-1055 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (11 lines × 3) sui-execution/historical-versions/v2/sui-move-natives/src/test_scenario.rs:163 — sui-execution/historical-versions/v2/sui-move-natives/src/test_scenario.rs:163-173 | sui-execution/historical-versions/v3/sui-move-natives/src/test_scenario.rs:270-280 | sui-execution/latest/sui-move-natives/src/test_scenario.rs:413-423 — before extracting anything, compare `sui-execution/historical-versions/v2/sui-move-natives/src/test_scenario.rs` and `sui-execution/historical-versions/v3/sui-move-natives/src/test_scenario.rs` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 432 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (11 lines × 3) sui-execution/historical-versions/v2/sui-move-natives/src/test_utils.rs:23 — sui-execution/historical-versions/v2/sui-move-natives/src/test_utils.rs:23-33 | sui-execution/historical-versions/v3/sui-move-natives/src/test_utils.rs:23-33 | sui-execution/latest/sui-move-natives/src/test_utils.rs:23-33 — before extracting anything, compare `sui-execution/historical-versions/v2/sui-move-natives/src/test_utils.rs` and `sui-execution/historical-versions/v3/sui-move-natives/src/test_utils.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 36 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.
D2 · Cognitive Complexity · sui_kv_rpc · ×9
  • sui_kv_rpc::pipeline::chunks_with_watermarks (cognitive 50) crates/sui-kv-rpc/src/pipeline.rs:522 — sui_kv_rpc::pipeline::chunks_with_watermarks has cognitive complexity 50 (threshold 15). Drivers by points: if/else 11 (35 pts), match/switch 4 (12 pts), loops 2 (3 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.
  • sui_kv_rpc::render::transaction_to_response (cognitive 41) crates/sui-kv-rpc/src/render.rs:201 — sui_kv_rpc::render::transaction_to_response has cognitive complexity 41 (threshold 15). Drivers by points: if/else 17 (27 pts), loops 4 (9 pts), boolean chains 5 (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.
  • sui_kv_rpc::v2::list_transactions::list_transactions (cognitive 35) crates/sui-kv-rpc/src/v2/list_transactions.rs:83 — sui_kv_rpc::v2::list_transactions::list_transactions has cognitive complexity 35 (threshold 15). Drivers by points: if/else 12 (25 pts), match/switch 4 (9 pts), 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.
  • sui_kv_rpc::v2::list_events::list_events (cognitive 30) crates/sui-kv-rpc/src/v2/list_events.rs:79 — sui_kv_rpc::v2::list_events::list_events has cognitive complexity 30 (threshold 15). Drivers by points: if/else 14 (27 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • sui_kv_rpc::pipeline::pipelined_reads (cognitive 23) crates/sui-kv-rpc/src/pipeline.rs:311 — sui_kv_rpc::pipeline::pipelined_reads has cognitive complexity 23 (threshold 15). Drivers by points: if/else 3 (11 pts), loops 4 (8 pts), match/switch 2 (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.
  • sui_kv_rpc::v2::list_checkpoints::drive_rendered_checkpoints (cognitive 23) crates/sui-kv-rpc/src/v2/list_checkpoints.rs:327 — sui_kv_rpc::v2::list_checkpoints::drive_rendered_checkpoints has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (20 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • sui_kv_rpc::resolve::regroup_checkpoints (cognitive 20) crates/sui-kv-rpc/src/resolve.rs:316 — sui_kv_rpc::resolve::regroup_checkpoints has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (14 pts), match/switch 2 (5 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.
  • sui_kv_rpc::v2::get_object::batch_get_objects (cognitive 20) crates/sui-kv-rpc/src/v2/get_object.rs:49 — sui_kv_rpc::v2::get_object::batch_get_objects has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (13 pts), match/switch 2 (4 pts), loops 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • sui_kv_rpc::pipeline::plan_keyed_reads (cognitive 16) crates/sui-kv-rpc/src/pipeline.rs:972 — sui_kv_rpc::pipeline::plan_keyed_reads has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 4 (6 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D35 · Change Coupling · Change-coupling hub · ×9
  • Change-coupling hub: execution_engine.rs → execution_engine.rs, execution_engine.rs, execution_engine.rs sui-execution/latest/sui-adapter/src/execution_engine.rs — `sui-execution/latest/sui-adapter/src/execution_engine.rs` changes together with 3 other files — `sui-execution/historical-versions/v0/sui-adapter/src/execution_engine.rs`, `sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs`, `sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs` — none of which declares a dependency on it: one file is the hub of 3 separate couplings, not 3 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 3.
  • Change-coupling hub: test_network.rs → authority_service.rs, commit_syncer.rs, metrics.rs, observer_service.rs, observer_subscriber.rs, synchronizer.rs consensus/core/src/network/test_network.rs — `consensus/core/src/network/test_network.rs` changes together with 6 other files — `consensus/core/src/authority_service.rs`, `consensus/core/src/commit_syncer.rs`, `consensus/core/src/metrics.rs`, `consensus/core/src/observer_service.rs`, `consensus/core/src/observer_subscriber.rs`, `consensus/core/src/synchronizer.rs` — none of which declares a dependency on it: one file is the hub of 6 separate couplings, not 6 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 6.
  • Change-coupling hub: core.rs → base_committer.rs, round_prober.rs, test_dag.rs, threshold_clock.rs, node.rs consensus/core/src/core.rs — `consensus/core/src/core.rs` changes together with 5 other files — `consensus/core/src/base_committer.rs`, `consensus/core/src/round_prober.rs`, `consensus/core/src/test_dag.rs`, `consensus/core/src/threshold_clock.rs`, `consensus/simtests/src/node.rs` — none of which declares a dependency on it: one file is the hub of 5 separate couplings, not 5 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 5.
  • Change-coupling hub: lib.rs → rpc_config.rs, test_authority_builder.rs, tests.rs, node_config_builder.rs crates/sui-node/src/lib.rs — `crates/sui-node/src/lib.rs` changes together with 4 other files — `crates/sui-config/src/rpc_config.rs`, `crates/sui-core/src/authority/test_authority_builder.rs`, `crates/sui-network/src/discovery/tests.rs`, `crates/sui-swarm-config/src/node_config_builder.rs` — none of which declares a dependency on it: one file is the hub of 4 separate couplings, not 4 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 4.
  • Change-coupling hub: authority_service.rs → leader_timeout.rs, observer.rs, observer_subscriber.rs, subscriber.rs consensus/core/src/authority_service.rs — `consensus/core/src/authority_service.rs` changes together with 4 other files — `consensus/core/src/leader_timeout.rs`, `consensus/core/src/network/observer.rs`, `consensus/core/src/observer_subscriber.rs`, `consensus/core/src/subscriber.rs` — none of which declares a dependency on it: one file is the hub of 4 separate couplings, not 4 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 4.
  • Change-coupling hub: authority_server.rs → safe_client.rs, test_authority_clients.rs, metrics.rs crates/sui-core/src/authority_server.rs — `crates/sui-core/src/authority_server.rs` changes together with 3 other files — `crates/sui-core/src/safe_client.rs`, `crates/sui-core/src/test_authority_clients.rs`, `crates/sui-core/src/traffic_controller/metrics.rs` — none of which declares a dependency on it: one file is the hub of 3 separate couplings, not 3 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 3.
  • Change-coupling hub: synchronizer.rs → commit_syncer.rs, observer.rs, observer_subscriber.rs, round_prober.rs, subscriber.rs consensus/core/src/synchronizer.rs — `consensus/core/src/synchronizer.rs` changes together with 5 other files — `consensus/core/src/commit_syncer.rs`, `consensus/core/src/network/observer.rs`, `consensus/core/src/observer_subscriber.rs`, `consensus/core/src/round_prober.rs`, `consensus/core/src/subscriber.rs` — none of which declares a dependency on it: one file is the hub of 5 separate couplings, not 5 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 5.
  • Change-coupling hub: epoch_state.rs → authority.rs, lib.rs, network_config_builder.rs crates/simulacrum/src/epoch_state.rs — `crates/simulacrum/src/epoch_state.rs` changes together with 3 other files — `crates/sui-core/src/authority.rs`, `crates/sui-genesis-builder/src/lib.rs`, `crates/sui-swarm-config/src/network_config_builder.rs` — none of which declares a dependency on it: one file is the hub of 3 separate couplings, not 3 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 3.
  • Change-coupling hub: metrics.rs → block_manager.rs, leader_timeout.rs, round_prober.rs, subscriber.rs consensus/core/src/metrics.rs — `consensus/core/src/metrics.rs` changes together with 4 other files — `consensus/core/src/block_manager.rs`, `consensus/core/src/leader_timeout.rs`, `consensus/core/src/round_prober.rs`, `consensus/core/src/subscriber.rs` — none of which declares a dependency on it: one file is the hub of 4 separate couplings, not 4 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 4.
D4 · Code Duplication · Duplicated block (28 lines × 2) · ×9
  • Duplicated block (28 lines × 2) REDACTED:1317 — REDACTED:1317-1344 | REDACTED:1329-1356 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 77 separate duplicated blocks between them, totalling at least 1502 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (28 lines × 2) sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs:250 — sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs:250-277 | sui-execution/historical-versions/v2/sui-adapter/src/temporary_store.rs:268-295 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs` and `sui-execution/historical-versions/v2/sui-adapter/src/temporary_store.rs` as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 779 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (28 lines × 2) sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/object_store.rs:514 — sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/object_store.rs:514-541 | sui-execution/historical-versions/v2/sui-move-natives/src/object_runtime/object_store.rs:531-558 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/object_store.rs` and `sui-execution/historical-versions/v2/sui-move-natives/src/object_runtime/object_store.rs` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 415 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (28 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/trace_utils.rs:229 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/trace_utils.rs:229-256 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/trace_utils.rs:227-254 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/trace_utils.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/trace_utils.rs` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 272 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (28 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/drop_safety.rs:303 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/drop_safety.rs:303-330 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/verify/drop_safety.rs:306-333 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/drop_safety.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/verify/drop_safety.rs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 196 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (28 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/temporary_store.rs:164 — sui-execution/historical-versions/v3/sui-adapter/src/temporary_store.rs:164-191 | sui-execution/latest/sui-adapter/src/temporary_store.rs:334-361 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/temporary_store.rs` and `sui-execution/latest/sui-adapter/src/temporary_store.rs` as WHOLE FILES: this scan already matched 32 separate duplicated blocks between them, totalling at least 517 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (28 lines × 2) sui-execution/historical-versions/v3/sui-move-natives/src/config.rs:125 — sui-execution/historical-versions/v3/sui-move-natives/src/config.rs:125-152 | sui-execution/latest/sui-move-natives/src/config.rs:126-153 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-move-natives/src/config.rs` and `sui-execution/latest/sui-move-natives/src/config.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 104 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (28 lines × 2) sui-execution/historical-versions/v3/sui-move-natives/src/crypto/poseidon.rs:73 — sui-execution/historical-versions/v3/sui-move-natives/src/crypto/poseidon.rs:73-100 | sui-execution/latest/sui-move-natives/src/crypto/poseidon.rs:74-101 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-move-natives/src/crypto/poseidon.rs` and `sui-execution/latest/sui-move-natives/src/crypto/poseidon.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 75 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (28 lines × 2) sui-execution/historical-versions/v3/sui-move-natives/src/object_runtime/fingerprint.rs:72 — sui-execution/historical-versions/v3/sui-move-natives/src/object_runtime/fingerprint.rs:72-99 | sui-execution/latest/sui-move-natives/src/object_runtime/fingerprint.rs:57-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.
D4 · Code Duplication · Duplicated block (24 lines × 2) · ×9
  • Duplicated block (24 lines × 2) crates/sui-benchmark/src/workloads/composite/operations.rs:668 — crates/sui-benchmark/src/workloads/composite/operations.rs:668-691 | crates/sui-benchmark/src/workloads/composite/operations.rs:807-830 — both copies are in the same file, so extract the 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 (24 lines × 2) crates/sui-checkpoint-blob-indexer/src/config.rs:88 — crates/sui-checkpoint-blob-indexer/src/config.rs:88-111 | crates/sui-kvstore/src/config.rs:220-243 — before extracting anything, compare `crates/sui-checkpoint-blob-indexer/src/config.rs` and `crates/sui-kvstore/src/config.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 70 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 (24 lines × 2) crates/sui-core/src/authority/authority_store_pruner.rs:616 — crates/sui-core/src/authority/authority_store_pruner.rs:616-639 | crates/sui-core/src/authority/authority_store_pruner.rs:649-672 — both copies are in the same file, so extract the 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 (24 lines × 2) sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:1330 — sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:1330-1353 | sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs:1387-1410 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs` and `sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs` as WHOLE FILES: this scan already matched 61 separate duplicated blocks between them, totalling at least 1074 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 (24 lines × 2) sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/object_store.rs:223 — sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/object_store.rs:223-246 | sui-execution/historical-versions/v2/sui-move-natives/src/object_runtime/object_store.rs:226-249 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/object_store.rs` and `sui-execution/historical-versions/v2/sui-move-natives/src/object_runtime/object_store.rs` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 415 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 (24 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.rs:751 — sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.rs:751-774 | sui-execution/latest/sui-adapter/src/execution_engine.rs:1786-1809 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.rs` and `sui-execution/latest/sui-adapter/src/execution_engine.rs` as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 689 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 (24 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/context.rs:789 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/context.rs:789-812 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/context.rs:1084-1107 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/context.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/context.rs` as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 625 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 (24 lines × 2) sui-execution/historical-versions/v3/sui-move-natives/src/funds_accumulator.rs:69 — sui-execution/historical-versions/v3/sui-move-natives/src/funds_accumulator.rs:69-92 | sui-execution/latest/sui-move-natives/src/funds_accumulator.rs:77-100 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-move-natives/src/funds_accumulator.rs` and `sui-execution/latest/sui-move-natives/src/funds_accumulator.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 46 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 (24 lines × 2) sui-execution/historical-versions/v3/sui-move-natives/src/tx_context.rs:440 — sui-execution/historical-versions/v3/sui-move-natives/src/tx_context.rs:440-463 | sui-execution/latest/sui-move-natives/src/tx_context.rs:442-465 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-move-natives/src/tx_context.rs` and `sui-execution/latest/sui-move-natives/src/tx_context.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 258 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (19 lines × 3) · ×9
  • Duplicated block (19 lines × 3) sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/context.rs:847 — sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/context.rs:847-865 | sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:780-798 | sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs:837-855 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/context.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 378 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (19 lines × 3) REDACTED:709 — REDACTED:709-727 | REDACTED:656-674 | REDACTED:662-680 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 54 separate duplicated blocks between them, totalling at least 1035 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (19 lines × 3) sui-execution/historical-versions/v0/sui-adapter/src/temporary_store.rs:278 — sui-execution/historical-versions/v0/sui-adapter/src/temporary_store.rs:278-296 | sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs:313-331 | sui-execution/historical-versions/v2/sui-adapter/src/temporary_store.rs:331-349 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/temporary_store.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 195 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (19 lines × 3) REDACTED:514 — REDACTED:514-532 | REDACTED:520-538 | REDACTED:696-714 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 77 separate duplicated blocks between them, totalling at least 1502 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (19 lines × 3) REDACTED:542 — REDACTED:542-560 | REDACTED:548-566 | REDACTED:724-742 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 77 separate duplicated blocks between them, totalling at least 1502 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (19 lines × 3) REDACTED:1214 — REDACTED:1214-1232 | REDACTED:1226-1244 | REDACTED:1497-1515 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 77 separate duplicated blocks between them, totalling at least 1502 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (19 lines × 3) sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs:596 — sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs:596-614 | sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.rs:707-725 | sui-execution/latest/sui-adapter/src/execution_engine.rs:1744-1762 — before extracting anything, compare `sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs` and `sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.rs` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 603 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (19 lines × 3) sui-execution/historical-versions/v2/sui-move-natives/src/object_runtime/mod.rs:186 — sui-execution/historical-versions/v2/sui-move-natives/src/object_runtime/mod.rs:186-204 | sui-execution/historical-versions/v3/sui-move-natives/src/object_runtime/mod.rs:220-238 | sui-execution/latest/sui-move-natives/src/object_runtime/mod.rs:346-364 — before extracting anything, compare `sui-execution/historical-versions/v2/sui-move-natives/src/object_runtime/mod.rs` and `sui-execution/historical-versions/v3/sui-move-natives/src/object_runtime/mod.rs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 263 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (19 lines × 3) sui-execution/historical-versions/v0/sui-verifier/src/lib.rs:21 — sui-execution/historical-versions/v0/sui-verifier/src/lib.rs:21-39 | sui-execution/historical-versions/v1/sui-verifier/src/lib.rs:21-39 | sui-execution/historical-versions/v2/sui-verifier/src/lib.rs:21-39 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
D4 · Code Duplication · Duplicated block (18 lines × 4) · ×9
  • Duplicated block (18 lines × 4) sui-execution/historical-versions/v0/sui-adapter/src/execution_engine.rs:640 — sui-execution/historical-versions/v0/sui-adapter/src/execution_engine.rs:640-657 | sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs:845-862 | sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs:872-889 | sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.rs:1001-1018 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/execution_engine.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 531 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 (18 lines × 4) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_k1.rs:155 — sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_k1.rs:155-172 | sui-execution/historical-versions/v1/sui-move-natives/src/crypto/ecdsa_k1.rs:155-172 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/ecdsa_k1.rs:155-172 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/ecdsa_k1.rs:164-181 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_k1.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/crypto/ecdsa_k1.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 263 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 (18 lines × 4) sui-execution/historical-versions/v0/sui-move-natives/src/dynamic_field.rs:347 — sui-execution/historical-versions/v0/sui-move-natives/src/dynamic_field.rs:347-364 | sui-execution/historical-versions/v1/sui-move-natives/src/dynamic_field.rs:346-363 | sui-execution/historical-versions/v2/sui-move-natives/src/dynamic_field.rs:346-363 | sui-execution/historical-versions/v3/sui-move-natives/src/dynamic_field.rs:375-392 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/dynamic_field.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/dynamic_field.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 384 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 (18 lines × 4) sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs:1029 — sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs:1029-1046 | sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs:1071-1088 | sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.rs:1334-1351 | sui-execution/latest/sui-adapter/src/execution_engine.rs:2332-2349 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs` and `sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs` as WHOLE FILES: this scan already matched 39 separate duplicated blocks between them, totalling at least 959 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 (18 lines × 4) REDACTED:688 — REDACTED:688-705 | REDACTED:694-711 | REDACTED:933-950 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/context.rs:2602-2619 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 77 separate duplicated blocks between them, totalling at least 1502 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 (18 lines × 4) sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs:430 — sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs:430-447 | sui-execution/historical-versions/v2/sui-adapter/src/temporary_store.rs:450-467 | sui-execution/historical-versions/v3/sui-adapter/src/temporary_store.rs:418-435 | sui-execution/latest/sui-adapter/src/temporary_store.rs:675-692 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs` and `sui-execution/historical-versions/v2/sui-adapter/src/temporary_store.rs` as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 779 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 (18 lines × 4) sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs:812 — sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs:812-829 | sui-execution/historical-versions/v2/sui-adapter/src/temporary_store.rs:864-881 | sui-execution/historical-versions/v3/sui-adapter/src/temporary_store.rs:847-864 | sui-execution/latest/sui-adapter/src/temporary_store.rs:1137-1154 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs` and `sui-execution/historical-versions/v2/sui-adapter/src/temporary_store.rs` as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 779 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 (18 lines × 4) sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs:1087 — sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs:1087-1104 | sui-execution/historical-versions/v2/sui-adapter/src/temporary_store.rs:1139-1156 | sui-execution/historical-versions/v3/sui-adapter/src/temporary_store.rs:1137-1158 | sui-execution/latest/sui-adapter/src/temporary_store.rs:1197-1218 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs` and `sui-execution/historical-versions/v2/sui-adapter/src/temporary_store.rs` as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 779 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 (18 lines × 4) sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs:560 — sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs:560-577 | sui-execution/historical-versions/v2/sui-adapter/src/temporary_store.rs:602-619 | sui-execution/historical-versions/v3/sui-adapter/src/temporary_store.rs:562-579 | sui-execution/latest/sui-adapter/src/temporary_store.rs:955-972 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs` and `sui-execution/historical-versions/v2/sui-adapter/src/temporary_store.rs` as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 779 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (11 lines × 4) · ×9
  • Duplicated block (11 lines × 4) crates/sui-indexer-alt/src/handlers/tx_affected_addresses.rs:36 — crates/sui-indexer-alt/src/handlers/tx_affected_addresses.rs:36-46 | crates/sui-indexer-alt/src/handlers/tx_affected_objects.rs:32-42 | crates/sui-indexer-alt/src/handlers/tx_balance_changes.rs:37-47 | crates/sui-indexer-alt/src/handlers/tx_kinds.rs:32-42 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once.
  • Duplicated block (11 lines × 4) sui-execution/historical-versions/v0/sui-adapter/src/execution_value.rs:258 — sui-execution/historical-versions/v0/sui-adapter/src/execution_value.rs:258-268 | sui-execution/historical-versions/v1/sui-adapter/src/execution_value.rs:258-268 | sui-execution/historical-versions/v2/sui-adapter/src/execution_value.rs:258-268 | sui-execution/historical-versions/v3/sui-adapter/src/execution_value.rs:341-351 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/execution_value.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/execution_value.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 64 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (11 lines × 4) REDACTED:936 — REDACTED:936-946 | REDACTED:858-868 | REDACTED:870-880 | REDACTED:1095-1105 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 54 separate duplicated blocks between them, totalling at least 1035 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (11 lines × 4) sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs:590 — sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs:590-600 | sui-execution/historical-versions/v2/sui-adapter/src/temporary_store.rs:632-642 | sui-execution/historical-versions/v3/sui-adapter/src/temporary_store.rs:597-607 | sui-execution/latest/sui-adapter/src/temporary_store.rs:990-1000 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs` and `sui-execution/historical-versions/v2/sui-adapter/src/temporary_store.rs` as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 779 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (11 lines × 4) sui-execution/historical-versions/v1/sui-move-natives/src/crypto/zklogin.rs:92 — sui-execution/historical-versions/v1/sui-move-natives/src/crypto/zklogin.rs:92-102 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/zklogin.rs:92-102 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/zklogin.rs:90-100 | sui-execution/latest/sui-move-natives/src/crypto/zklogin.rs:93-103 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-move-natives/src/crypto/zklogin.rs` and `sui-execution/historical-versions/v2/sui-move-natives/src/crypto/zklogin.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 95 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (11 lines × 4) sui-execution/historical-versions/v1/sui-move-natives/src/event.rs:81 — sui-execution/historical-versions/v1/sui-move-natives/src/event.rs:81-91 | sui-execution/historical-versions/v2/sui-move-natives/src/event.rs:81-95 | sui-execution/historical-versions/v3/sui-move-natives/src/event.rs:164-178 | sui-execution/latest/sui-move-natives/src/event.rs:165-179 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-move-natives/src/event.rs` and `sui-execution/historical-versions/v2/sui-move-natives/src/event.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 124 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (11 lines × 4) sui-execution/historical-versions/v3/sui-move-natives/src/crypto/groth16.rs:46 — sui-execution/historical-versions/v3/sui-move-natives/src/crypto/groth16.rs:46-56 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/groth16.rs:133-145 | sui-execution/latest/sui-move-natives/src/crypto/groth16.rs:49-59 | sui-execution/latest/sui-move-natives/src/crypto/groth16.rs:157-169 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-move-natives/src/crypto/groth16.rs` and `sui-execution/latest/sui-move-natives/src/crypto/groth16.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 121 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (11 lines × 4) sui-execution/latest/sui-move-natives/src/crypto/ecdsa_k1.rs:121 — sui-execution/latest/sui-move-natives/src/crypto/ecdsa_k1.rs:121-131 | sui-execution/latest/sui-move-natives/src/crypto/ecdsa_k1.rs:272-282 | sui-execution/latest/sui-move-natives/src/crypto/ecdsa_r1.rs:113-123 | sui-execution/latest/sui-move-natives/src/crypto/ecdsa_r1.rs:222-232 — before extracting anything, compare `sui-execution/latest/sui-move-natives/src/crypto/ecdsa_k1.rs` and `sui-execution/latest/sui-move-natives/src/crypto/ecdsa_r1.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 151 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (11 lines × 4) REDACTED:1562 — REDACTED:1562-1572 | REDACTED:1519-1529 | REDACTED:1531-1541 | REDACTED:2015-2025 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 54 separate duplicated blocks between them, totalling at least 1035 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.
D17 · Explicit Debt · FixmeComment · ×8
  • FixmeComment sui-execution/latest/sui-adapter/src/execution_engine.rs:421 — // FIXME: we cannot fail the transaction if this is an epoch change transaction. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment sui-execution/latest/sui-adapter/src/execution_engine.rs:1170 — // FIXME: we cannot fail the transaction if this is an epoch change transaction. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.rs:384 — // FIXME: we cannot fail the transaction if this is an epoch change transaction. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs:307 — // FIXME: we cannot fail the transaction if this is an epoch change transaction. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs:287 — // FIXME: we cannot fail the transaction if this is an epoch change transaction. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment crates/sui-swarm-config/src/network_config_builder.rs:156 — // FIXME: A network with only 1 validator does not have liveness. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment crates/sui-core/src/accumulators/object_funds_checker/mod.rs:240 — // FIXME: We need to also track the amount of gas that was used, — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment crates/sui/tests/cli_tests.rs:1060 — // FIXME: uncomment once we figure out what is going on with `resolve_and_type_check` — 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.
D2 · Cognitive Complexity · sui_adapter_v3 · ×8
  • sui_adapter_v3::programmable_transactions::context::checked::finish (cognitive 43) sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/context.rs:1417 — sui_adapter_v3::programmable_transactions::context::checked::finish has cognitive complexity 43 (threshold 15). Drivers by points: if/else 18 (38 pts), loops 3 (4 pts), match/switch 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.
  • sui_adapter_v3::programmable_transactions::execution::checked::execute_command (cognitive 32) REDACTED:202 — sui_adapter_v3::programmable_transactions::execution::checked::execute_command has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (19 pts), loops 4 (8 pts), match/switch 3 (4 pts), boolean chains 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.
  • sui_adapter_v3::static_programmable_transactions::execution::interpreter::execute_command (cognitive 29) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/interpreter.rs:146 — sui_adapter_v3::static_programmable_transactions::execution::interpreter::execute_command has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (22 pts), loops 3 (6 pts), 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.
  • sui_adapter_v3::execution_engine::checked::execution_loop (cognitive 23) sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.rs:547 — sui_adapter_v3::execution_engine::checked::execution_loop has cognitive complexity 23 (threshold 15). Drivers by points: if/else 4 (12 pts), match/switch 3 (7 pts), loops 2 (4 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.
  • sui_adapter_v3::static_programmable_transactions::typing::invariant_checks::type_check::command (cognitive 23) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/type_check.rs:132 — sui_adapter_v3::static_programmable_transactions::typing::invariant_checks::type_check::command has cognitive complexity 23 (threshold 15). Drivers by points: loops 7 (13 pts), if/else 5 (9 pts), 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.
  • sui_adapter_v3::programmable_transactions::execution::checked::check_param_type (cognitive 20) REDACTED:1553 — sui_adapter_v3::programmable_transactions::execution::checked::check_param_type has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 2, match/switch 1 (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • sui_adapter_v3::programmable_transactions::execution::checked::build_move_args (cognitive 18) REDACTED:1450 — sui_adapter_v3::programmable_transactions::execution::checked::build_move_args has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), match/switch 2 (3 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.
  • sui_adapter_v3::static_programmable_transactions::typing::translate::locations (cognitive 16) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/translate.rs:623 — sui_adapter_v3::static_programmable_transactions::typing::translate::locations has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 1, match/switch 1 (nesting depth added 7). Most of this is not in the body itself: 3 of the 16 points are its own statements and the rest belongs to one function item inside it that branches (splat_arg). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D36 · Supply-chain Provenance & Signing · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Duplicated block (17 lines × 3) · ×8
  • Duplicated block (17 lines × 3) REDACTED:229 — REDACTED:229-245 | REDACTED:233-249 | REDACTED:239-255 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 54 separate duplicated blocks between them, totalling at least 1035 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (17 lines × 3) REDACTED:873 — REDACTED:873-889 | REDACTED:806-822 | REDACTED:812-828 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 54 separate duplicated blocks between them, totalling at least 1035 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (17 lines × 3) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/hash.rs:79 — sui-execution/historical-versions/v0/sui-move-natives/src/crypto/hash.rs:79-95 | sui-execution/historical-versions/v1/sui-move-natives/src/crypto/hash.rs:79-95 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/hash.rs:79-95 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/crypto/hash.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/crypto/hash.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 75 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (17 lines × 3) sui-execution/historical-versions/v0/sui-move-natives/src/object.rs:31 — sui-execution/historical-versions/v0/sui-move-natives/src/object.rs:31-47 | sui-execution/historical-versions/v1/sui-move-natives/src/object.rs:31-47 | sui-execution/historical-versions/v2/sui-move-natives/src/object.rs:31-47 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/object.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/object.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 61 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (17 lines × 3) sui-execution/historical-versions/v0/sui-move-natives/src/object_runtime/object_store.rs:455 — sui-execution/historical-versions/v0/sui-move-natives/src/object_runtime/object_store.rs:455-471 | sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/object_store.rs:598-614 | sui-execution/historical-versions/v2/sui-move-natives/src/object_runtime/object_store.rs:620-636 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/object_runtime/object_store.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/object_store.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 237 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (17 lines × 3) sui-execution/historical-versions/v0/sui-move-natives/src/transfer.rs:35 — sui-execution/historical-versions/v0/sui-move-natives/src/transfer.rs:35-51 | sui-execution/historical-versions/v1/sui-move-natives/src/transfer.rs:121-137 | sui-execution/historical-versions/v2/sui-move-natives/src/transfer.rs:121-137 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/transfer.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/transfer.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 115 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (17 lines × 3) sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:191 — sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:191-207 | sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs:196-212 | sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/context.rs:232-248 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs` and `sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs` as WHOLE FILES: this scan already matched 61 separate duplicated blocks between them, totalling at least 1074 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (17 lines × 3) sui-execution/historical-versions/v2/sui-move-natives/src/test_scenario.rs:266 — sui-execution/historical-versions/v2/sui-move-natives/src/test_scenario.rs:266-282 | sui-execution/historical-versions/v3/sui-move-natives/src/test_scenario.rs:393-409 | sui-execution/latest/sui-move-natives/src/test_scenario.rs:568-584 — before extracting anything, compare `sui-execution/historical-versions/v2/sui-move-natives/src/test_scenario.rs` and `sui-execution/historical-versions/v3/sui-move-natives/src/test_scenario.rs` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 432 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (13 lines × 4) · ×8
  • Duplicated block (13 lines × 4) REDACTED:241 — REDACTED:241-253 | REDACTED:245-257 | REDACTED:251-263 | REDACTED:387-399 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 54 separate duplicated blocks between them, totalling at least 1035 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (13 lines × 4) REDACTED:390 — REDACTED:390-402 | REDACTED:394-406 | REDACTED:400-412 | REDACTED:574-586 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 54 separate duplicated blocks between them, totalling at least 1035 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (13 lines × 4) sui-execution/historical-versions/v0/sui-move-natives/src/tx_context.rs:36 — sui-execution/historical-versions/v0/sui-move-natives/src/tx_context.rs:36-48 | sui-execution/historical-versions/v1/sui-move-natives/src/tx_context.rs:36-48 | sui-execution/historical-versions/v2/sui-move-natives/src/tx_context.rs:36-48 | sui-execution/historical-versions/v3/sui-move-natives/src/tx_context.rs:37-49 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times.
  • Duplicated block (13 lines × 4) sui-execution/historical-versions/v1/sui-move-natives/src/crypto/zklogin.rs:195 — sui-execution/historical-versions/v1/sui-move-natives/src/crypto/zklogin.rs:195-207 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/zklogin.rs:195-207 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/zklogin.rs:191-203 | sui-execution/latest/sui-move-natives/src/crypto/zklogin.rs:194-206 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-move-natives/src/crypto/zklogin.rs` and `sui-execution/historical-versions/v2/sui-move-natives/src/crypto/zklogin.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 95 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (13 lines × 4) sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/mod.rs:481 — sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/mod.rs:481-493 | sui-execution/historical-versions/v2/sui-move-natives/src/object_runtime/mod.rs:443-455 | sui-execution/historical-versions/v3/sui-move-natives/src/object_runtime/mod.rs:617-629 | sui-execution/latest/sui-move-natives/src/object_runtime/mod.rs:820-832 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/mod.rs` and `sui-execution/historical-versions/v2/sui-move-natives/src/object_runtime/mod.rs` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 314 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (13 lines × 4) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/translate.rs:228 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/translate.rs:228-240 | sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/translate.rs:260-272 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/translate.rs:243-255 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/translate.rs:275-287 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/translate.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/translate.rs` as WHOLE FILES: this scan already matched 40 separate duplicated blocks between them, totalling at least 589 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (13 lines × 4) sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs:462 — sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs:462-474 | sui-execution/historical-versions/v2/sui-adapter/src/temporary_store.rs:480-492 | sui-execution/historical-versions/v3/sui-adapter/src/temporary_store.rs:448-460 | sui-execution/latest/sui-adapter/src/temporary_store.rs:705-717 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs` and `sui-execution/historical-versions/v2/sui-adapter/src/temporary_store.rs` as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 779 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (13 lines × 4) sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs:523 — sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs:523-535 | sui-execution/historical-versions/v1/sui-move-natives/src/test_scenario.rs:518-530 | sui-execution/historical-versions/v2/sui-move-natives/src/test_scenario.rs:520-532 | sui-execution/historical-versions/v3/sui-move-natives/src/test_scenario.rs:773-785 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/test_scenario.rs` as WHOLE FILES: this scan already matched 35 separate duplicated blocks between them, totalling at least 619 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (13 lines × 3) · ×8
  • Duplicated block (13 lines × 3) crates/sui-display/src/v2/parser.rs:660 — crates/sui-display/src/v2/parser.rs:660-672 | crates/sui-display/src/v2/parser.rs:921-933 | crates/sui-display/src/v2/parser.rs:1066-1078 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (13 lines × 3) crates/sui-kv-rpc/src/v2/list_checkpoints.rs:122 — crates/sui-kv-rpc/src/v2/list_checkpoints.rs:122-134 | crates/sui-kv-rpc/src/v2/list_events.rs:96-108 | crates/sui-kv-rpc/src/v2/list_transactions.rs:104-116 — before extracting anything, compare `crates/sui-kv-rpc/src/v2/list_checkpoints.rs` and `crates/sui-kv-rpc/src/v2/list_events.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.
  • Duplicated block (13 lines × 3) sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/context.rs:299 — sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/context.rs:299-311 | sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:283-295 | sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs:288-300 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/context.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 378 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (13 lines × 3) sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:972 — sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:972-984 | sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs:1029-1041 | sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/context.rs:1618-1630 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs` and `sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs` as WHOLE FILES: this scan already matched 61 separate duplicated blocks between them, totalling at least 1074 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (13 lines × 3) sui-execution/historical-versions/v2/sui-move-natives/src/object_runtime/object_store.rs:298 — sui-execution/historical-versions/v2/sui-move-natives/src/object_runtime/object_store.rs:298-310 | sui-execution/historical-versions/v3/sui-move-natives/src/object_runtime/object_store.rs:392-404 | sui-execution/latest/sui-move-natives/src/object_runtime/object_store.rs:370-382 — before extracting anything, compare `sui-execution/historical-versions/v2/sui-move-natives/src/object_runtime/object_store.rs` and `sui-execution/historical-versions/v3/sui-move-natives/src/object_runtime/object_store.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 179 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (13 lines × 3) crates/sui/src/client_commands.rs:2836 — crates/sui/src/client_commands.rs:2836-2848 | crates/sui/src/external_signer.rs:137-149 | crates/sui/src/keytool.rs:1461-1473 — 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 (13 lines × 3) crates/sui-indexer-alt-e2e-tests/src/coin_registry.rs:447 — crates/sui-indexer-alt-e2e-tests/src/coin_registry.rs:447-459 | crates/sui-indexer-alt-e2e-tests/src/coin_registry.rs:501-513 | crates/sui-indexer-alt-e2e-tests/src/coin_registry.rs:557-569 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (13 lines × 3) sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs:263 — sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs:263-275 | sui-execution/historical-versions/v1/sui-move-natives/src/test_scenario.rs:258-270 | sui-execution/historical-versions/v2/sui-move-natives/src/test_scenario.rs:260-272 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/test_scenario.rs` as WHOLE FILES: this scan already matched 35 separate duplicated blocks between them, totalling at least 619 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (11–12 lines × 2) · ×8
  • Duplicated block (11–12 lines × 2) crates/mysten-network/src/client.rs:128 — crates/mysten-network/src/client.rs:128-138 | crates/mysten-network/src/client.rs:141-152 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11–12 lines × 2) crates/sui-core/src/storage.rs:643 — crates/sui-core/src/storage.rs:643-654 | crates/sui-core/src/storage.rs:933-943 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11–12 lines × 2) crates/sui-indexer-alt-graphql/src/api/types/checkpoint/filter.rs:68 — crates/sui-indexer-alt-graphql/src/api/types/checkpoint/filter.rs:68-78 | crates/sui-indexer-alt-graphql/src/api/types/transaction/filter.rs:156-167 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (11–12 lines × 2) crates/sui-kv-rpc/src/v2/get_object.rs:58 — crates/sui-kv-rpc/src/v2/get_object.rs:58-68 | crates/sui-rpc-api/src/grpc/v2/ledger_service/get_object.rs:88-99 — 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–12 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/drop_safety.rs:291 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/drop_safety.rs:291-301 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/verify/drop_safety.rs:293-304 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/drop_safety.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/verify/drop_safety.rs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 196 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (11–12 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/memory_safety.rs:262 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/memory_safety.rs:262-272 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/verify/memory_safety.rs:282-293 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/memory_safety.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/verify/memory_safety.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 120 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (11–12 lines × 2) sui-execution/historical-versions/v3/sui-move-natives/src/funds_accumulator.rs:31 — sui-execution/historical-versions/v3/sui-move-natives/src/funds_accumulator.rs:31-41 | sui-execution/historical-versions/v3/sui-move-natives/src/funds_accumulator.rs:110-121 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11–12 lines × 2) sui-execution/latest/sui-move-natives/src/funds_accumulator.rs:50 — sui-execution/latest/sui-move-natives/src/funds_accumulator.rs:50-60 | sui-execution/latest/sui-move-natives/src/funds_accumulator.rs:122-133 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (7 lines × 5) · ×8
  • Duplicated block (7 lines × 5) sui-execution/historical-versions/v0/sui-adapter/src/execution_engine.rs:506 — sui-execution/historical-versions/v0/sui-adapter/src/execution_engine.rs:506-512 | sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs:710-716 | sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs:737-743 | sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.rs:861-867 | sui-execution/latest/sui-adapter/src/execution_engine.rs:1895-1901 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/execution_engine.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 531 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 × 5) sui-execution/historical-versions/v0/sui-verifier/src/id_leak_verifier.rs:352 — sui-execution/historical-versions/v0/sui-verifier/src/id_leak_verifier.rs:352-358 | sui-execution/historical-versions/v1/sui-verifier/src/id_leak_verifier.rs:326-332 | sui-execution/historical-versions/v2/sui-verifier/src/id_leak_verifier.rs:341-347 | sui-execution/historical-versions/v3/sui-verifier/src/id_leak_verifier.rs:365-371 | sui-execution/latest/sui-verifier/src/id_leak_verifier.rs:371-377 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-verifier/src/id_leak_verifier.rs` and `sui-execution/historical-versions/v1/sui-verifier/src/id_leak_verifier.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 350 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 × 5) sui-execution/historical-versions/v0/sui-adapter/src/gas_meter.rs:214 — sui-execution/historical-versions/v0/sui-adapter/src/gas_meter.rs:214-220 | sui-execution/historical-versions/v1/sui-adapter/src/gas_meter.rs:214-220 | sui-execution/historical-versions/v2/sui-adapter/src/gas_meter.rs:214-220 | sui-execution/historical-versions/v3/sui-adapter/src/gas_meter.rs:225-231 | sui-execution/latest/sui-adapter/src/gas_meter.rs:244-250 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/gas_meter.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/gas_meter.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 155 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 × 5) sui-execution/historical-versions/v0/sui-adapter/src/gas_meter.rs:289 — sui-execution/historical-versions/v0/sui-adapter/src/gas_meter.rs:289-295 | sui-execution/historical-versions/v1/sui-adapter/src/gas_meter.rs:289-295 | sui-execution/historical-versions/v2/sui-adapter/src/gas_meter.rs:289-295 | sui-execution/historical-versions/v3/sui-adapter/src/gas_meter.rs:308-314 | sui-execution/latest/sui-adapter/src/gas_meter.rs:326-332 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/gas_meter.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/gas_meter.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 155 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 × 5) sui-execution/historical-versions/v0/sui-verifier/src/id_leak_verifier.rs:273 — sui-execution/historical-versions/v0/sui-verifier/src/id_leak_verifier.rs:273-279 | sui-execution/historical-versions/v1/sui-verifier/src/id_leak_verifier.rs:247-253 | sui-execution/historical-versions/v2/sui-verifier/src/id_leak_verifier.rs:262-268 | sui-execution/historical-versions/v3/sui-verifier/src/id_leak_verifier.rs:289-295 | sui-execution/latest/sui-verifier/src/id_leak_verifier.rs:295-301 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-verifier/src/id_leak_verifier.rs` and `sui-execution/historical-versions/v1/sui-verifier/src/id_leak_verifier.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 350 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 × 5) crates/sui-indexer-alt-graphql/src/api/scalars/cursor.rs:105 — crates/sui-indexer-alt-graphql/src/api/scalars/cursor.rs:105-111 | crates/sui-indexer-alt-graphql/src/api/scalars/cursor.rs:129-135 | crates/sui-indexer-alt-graphql/src/api/scalars/cursor.rs:155-161 | crates/sui-indexer-alt-graphql/src/api/scalars/cursor.rs:179-185 | crates/sui-indexer-alt-graphql/src/api/scalars/id.rs:54-60 — 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.
  • Duplicated block (7 lines × 5) crates/sui-rpc-store/src/indexer/checkpoint_contents.rs:56 — crates/sui-rpc-store/src/indexer/checkpoint_contents.rs:56-62 | crates/sui-rpc-store/src/indexer/checkpoint_summary.rs:61-67 | crates/sui-rpc-store/src/indexer/effects.rs:60-66 | crates/sui-rpc-store/src/indexer/events.rs:62-68 | crates/sui-rpc-store/src/indexer/transactions.rs:59-65 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 5 call sites, so a change lands once.
  • Duplicated block (7 lines × 5) crates/sui-indexer-alt-graphql/src/api/types/transaction_effects.rs:205 — crates/sui-indexer-alt-graphql/src/api/types/transaction_effects.rs:205-211 | crates/sui-indexer-alt-graphql/src/api/types/transaction_effects.rs:246-252 | crates/sui-indexer-alt-graphql/src/api/types/transaction_effects.rs:324-330 | crates/sui-indexer-alt-graphql/src/api/types/transaction_effects.rs:365-371 | crates/sui-indexer-alt-graphql/src/api/types/transaction_effects.rs:396-402 — 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.
D4 · Code Duplication · Duplicated block (6 lines × 4) · ×8
  • Duplicated block (6 lines × 4) crates/sui-consistent-store/src/batch.rs:152 — crates/sui-consistent-store/src/batch.rs:152-157 | crates/sui-consistent-store/src/batch.rs:174-179 | crates/sui-consistent-store/src/batch.rs:216-221 | crates/sui-consistent-store/src/batch.rs:260-265 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (6 lines × 4) sui-execution/historical-versions/v0/sui-adapter/src/gas_meter.rs:25 — sui-execution/historical-versions/v0/sui-adapter/src/gas_meter.rs:25-30 | sui-execution/historical-versions/v1/sui-adapter/src/gas_meter.rs:25-30 | sui-execution/historical-versions/v2/sui-adapter/src/gas_meter.rs:25-30 | sui-execution/historical-versions/v3/sui-adapter/src/gas_meter.rs:27-32 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/gas_meter.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/gas_meter.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 155 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 4) REDACTED:199 — REDACTED:199-204 | REDACTED:203-208 | REDACTED:209-214 | REDACTED:329-334 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 54 separate duplicated blocks between them, totalling at least 1035 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 4) REDACTED:223 — REDACTED:223-228 | REDACTED:227-232 | REDACTED:233-238 | REDACTED:358-363 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 54 separate duplicated blocks between them, totalling at least 1035 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 4) REDACTED:1452 — REDACTED:1452-1457 | REDACTED:1409-1414 | REDACTED:1421-1426 | REDACTED:1837-1842 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 54 separate duplicated blocks between them, totalling at least 1035 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 4) sui-execution/historical-versions/v0/sui-adapter/src/execution_value.rs:134 — sui-execution/historical-versions/v0/sui-adapter/src/execution_value.rs:134-139 | sui-execution/historical-versions/v1/sui-adapter/src/execution_value.rs:134-139 | sui-execution/historical-versions/v2/sui-adapter/src/execution_value.rs:134-139 | sui-execution/historical-versions/v3/sui-adapter/src/execution_value.rs:157-162 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/execution_value.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/execution_value.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 64 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 4) sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs:454 — sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs:454-459 | sui-execution/historical-versions/v2/sui-adapter/src/temporary_store.rs:472-477 | sui-execution/historical-versions/v3/sui-adapter/src/temporary_store.rs:440-445 | sui-execution/latest/sui-adapter/src/temporary_store.rs:697-702 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs` and `sui-execution/historical-versions/v2/sui-adapter/src/temporary_store.rs` as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 779 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 4) sui-execution/historical-versions/v1/sui-move-natives/src/test_scenario.rs:112 — sui-execution/historical-versions/v1/sui-move-natives/src/test_scenario.rs:112-117 | sui-execution/historical-versions/v2/sui-move-natives/src/test_scenario.rs:111-116 | sui-execution/historical-versions/v3/sui-move-natives/src/test_scenario.rs:198-204 | sui-execution/latest/sui-move-natives/src/test_scenario.rs:337-343 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-move-natives/src/test_scenario.rs` and `sui-execution/historical-versions/v2/sui-move-natives/src/test_scenario.rs` as WHOLE FILES: this scan already matched 32 separate duplicated blocks between them, totalling at least 519 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (5 lines × 3) · ×8
  • Duplicated block (5 lines × 3) crates/sui-rosetta/src/types/internal_operation/consolidate_to_fungible.rs:95 — crates/sui-rosetta/src/types/internal_operation/consolidate_to_fungible.rs:95-99 | crates/sui-rosetta/src/types/internal_operation/merge_and_redeem.rs:759-763 | crates/sui-rosetta/src/types/internal_operation/withdraw_stake.rs:111-115 — before extracting anything, compare `crates/sui-rosetta/src/types/internal_operation/consolidate_to_fungible.rs` and `crates/sui-rosetta/src/types/internal_operation/merge_and_redeem.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 45 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 3) crates/sui-types/src/transaction.rs:1623 — crates/sui-types/src/transaction.rs:1623-1627 | sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/loading/ast.rs:313-317 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/loading/ast.rs:409-413 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/loading/ast.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/loading/ast.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 134 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 3) sui-execution/historical-versions/v0/sui-verifier/src/id_leak_verifier.rs:267 — sui-execution/historical-versions/v0/sui-verifier/src/id_leak_verifier.rs:267-271 | sui-execution/historical-versions/v1/sui-verifier/src/id_leak_verifier.rs:241-245 | sui-execution/historical-versions/v2/sui-verifier/src/id_leak_verifier.rs:256-260 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-verifier/src/id_leak_verifier.rs` and `sui-execution/historical-versions/v1/sui-verifier/src/id_leak_verifier.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 350 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 3) sui-execution/historical-versions/v0/sui-adapter/src/gas_meter.rs:279 — sui-execution/historical-versions/v0/sui-adapter/src/gas_meter.rs:279-283 | sui-execution/historical-versions/v1/sui-adapter/src/gas_meter.rs:279-283 | sui-execution/historical-versions/v2/sui-adapter/src/gas_meter.rs:279-283 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/gas_meter.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/gas_meter.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 155 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 3) sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/trace_utils.rs:354 — sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/trace_utils.rs:354-358 | sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/trace_utils.rs:335-339 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/trace_utils.rs:333-337 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/trace_utils.rs` and `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/trace_utils.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 105 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 3) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs:489 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs:489-493 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs:657-661 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs:1435-1439 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs` as WHOLE FILES: this scan already matched 35 separate duplicated blocks between them, totalling at least 484 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 3) sui-execution/historical-versions/v2/sui-move-natives/src/test_scenario.rs:298 — sui-execution/historical-versions/v2/sui-move-natives/src/test_scenario.rs:298-302 | sui-execution/historical-versions/v3/sui-move-natives/src/test_scenario.rs:426-430 | sui-execution/latest/sui-move-natives/src/test_scenario.rs:601-605 — before extracting anything, compare `sui-execution/historical-versions/v2/sui-move-natives/src/test_scenario.rs` and `sui-execution/historical-versions/v3/sui-move-natives/src/test_scenario.rs` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 432 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 3) sui-execution/historical-versions/v2/sui-move-natives/src/test_scenario.rs:546 — sui-execution/historical-versions/v2/sui-move-natives/src/test_scenario.rs:546-550 | sui-execution/historical-versions/v3/sui-move-natives/src/test_scenario.rs:813-817 | sui-execution/latest/sui-move-natives/src/test_scenario.rs:988-992 — before extracting anything, compare `sui-execution/historical-versions/v2/sui-move-natives/src/test_scenario.rs` and `sui-execution/historical-versions/v3/sui-move-natives/src/test_scenario.rs` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 432 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.
D1 · Cyclomatic Complexity · sui_adapter_v3 · ×7
  • sui_adapter_v3::execution_engine::checked::execution_loop (cyclomatic 29) sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.rs:547 — sui_adapter_v3::execution_engine::checked::execution_loop 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.
  • sui_adapter_v3::programmable_transactions::execution::checked::execute_command (cyclomatic 27) REDACTED:202 — sui_adapter_v3::programmable_transactions::execution::checked::execute_command has cyclomatic complexity 27 (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.
  • sui_adapter_v3::programmable_transactions::execution::checked::primitive_serialization_layout (cyclomatic 20) REDACTED:1833 — sui_adapter_v3::programmable_transactions::execution::checked::primitive_serialization_layout 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.
  • sui_adapter_v3::static_programmable_transactions::execution::interpreter::execute_command (cyclomatic 20) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/interpreter.rs:146 — sui_adapter_v3::static_programmable_transactions::execution::interpreter::execute_command 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.
  • sui_adapter_v3::programmable_transactions::context::checked::finish (cyclomatic 18) sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/context.rs:1417 — sui_adapter_v3::programmable_transactions::context::checked::finish 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.
  • sui_adapter_v3::static_programmable_transactions::typing::invariant_checks::type_check::command (cyclomatic 18) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/type_check.rs:132 — sui_adapter_v3::static_programmable_transactions::typing::invariant_checks::type_check::command 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.
  • sui_adapter_v3::static_programmable_transactions::typing::verify::input_arguments::primitive_serialization_layout (cyclomatic 18) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/input_arguments.rs:150 — sui_adapter_v3::static_programmable_transactions::typing::verify::input_arguments::primitive_serialization_layout has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · sui_rpc_api · ×7
  • sui_rpc_api::grpc::v2::ledger_service::list_events::next_event_chunk (cyclomatic 26) crates/sui-rpc-api/src/grpc/v2/ledger_service/list_events.rs:281 — sui_rpc_api::grpc::v2::ledger_service::list_events::next_event_chunk 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.
  • sui_rpc_api::grpc::v2::transaction_execution_service::simulate::simulate_transaction (cyclomatic 25) crates/sui-rpc-api/src/grpc/v2/transaction_execution_service/simulate/mod.rs:45 — sui_rpc_api::grpc::v2::transaction_execution_service::simulate::simulate_transaction 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.
  • sui_rpc_api::grpc::v2::ledger_service::list_checkpoints::next_filtered_checkpoint_chunk (cyclomatic 23) crates/sui-rpc-api/src/grpc/v2/ledger_service/list_checkpoints.rs:513 — sui_rpc_api::grpc::v2::ledger_service::list_checkpoints::next_filtered_checkpoint_chunk 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.
  • sui_rpc_api::grpc::v2::ledger_service::get_epoch::get_epoch (cyclomatic 21) crates/sui-rpc-api/src/grpc/v2/ledger_service/get_epoch.rs:24 — sui_rpc_api::grpc::v2::ledger_service::get_epoch::get_epoch 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.
  • sui_rpc_api::grpc::v2::ledger_service::list_transactions::next_transaction_chunk (cyclomatic 19) crates/sui-rpc-api/src/grpc/v2/ledger_service/list_transactions.rs:279 — sui_rpc_api::grpc::v2::ledger_service::list_transactions::next_transaction_chunk 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.
  • sui_rpc_api::grpc::v2::state_service::list_dynamic_fields::load_dynamic_field (cyclomatic 18) crates/sui-rpc-api/src/grpc/v2/state_service/list_dynamic_fields.rs:191 — sui_rpc_api::grpc::v2::state_service::list_dynamic_fields::load_dynamic_field 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.
  • sui_rpc_api::grpc::v2::signature_verification_service::verify_signature (cyclomatic 17) crates/sui-rpc-api/src/grpc/v2/signature_verification_service.rs:34 — sui_rpc_api::grpc::v2::signature_verification_service::verify_signature has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D2 · Cognitive Complexity · sui · ×7
  • sui::sui_commands::start (cognitive 62) crates/sui/src/sui_commands.rs:868 — sui::sui_commands::start has cognitive complexity 62 (threshold 15). Drivers by points: if/else 29 (44 pts), match/switch 6 (10 pts), boolean chains 5, 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.
  • sui::sui_commands::genesis (cognitive 57) crates/sui/src/sui_commands.rs:1373 — sui::sui_commands::genesis has cognitive complexity 57 (threshold 15). Drivers by points: if/else 22 (35 pts), loops 7 (15 pts), boolean chains 4, match/switch 3 (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.
  • sui::client_commands::dry_run_or_execute_or_serialize (cognitive 28) crates/sui/src/client_commands.rs:3682 — sui::client_commands::dry_run_or_execute_or_serialize has cognitive complexity 28 (threshold 15). Drivers by points: if/else 17 (26 pts), boolean chains 1, match/switch 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.
  • sui::upgrade_compatibility::function_signature_mismatch_diag (cognitive 28) crates/sui/src/upgrade_compatibility/mod.rs:1203 — sui::upgrade_compatibility::function_signature_mismatch_diag has cognitive complexity 28 (threshold 15). Drivers by points: if/else 13 (22 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.
  • sui::client_commands::compatibility_checks (cognitive 19) crates/sui/src/client_commands.rs:2162 — sui::client_commands::compatibility_checks has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 2 (4 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.
  • sui::client_commands::pretty_print_balance (cognitive 18) crates/sui/src/client_commands.rs:3267 — sui::client_commands::pretty_print_balance has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 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.
  • sui::genesis_inspector::examine_object (cognitive 18) crates/sui/src/genesis_inspector.rs:181 — sui::genesis_inspector::examine_object has cognitive complexity 18 (threshold 15). Drivers by points: loops 6 (16 pts), match/switch 1 (2 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.
D2 · Cognitive Complexity · sui_network · ×7
  • sui_network::discovery::update_known_peers_versioned (cognitive 39) crates/sui-network/src/discovery/mod.rs:1360 — sui_network::discovery::update_known_peers_versioned has cognitive complexity 39 (threshold 15). Drivers by points: if/else 9 (24 pts), loops 4 (6 pts), match/switch 3 (6 pts), boolean chains 3 (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.
  • sui_network::state_sync::sync_checkpoint_contents (cognitive 36) crates/sui-network/src/state_sync/mod.rs:1648 — sui_network::state_sync::sync_checkpoint_contents has cognitive complexity 36 (threshold 15). Drivers by points: if/else 8 (23 pts), match/switch 3 (8 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.
  • sui_network::state_sync::sync_to_checkpoint (cognitive 25) crates/sui-network/src/state_sync/mod.rs:1353 — sui_network::state_sync::sync_to_checkpoint has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (15 pts), match/switch 3 (7 pts), loops 2, boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • sui_network::discovery::verify_versioned_node_info (cognitive 23) crates/sui-network/src/discovery/mod.rs:306 — sui_network::discovery::verify_versioned_node_info has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 2 (4 pts), match/switch 2 (3 pts), boolean chains 2 (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.
  • sui_network::discovery::update_known_peers (cognitive 23) crates/sui-network/src/discovery/mod.rs:1280 — sui_network::discovery::update_known_peers has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (15 pts), match/switch 2 (4 pts), boolean chains 3, 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.
  • sui_network::discovery::query_peer_for_their_known_peers (cognitive 17) crates/sui-network/src/discovery/mod.rs:1089 — sui_network::discovery::query_peer_for_their_known_peers has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (17 pts) (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.
  • sui_network::state_sync::sync_checkpoint_contents_from_archive_iteration (cognitive 17) crates/sui-network/src/state_sync/mod.rs:1569 — sui_network::state_sync::sync_checkpoint_contents_from_archive_iteration has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), match/switch 1 (3 pts), loops 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sui_adapter_latest · ×7
  • sui_adapter_latest::static_programmable_transactions::execution::interpreter::execute_command (cognitive 34) sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/interpreter.rs:157 — sui_adapter_latest::static_programmable_transactions::execution::interpreter::execute_command has cognitive complexity 34 (threshold 15). Drivers by points: if/else 14 (26 pts), loops 3 (6 pts), boolean chains 1, match/switch 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.
  • sui_adapter_latest::static_programmable_transactions::typing::invariant_checks::memory_safety::call (cognitive 26) sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs:820 — sui_adapter_latest::static_programmable_transactions::typing::invariant_checks::memory_safety::call has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 5 (10 pts), match/switch 2 (3 pts), boolean chains 2 (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.
  • sui_adapter_latest::static_programmable_transactions::typing::invariant_checks::type_check::command (cognitive 23) sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/type_check.rs:154 — sui_adapter_latest::static_programmable_transactions::typing::invariant_checks::type_check::command has cognitive complexity 23 (threshold 15). Drivers by points: loops 7 (13 pts), if/else 5 (9 pts), 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.
  • sui_adapter_latest::accumulator_settlement::settlement_groups (cognitive 22) sui-execution/latest/sui-adapter/src/accumulator_settlement.rs:72 — sui_adapter_latest::accumulator_settlement::settlement_groups has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 3 (5 pts), boolean chains 3, match/switch 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.
  • sui_adapter_latest::execution_engine::checked::execution_loop (cognitive 22) sui-execution/latest/sui-adapter/src/execution_engine.rs:1572 — sui_adapter_latest::execution_engine::checked::execution_loop has cognitive complexity 22 (threshold 15). Drivers by points: match/switch 4 (10 pts), if/else 2 (6 pts), loops 3 (6 pts) (nesting depth added 13). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • sui_adapter_latest::static_programmable_transactions::execution::context::finish (cognitive 22) sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/context.rs:2295 — sui_adapter_latest::static_programmable_transactions::execution::context::finish has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 3, match/switch 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.
  • sui_adapter_latest::static_programmable_transactions::typing::translate::locations (cognitive 16) sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/translate.rs:628 — sui_adapter_latest::static_programmable_transactions::typing::translate::locations has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 1, match/switch 1 (nesting depth added 7). Most of this is not in the body itself: 3 of the 16 points are its own statements and the rest belongs to one function item inside it that branches (splat_arg). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D4 · Code Duplication · Duplicated block (34 lines × 2) · ×7
  • Duplicated block (34 lines × 2) crates/sui-data-store/src/stores/in_memory.rs:440 — crates/sui-data-store/src/stores/in_memory.rs:440-473 | crates/sui-data-store/src/stores/in_memory_lru.rs:352-385 — before extracting anything, compare `crates/sui-data-store/src/stores/in_memory.rs` and `crates/sui-data-store/src/stores/in_memory_lru.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 144 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 (34 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.rs:562 — sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.rs:562-595 | sui-execution/latest/sui-adapter/src/execution_engine.rs:1588-1621 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.rs` and `sui-execution/latest/sui-adapter/src/execution_engine.rs` as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 689 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 (34 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/context.rs:1298 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/context.rs:1298-1331 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/context.rs:1687-1720 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/context.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/context.rs` as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 625 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 (34 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/translate.rs:991 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/translate.rs:991-1024 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/translate.rs:1006-1039 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/translate.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/translate.rs` as WHOLE FILES: this scan already matched 40 separate duplicated blocks between them, totalling at least 589 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 (34 lines × 2) sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs:913 — sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs:913-946 | sui-execution/latest/sui-move-natives/src/crypto/group_ops.rs:915-948 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs` and `sui-execution/latest/sui-move-natives/src/crypto/group_ops.rs` as WHOLE FILES: this scan already matched 33 separate duplicated blocks between them, totalling at least 590 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 (34 lines × 2) sui-execution/historical-versions/v3/sui-move-natives/src/protocol_config.rs:32 — sui-execution/historical-versions/v3/sui-move-natives/src/protocol_config.rs:32-65 | sui-execution/latest/sui-move-natives/src/protocol_config.rs:34-67 — 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 (34 lines × 2) sui-execution/historical-versions/v3/sui-verifier/src/private_generics.rs:167 — sui-execution/historical-versions/v3/sui-verifier/src/private_generics.rs:167-200 | sui-execution/latest/sui-verifier/src/private_generics.rs:167-200 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-verifier/src/private_generics.rs` and `sui-execution/latest/sui-verifier/src/private_generics.rs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 218 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (29 lines × 2) · ×7
  • Duplicated block (29 lines × 2) crates/sui-bridge-indexer/src/main.rs:152 — crates/sui-bridge-indexer/src/main.rs:152-180 | crates/sui-bridge/src/node.rs:191-219 — 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 (29 lines × 2) crates/sui-protocol-config/src/lib.rs:4248 — crates/sui-protocol-config/src/lib.rs:4248-4276 | crates/sui-protocol-config/src/lib.rs:4280-4308 — both copies are in the same file, so extract the 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 (29 lines × 2) sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/object_store.rs:545 — sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/object_store.rs:545-573 | sui-execution/historical-versions/v2/sui-move-natives/src/object_runtime/object_store.rs:563-591 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/object_store.rs` and `sui-execution/historical-versions/v2/sui-move-natives/src/object_runtime/object_store.rs` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 415 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 (29 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/input_arguments.rs:240 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/input_arguments.rs:240-268 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/verify/input_arguments.rs:245-273 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/input_arguments.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/verify/input_arguments.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 132 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 (29 lines × 2) sui-execution/historical-versions/v3/sui-move-natives/src/crypto/vdf.rs:54 — sui-execution/historical-versions/v3/sui-move-natives/src/crypto/vdf.rs:54-82 | sui-execution/latest/sui-move-natives/src/crypto/vdf.rs:55-83 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-move-natives/src/crypto/vdf.rs` and `sui-execution/latest/sui-move-natives/src/crypto/vdf.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. 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 (29 lines × 2) sui-execution/latest/sui-move-natives/src/crypto/ecdsa_k1.rs:252 — sui-execution/latest/sui-move-natives/src/crypto/ecdsa_k1.rs:252-280 | sui-execution/latest/sui-move-natives/src/crypto/ecdsa_r1.rs:202-230 — before extracting anything, compare `sui-execution/latest/sui-move-natives/src/crypto/ecdsa_k1.rs` and `sui-execution/latest/sui-move-natives/src/crypto/ecdsa_r1.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 151 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (29 lines × 2) sui-execution/historical-versions/v1/sui-move-natives/src/test_scenario.rs:57 — sui-execution/historical-versions/v1/sui-move-natives/src/test_scenario.rs:57-85 | sui-execution/historical-versions/v2/sui-move-natives/src/test_scenario.rs:56-84 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-move-natives/src/test_scenario.rs` and `sui-execution/historical-versions/v2/sui-move-natives/src/test_scenario.rs` as WHOLE FILES: this scan already matched 32 separate duplicated blocks between them, totalling at least 519 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (22 lines × 3) · ×7
  • Duplicated block (22 lines × 3) sui-execution/historical-versions/v0/sui-adapter/src/gas_charger.rs:285 — sui-execution/historical-versions/v0/sui-adapter/src/gas_charger.rs:285-306 | sui-execution/historical-versions/v1/sui-adapter/src/gas_charger.rs:294-315 | sui-execution/historical-versions/v2/sui-adapter/src/gas_charger.rs:295-316 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/gas_charger.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/gas_charger.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 114 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 (22 lines × 3) sui-execution/historical-versions/v0/sui-move-natives/src/dynamic_field.rs:404 — sui-execution/historical-versions/v0/sui-move-natives/src/dynamic_field.rs:404-425 | sui-execution/historical-versions/v1/sui-move-natives/src/dynamic_field.rs:403-424 | sui-execution/historical-versions/v2/sui-move-natives/src/dynamic_field.rs:403-424 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/dynamic_field.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/dynamic_field.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 384 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 (22 lines × 3) sui-execution/historical-versions/v0/sui-move-natives/src/object.rs:63 — sui-execution/historical-versions/v0/sui-move-natives/src/object.rs:63-84 | sui-execution/historical-versions/v1/sui-move-natives/src/object.rs:63-84 | sui-execution/historical-versions/v2/sui-move-natives/src/object.rs:63-84 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/object.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/object.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 61 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 (22 lines × 3) sui-execution/historical-versions/v0/sui-move-natives/src/object.rs:100 — sui-execution/historical-versions/v0/sui-move-natives/src/object.rs:100-121 | sui-execution/historical-versions/v1/sui-move-natives/src/object.rs:100-121 | sui-execution/historical-versions/v2/sui-move-natives/src/object.rs:100-121 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/object.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/object.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 61 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 (22 lines × 3) sui-execution/historical-versions/v0/sui-move-natives/src/object_runtime/object_store.rs:154 — sui-execution/historical-versions/v0/sui-move-natives/src/object_runtime/object_store.rs:154-175 | sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/object_store.rs:218-239 | sui-execution/historical-versions/v2/sui-move-natives/src/object_runtime/object_store.rs:221-242 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/object_runtime/object_store.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/object_store.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 237 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 (22 lines × 3) sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs:902 — sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs:902-923 | sui-execution/historical-versions/v2/sui-adapter/src/temporary_store.rs:954-975 | sui-execution/historical-versions/v3/sui-adapter/src/temporary_store.rs:937-958 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs` and `sui-execution/historical-versions/v2/sui-adapter/src/temporary_store.rs` as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 779 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 (22 lines × 3) sui-execution/historical-versions/v2/sui-verifier/src/private_generics.rs:55 — sui-execution/historical-versions/v2/sui-verifier/src/private_generics.rs:55-76 | sui-execution/historical-versions/v3/sui-verifier/src/private_generics.rs:58-79 | sui-execution/latest/sui-verifier/src/private_generics.rs:58-79 — before extracting anything, compare `sui-execution/historical-versions/v2/sui-verifier/src/private_generics.rs` and `sui-execution/historical-versions/v3/sui-verifier/src/private_generics.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 146 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (16 lines × 3) · ×7
  • Duplicated block (16 lines × 3) crates/sui-indexer-alt-graphql/src/api/types/move_package.rs:882 — crates/sui-indexer-alt-graphql/src/api/types/move_package.rs:882-897 | crates/sui-indexer-alt-graphql/src/api/types/move_package.rs:967-982 | crates/sui-indexer-alt-graphql/src/api/types/move_package.rs:1056-1071 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (16 lines × 3) sui-execution/historical-versions/v0/sui-adapter/src/gas_charger.rs:266 — sui-execution/historical-versions/v0/sui-adapter/src/gas_charger.rs:266-281 | sui-execution/historical-versions/v1/sui-adapter/src/gas_charger.rs:275-290 | sui-execution/historical-versions/v2/sui-adapter/src/gas_charger.rs:276-291 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/gas_charger.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/gas_charger.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 114 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (16 lines × 3) sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs:818 — sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs:818-833 | sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs:845-860 | sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.rs:971-986 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs` and `sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs` as WHOLE FILES: this scan already matched 39 separate duplicated blocks between them, totalling at least 959 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (16 lines × 3) sui-execution/historical-versions/v1/sui-adapter/src/gas_charger.rs:184 — sui-execution/historical-versions/v1/sui-adapter/src/gas_charger.rs:184-199 | sui-execution/historical-versions/v2/sui-adapter/src/gas_charger.rs:185-200 | sui-execution/historical-versions/v3/sui-adapter/src/gas_charger.rs:213-228 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-adapter/src/gas_charger.rs` and `sui-execution/historical-versions/v2/sui-adapter/src/gas_charger.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 205 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (16 lines × 3) sui-execution/historical-versions/v2/sui-move-natives/src/types.rs:24 — sui-execution/historical-versions/v2/sui-move-natives/src/types.rs:24-39 | sui-execution/historical-versions/v3/sui-move-natives/src/types.rs:24-39 | sui-execution/latest/sui-move-natives/src/types.rs:25-40 — before extracting anything, compare `sui-execution/historical-versions/v2/sui-move-natives/src/types.rs` and `sui-execution/historical-versions/v3/sui-move-natives/src/types.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 59 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (16 lines × 3) crates/sui-rpc-api/src/grpc/v2/ledger_service/list_checkpoints.rs:204 — crates/sui-rpc-api/src/grpc/v2/ledger_service/list_checkpoints.rs:204-219 | crates/sui-rpc-api/src/grpc/v2/ledger_service/list_events.rs:198-213 | crates/sui-rpc-api/src/grpc/v2/ledger_service/list_transactions.rs:203-218 — before extracting anything, compare `crates/sui-rpc-api/src/grpc/v2/ledger_service/list_checkpoints.rs` and `crates/sui-rpc-api/src/grpc/v2/ledger_service/list_transactions.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 33 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (16 lines × 3) sui-execution/historical-versions/v2/sui-move-natives/src/test_scenario.rs:446 — sui-execution/historical-versions/v2/sui-move-natives/src/test_scenario.rs:446-461 | sui-execution/historical-versions/v3/sui-move-natives/src/test_scenario.rs:579-594 | sui-execution/latest/sui-move-natives/src/test_scenario.rs:754-769 — before extracting anything, compare `sui-execution/historical-versions/v2/sui-move-natives/src/test_scenario.rs` and `sui-execution/historical-versions/v3/sui-move-natives/src/test_scenario.rs` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 432 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (15 lines × 3) · ×7
  • Duplicated block (15 lines × 3) crates/sui-core/src/authority_server.rs:989 — crates/sui-core/src/authority_server.rs:989-1003 | crates/sui-core/src/authority_server.rs:1093-1107 | crates/sui-core/src/authority_server.rs:1205-1219 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (15 lines × 3) crates/sui-indexer-alt-reader/src/consistent_reader.rs:195 — crates/sui-indexer-alt-reader/src/consistent_reader.rs:195-209 | crates/sui-indexer-alt-reader/src/consistent_reader.rs:244-258 | crates/sui-indexer-alt-reader/src/consistent_reader.rs:298-312 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (15 lines × 3) crates/sui-rosetta/src/types/internal_operation/pay_coin.rs:392 — crates/sui-rosetta/src/types/internal_operation/pay_coin.rs:392-406 | crates/sui-rosetta/src/types/internal_operation/pay_sui.rs:257-271 | crates/sui-rosetta/src/types/internal_operation/stake.rs:280-294 — before extracting anything, compare `crates/sui-rosetta/src/types/internal_operation/pay_coin.rs` and `crates/sui-rosetta/src/types/internal_operation/pay_sui.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 117 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (15 lines × 3) sui-execution/historical-versions/v0/sui-move-natives/src/dynamic_field.rs:505 — sui-execution/historical-versions/v0/sui-move-natives/src/dynamic_field.rs:505-519 | sui-execution/historical-versions/v1/sui-move-natives/src/lib.rs:783-797 | sui-execution/historical-versions/v2/sui-move-natives/src/lib.rs:936-950 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-move-natives/src/lib.rs` and `sui-execution/historical-versions/v2/sui-move-natives/src/lib.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 341 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (15 lines × 3) sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs:558 — sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs:558-572 | sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs:578-592 | sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.rs:686-700 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs` and `sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs` as WHOLE FILES: this scan already matched 39 separate duplicated blocks between them, totalling at least 959 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (15 lines × 3) sui-execution/historical-versions/v2/sui-move-natives/src/crypto/poseidon.rs:84 — sui-execution/historical-versions/v2/sui-move-natives/src/crypto/poseidon.rs:84-98 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/poseidon.rs:87-101 | sui-execution/latest/sui-move-natives/src/crypto/poseidon.rs:88-102 — before extracting anything, compare `sui-execution/historical-versions/v2/sui-move-natives/src/crypto/poseidon.rs` and `sui-execution/historical-versions/v3/sui-move-natives/src/crypto/poseidon.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 47 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (15 lines × 3) sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/trace_utils.rs:271 — sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/trace_utils.rs:271-285 | sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/trace_utils.rs:250-264 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/trace_utils.rs:248-262 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/trace_utils.rs` and `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/trace_utils.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 105 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (11 lines × 5) · ×7
  • Duplicated block (11 lines × 5) sui-execution/historical-versions/v0/sui-adapter/src/execution_engine.rs:611 — sui-execution/historical-versions/v0/sui-adapter/src/execution_engine.rs:611-621 | sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs:816-826 | sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs:843-853 | sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.rs:969-979 | sui-execution/latest/sui-adapter/src/execution_engine.rs:2000-2010 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/execution_engine.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 531 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (11 lines × 5) REDACTED:718 — REDACTED:718-728 | REDACTED:665-675 | REDACTED:671-681 | REDACTED:907-917 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/context.rs:2576-2586 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 54 separate duplicated blocks between them, totalling at least 1035 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (11 lines × 5) sui-execution/historical-versions/v0/sui-move-natives/src/object_runtime/object_store.rs:220 — sui-execution/historical-versions/v0/sui-move-natives/src/object_runtime/object_store.rs:220-230 | sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/object_store.rs:289-299 | sui-execution/historical-versions/v2/sui-move-natives/src/object_runtime/object_store.rs:292-302 | sui-execution/historical-versions/v3/sui-move-natives/src/object_runtime/object_store.rs:386-396 | sui-execution/latest/sui-move-natives/src/object_runtime/object_store.rs:364-374 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/object_runtime/object_store.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/object_store.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 237 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (11 lines × 5) crates/sui-bridge-indexer/src/eth_bridge_indexer.rs:635 — crates/sui-bridge-indexer/src/eth_bridge_indexer.rs:635-645 | crates/sui-bridge-indexer/src/eth_bridge_indexer.rs:694-705 | crates/sui-bridge-indexer/src/eth_bridge_indexer.rs:751-762 | crates/sui-bridge-indexer/src/eth_bridge_indexer.rs:811-822 | crates/sui-bridge-indexer/src/eth_bridge_indexer.rs:845-856 — 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 (11 lines × 5) sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs:344 — sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs:344-354 | sui-execution/historical-versions/v1/sui-move-natives/src/test_scenario.rs:339-349 | sui-execution/historical-versions/v2/sui-move-natives/src/test_scenario.rs:341-351 | sui-execution/historical-versions/v3/sui-move-natives/src/test_scenario.rs:470-480 | sui-execution/latest/sui-move-natives/src/test_scenario.rs:645-655 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/test_scenario.rs` as WHOLE FILES: this scan already matched 35 separate duplicated blocks between them, totalling at least 619 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (11 lines × 5) sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs:426 — sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs:426-436 | sui-execution/historical-versions/v1/sui-move-natives/src/test_scenario.rs:421-431 | sui-execution/historical-versions/v2/sui-move-natives/src/test_scenario.rs:423-433 | sui-execution/historical-versions/v3/sui-move-natives/src/test_scenario.rs:555-565 | sui-execution/latest/sui-move-natives/src/test_scenario.rs:730-740 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/test_scenario.rs` as WHOLE FILES: this scan already matched 35 separate duplicated blocks between them, totalling at least 619 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (11 lines × 5) sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs:501 — sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs:501-511 | sui-execution/historical-versions/v1/sui-move-natives/src/test_scenario.rs:496-506 | sui-execution/historical-versions/v2/sui-move-natives/src/test_scenario.rs:498-508 | sui-execution/historical-versions/v3/sui-move-natives/src/test_scenario.rs:633-643 | sui-execution/latest/sui-move-natives/src/test_scenario.rs:808-818 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/test_scenario.rs` as WHOLE FILES: this scan already matched 35 separate duplicated blocks between them, totalling at least 619 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (10 lines × 5) · ×7
  • Duplicated block (10 lines × 5) crates/sui-rosetta/src/types/internal_operation/pay_coin.rs:364 — crates/sui-rosetta/src/types/internal_operation/pay_coin.rs:364-373 | crates/sui-rosetta/src/types/internal_operation/pay_sui.rs:229-238 | crates/sui-rosetta/src/types/internal_operation/pay_sui.rs:322-331 | crates/sui-rosetta/src/types/internal_operation/stake.rs:252-261 | crates/sui-rosetta/src/types/internal_operation/stake.rs:377-386 — before extracting anything, compare `crates/sui-rosetta/src/types/internal_operation/pay_coin.rs` and `crates/sui-rosetta/src/types/internal_operation/pay_sui.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 117 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 × 5) sui-execution/historical-versions/v0/sui-adapter/src/execution_engine.rs:556 — sui-execution/historical-versions/v0/sui-adapter/src/execution_engine.rs:556-565 | sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs:760-769 | sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs:787-796 | sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.rs:911-920 | sui-execution/latest/sui-adapter/src/execution_engine.rs:1944-1953 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/execution_engine.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 531 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 × 5) sui-execution/historical-versions/v0/sui-verifier/src/entry_points_verifier.rs:45 — sui-execution/historical-versions/v0/sui-verifier/src/entry_points_verifier.rs:45-54 | sui-execution/historical-versions/v1/sui-verifier/src/entry_points_verifier.rs:44-53 | sui-execution/historical-versions/v2/sui-verifier/src/entry_points_verifier.rs:47-56 | sui-execution/historical-versions/v3/sui-verifier/src/entry_points_verifier.rs:47-56 | sui-execution/latest/sui-verifier/src/entry_points_verifier.rs:47-56 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-verifier/src/entry_points_verifier.rs` and `sui-execution/historical-versions/v1/sui-verifier/src/entry_points_verifier.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 130 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 × 5) sui-execution/historical-versions/v0/sui-verifier/src/entry_points_verifier.rs:74 — sui-execution/historical-versions/v0/sui-verifier/src/entry_points_verifier.rs:74-83 | sui-execution/historical-versions/v1/sui-verifier/src/entry_points_verifier.rs:73-82 | sui-execution/historical-versions/v2/sui-verifier/src/entry_points_verifier.rs:77-86 | sui-execution/historical-versions/v3/sui-verifier/src/entry_points_verifier.rs:77-86 | sui-execution/latest/sui-verifier/src/entry_points_verifier.rs:77-86 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-verifier/src/entry_points_verifier.rs` and `sui-execution/historical-versions/v1/sui-verifier/src/entry_points_verifier.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 130 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 × 5) sui-execution/historical-versions/v0/sui-verifier/src/entry_points_verifier.rs:177 — sui-execution/historical-versions/v0/sui-verifier/src/entry_points_verifier.rs:177-186 | sui-execution/historical-versions/v1/sui-verifier/src/entry_points_verifier.rs:172-181 | sui-execution/historical-versions/v2/sui-verifier/src/entry_points_verifier.rs:177-186 | sui-execution/historical-versions/v3/sui-verifier/src/entry_points_verifier.rs:177-186 | sui-execution/latest/sui-verifier/src/entry_points_verifier.rs:177-186 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-verifier/src/entry_points_verifier.rs` and `sui-execution/historical-versions/v1/sui-verifier/src/entry_points_verifier.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 130 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 × 5) sui-execution/historical-versions/v0/sui-verifier/src/id_leak_verifier.rs:496 — sui-execution/historical-versions/v0/sui-verifier/src/id_leak_verifier.rs:496-505 | sui-execution/historical-versions/v1/sui-verifier/src/id_leak_verifier.rs:470-479 | sui-execution/historical-versions/v2/sui-verifier/src/id_leak_verifier.rs:485-494 | sui-execution/historical-versions/v3/sui-verifier/src/id_leak_verifier.rs:514-523 | sui-execution/latest/sui-verifier/src/id_leak_verifier.rs:520-529 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-verifier/src/id_leak_verifier.rs` and `sui-execution/historical-versions/v1/sui-verifier/src/id_leak_verifier.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 350 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 × 5) sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs:598 — sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs:598-607 | sui-execution/historical-versions/v1/sui-move-natives/src/test_scenario.rs:593-602 | sui-execution/historical-versions/v2/sui-move-natives/src/test_scenario.rs:595-604 | sui-execution/historical-versions/v3/sui-move-natives/src/test_scenario.rs:870-879 | sui-execution/latest/sui-move-natives/src/test_scenario.rs:1041-1050 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/test_scenario.rs` as WHOLE FILES: this scan already matched 35 separate duplicated blocks between them, totalling at least 619 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (9 lines × 4) · ×7
  • Duplicated block (9 lines × 4) sui-execution/historical-versions/v0/sui-adapter/src/gas_meter.rs:39 — sui-execution/historical-versions/v0/sui-adapter/src/gas_meter.rs:39-47 | sui-execution/historical-versions/v1/sui-adapter/src/gas_meter.rs:39-47 | sui-execution/historical-versions/v2/sui-adapter/src/gas_meter.rs:39-47 | sui-execution/historical-versions/v3/sui-adapter/src/gas_meter.rs:41-49 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/gas_meter.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/gas_meter.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 155 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 4) REDACTED:646 — REDACTED:646-654 | REDACTED:652-660 | REDACTED:871-879 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/context.rs:2541-2549 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 77 separate duplicated blocks between them, totalling at least 1502 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 4) sui-execution/historical-versions/v1/sui-move-natives/src/crypto/zklogin.rs:116 — sui-execution/historical-versions/v1/sui-move-natives/src/crypto/zklogin.rs:116-124 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/zklogin.rs:116-124 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/zklogin.rs:114-122 | sui-execution/latest/sui-move-natives/src/crypto/zklogin.rs:117-125 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-move-natives/src/crypto/zklogin.rs` and `sui-execution/historical-versions/v2/sui-move-natives/src/crypto/zklogin.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 95 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 4) sui-execution/historical-versions/v3/sui-move-natives/src/tx_context.rs:49 — sui-execution/historical-versions/v3/sui-move-natives/src/tx_context.rs:49-57 | sui-execution/historical-versions/v3/sui-move-natives/src/tx_context.rs:458-466 | sui-execution/latest/sui-move-natives/src/tx_context.rs:51-59 | sui-execution/latest/sui-move-natives/src/tx_context.rs:460-468 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-move-natives/src/tx_context.rs` and `sui-execution/latest/sui-move-natives/src/tx_context.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 258 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 4) sui-execution/historical-versions/v0/sui-adapter/src/gas_meter.rs:307 — sui-execution/historical-versions/v0/sui-adapter/src/gas_meter.rs:307-315 | sui-execution/historical-versions/v1/sui-adapter/src/gas_meter.rs:307-315 | sui-execution/historical-versions/v2/sui-adapter/src/gas_meter.rs:307-315 | sui-execution/historical-versions/v3/sui-adapter/src/gas_meter.rs:326-334 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/gas_meter.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/gas_meter.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 155 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 4) REDACTED:1404 — REDACTED:1404-1412 | REDACTED:1361-1369 | REDACTED:1373-1381 | REDACTED:1789-1797 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 54 separate duplicated blocks between them, totalling at least 1035 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 4) sui-execution/historical-versions/v0/sui-move-natives/src/test_utils.rs:19 — sui-execution/historical-versions/v0/sui-move-natives/src/test_utils.rs:19-27 | sui-execution/historical-versions/v1/sui-move-natives/src/test_utils.rs:19-27 | sui-execution/historical-versions/v2/sui-move-natives/src/test_utils.rs:19-27 | sui-execution/historical-versions/v3/sui-move-natives/src/test_utils.rs:19-27 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/test_utils.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/test_utils.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (8 lines × 4) · ×7
  • Duplicated block (8 lines × 4) crates/sui-indexer-alt-consistent-store/src/handlers/mod.rs:28 — crates/sui-indexer-alt-consistent-store/src/handlers/mod.rs:28-35 | crates/sui-indexer-alt-consistent-store/src/handlers/mod.rs:80-87 | crates/sui-rpc-store/src/indexer/mod.rs:119-126 | crates/sui-rpc-store/src/indexer/mod.rs:171-178 — before extracting anything, compare `crates/sui-indexer-alt-consistent-store/src/handlers/mod.rs` and `crates/sui-rpc-store/src/indexer/mod.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 80 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 × 4) sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/context.rs:316 — sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/context.rs:316-323 | sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:301-308 | sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs:306-313 | sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/context.rs:359-366 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/context.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 378 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 × 4) REDACTED:1421 — REDACTED:1421-1428 | REDACTED:1378-1385 | REDACTED:1390-1397 | REDACTED:1806-1813 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 54 separate duplicated blocks between them, totalling at least 1035 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 × 4) sui-execution/historical-versions/v0/sui-move-natives/src/dynamic_field.rs:301 — sui-execution/historical-versions/v0/sui-move-natives/src/dynamic_field.rs:301-308 | sui-execution/historical-versions/v1/sui-move-natives/src/dynamic_field.rs:300-307 | sui-execution/historical-versions/v2/sui-move-natives/src/dynamic_field.rs:300-307 | sui-execution/historical-versions/v3/sui-move-natives/src/dynamic_field.rs:312-319 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/dynamic_field.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/dynamic_field.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 384 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 × 4) sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/mod.rs:595 — sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/mod.rs:595-602 | sui-execution/historical-versions/v2/sui-move-natives/src/object_runtime/mod.rs:563-570 | sui-execution/historical-versions/v3/sui-move-natives/src/object_runtime/mod.rs:718-725 | sui-execution/latest/sui-move-natives/src/object_runtime/mod.rs:923-930 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/mod.rs` and `sui-execution/historical-versions/v2/sui-move-natives/src/object_runtime/mod.rs` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 314 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 × 4) sui-execution/historical-versions/v0/sui-adapter/src/execution_mode.rs:245 — sui-execution/historical-versions/v0/sui-adapter/src/execution_mode.rs:245-252 | sui-execution/historical-versions/v1/sui-adapter/src/execution_mode.rs:245-252 | sui-execution/historical-versions/v2/sui-adapter/src/execution_mode.rs:245-252 | sui-execution/historical-versions/v3/sui-adapter/src/execution_mode.rs:319-326 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/execution_mode.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/execution_mode.rs` as WHOLE FILES: this scan already matched 3 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. 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 × 4) sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs:488 — sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs:488-495 | sui-execution/historical-versions/v2/sui-adapter/src/temporary_store.rs:507-514 | sui-execution/historical-versions/v3/sui-adapter/src/temporary_store.rs:475-482 | sui-execution/latest/sui-adapter/src/temporary_store.rs:788-795 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs` and `sui-execution/historical-versions/v2/sui-adapter/src/temporary_store.rs` as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 779 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) · ×6
  • Members sharing a duplicated core (6 members, 50+ identical tokens) crates/sui-bridge/src/eth_transaction_builder.rs:74 — crates/sui-bridge/src/eth_transaction_builder.rs:74-89 | crates/sui-bridge/src/eth_transaction_builder.rs:95-110 | crates/sui-bridge/src/eth_transaction_builder.rs:116-131 | crates/sui-bridge/src/eth_transaction_builder.rs:137-152 | crates/sui-bridge/src/eth_transaction_builder.rs:158-173 | crates/sui-bridge/src/eth_transaction_builder.rs:178-195 — These 6 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 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
  • Members sharing a duplicated core (6 members, 50+ identical tokens) crates/sui-rosetta/src/operations.rs:1419 — crates/sui-rosetta/src/operations.rs:1419-1435 | crates/sui-rosetta/src/operations.rs:1437-1454 | crates/sui-rosetta/src/operations.rs:1458-1473 | crates/sui-rosetta/src/operations.rs:1478-1493 | crates/sui-rosetta/src/operations.rs:1497-1512 | crates/sui-rosetta/src/operations.rs:1516-1531 — These 6 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 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
  • Members sharing a duplicated core (6 members, 50+ identical tokens) sui-execution/historical-versions/v0/sui-adapter/src/gas_meter.rs:145 — sui-execution/historical-versions/v0/sui-adapter/src/gas_meter.rs:145-154 | sui-execution/historical-versions/v0/sui-adapter/src/gas_meter.rs:163-173 | sui-execution/historical-versions/v1/sui-adapter/src/gas_meter.rs:145-154 | sui-execution/historical-versions/v1/sui-adapter/src/gas_meter.rs:163-173 | sui-execution/historical-versions/v2/sui-adapter/src/gas_meter.rs:145-154 | sui-execution/historical-versions/v2/sui-adapter/src/gas_meter.rs:163-173 — These 6 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 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
  • Members sharing a duplicated core (6 members, 50+ identical tokens) REDACTED:872 — REDACTED:872-889 | REDACTED:805-822 | REDACTED:811-828 | sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/context.rs:1322-1339 | sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/context.rs:733-755 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/env.rs:656-683 — These 6 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 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
  • Members sharing a duplicated core (6 members, 50+ identical tokens) sui-execution/historical-versions/v1/sui-adapter/src/gas_charger.rs:329 — sui-execution/historical-versions/v1/sui-adapter/src/gas_charger.rs:329-339 | sui-execution/historical-versions/v1/sui-adapter/src/gas_charger.rs:345-366 | sui-execution/historical-versions/v2/sui-adapter/src/gas_charger.rs:330-340 | sui-execution/historical-versions/v2/sui-adapter/src/gas_charger.rs:346-367 | sui-execution/historical-versions/v3/sui-adapter/src/gas_charger.rs:445-455 | sui-execution/historical-versions/v3/sui-adapter/src/gas_charger.rs:461-483 — These 6 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 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
  • Members sharing a duplicated core (6 members, 50+ identical tokens) sui-execution/src/v0.rs:91 — sui-execution/src/v0.rs:91-121 | sui-execution/src/v0.rs:214-237 | sui-execution/src/v1.rs:91-121 | sui-execution/src/v1.rs:214-237 | sui-execution/src/v2.rs:91-121 | sui-execution/src/v2.rs:214-237 — These 6 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 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
D4 · Code Duplication · Duplicated block (36 lines × 2) · ×6
  • Duplicated block (36 lines × 2) crates/sui-indexer-alt-consistent-store/src/handlers/object_by_owner.rs:34 — crates/sui-indexer-alt-consistent-store/src/handlers/object_by_owner.rs:34-69 | crates/sui-indexer-alt-consistent-store/src/handlers/object_by_type.rs:34-69 — before extracting anything, compare `crates/sui-indexer-alt-consistent-store/src/handlers/object_by_owner.rs` and `crates/sui-indexer-alt-consistent-store/src/handlers/object_by_type.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 59 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 (36 lines × 2) crates/sui-types/src/rpc_proto_conversions.rs:654 — crates/sui-types/src/rpc_proto_conversions.rs:654-689 | crates/sui-types/src/rpc_proto_conversions.rs:715-750 — both copies are in the same file, so extract the 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 (36 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.rs:1244 — sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.rs:1244-1279 | sui-execution/latest/sui-adapter/src/execution_engine.rs:2242-2277 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.rs` and `sui-execution/latest/sui-adapter/src/execution_engine.rs` as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 689 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 (36 lines × 2) sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs:496 — sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs:496-531 | sui-execution/latest/sui-move-natives/src/crypto/group_ops.rs:499-534 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs` and `sui-execution/latest/sui-move-natives/src/crypto/group_ops.rs` as WHOLE FILES: this scan already matched 33 separate duplicated blocks between them, totalling at least 590 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 (36 lines × 2) sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs:585 — sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs:585-620 | sui-execution/latest/sui-move-natives/src/crypto/group_ops.rs:588-623 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs` and `sui-execution/latest/sui-move-natives/src/crypto/group_ops.rs` as WHOLE FILES: this scan already matched 33 separate duplicated blocks between them, totalling at least 590 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 (36 lines × 2) sui-execution/historical-versions/v3/sui-move-natives/src/object_runtime/object_store.rs:625 — sui-execution/historical-versions/v3/sui-move-natives/src/object_runtime/object_store.rs:625-660 | sui-execution/latest/sui-move-natives/src/object_runtime/object_store.rs:627-662 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-move-natives/src/object_runtime/object_store.rs` and `sui-execution/latest/sui-move-natives/src/object_runtime/object_store.rs` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 521 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (33 lines × 2) · ×6
  • Duplicated block (33 lines × 2) REDACTED:491 — REDACTED:491-523 | REDACTED:497-529 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 77 separate duplicated blocks between them, totalling at least 1502 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 (33 lines × 2) sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs:1028 — sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs:1028-1060 | sui-execution/historical-versions/v2/sui-adapter/src/temporary_store.rs:1080-1112 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs` and `sui-execution/historical-versions/v2/sui-adapter/src/temporary_store.rs` as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 779 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 (33 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/context.rs:501 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/context.rs:501-533 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/context.rs:799-831 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/context.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/context.rs` as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 625 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 (33 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/trace_utils.rs:181 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/trace_utils.rs:181-213 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/trace_utils.rs:179-211 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/trace_utils.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/trace_utils.rs` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 272 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 (33 lines × 2) sui-execution/historical-versions/v3/sui-move-natives/src/test_scenario.rs:113 — sui-execution/historical-versions/v3/sui-move-natives/src/test_scenario.rs:113-145 | sui-execution/latest/sui-move-natives/src/test_scenario.rs:252-284 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-move-natives/src/test_scenario.rs` and `sui-execution/latest/sui-move-natives/src/test_scenario.rs` as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 610 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 (33 lines × 2) sui-execution/historical-versions/v3/sui-move-natives/src/test_scenario.rs:689 — sui-execution/historical-versions/v3/sui-move-natives/src/test_scenario.rs:689-721 | sui-execution/latest/sui-move-natives/src/test_scenario.rs:863-895 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-move-natives/src/test_scenario.rs` and `sui-execution/latest/sui-move-natives/src/test_scenario.rs` as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 610 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (24 lines × 3) · ×6
  • Duplicated block (24 lines × 3) sui-execution/historical-versions/v0/sui-adapter/src/execution_engine.rs:359 — sui-execution/historical-versions/v0/sui-adapter/src/execution_engine.rs:359-382 | sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs:464-487 | sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs:484-507 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/execution_engine.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 531 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 (24 lines × 3) REDACTED:474 — REDACTED:474-497 | REDACTED:476-499 | REDACTED:482-505 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 54 separate duplicated blocks between them, totalling at least 1035 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 (24 lines × 3) sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs:266 — sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs:266-289 | sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs:286-309 | sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.rs:363-386 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs` and `sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs` as WHOLE FILES: this scan already matched 39 separate duplicated blocks between them, totalling at least 959 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 (24 lines × 3) sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/mod.rs:384 — sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/mod.rs:384-407 | sui-execution/historical-versions/v2/sui-move-natives/src/object_runtime/mod.rs:346-369 | sui-execution/historical-versions/v3/sui-move-natives/src/object_runtime/mod.rs:466-489 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/mod.rs` and `sui-execution/historical-versions/v2/sui-move-natives/src/object_runtime/mod.rs` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 314 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 (24 lines × 3) sui-execution/historical-versions/v1/sui-move-natives/src/transfer.rs:52 — sui-execution/historical-versions/v1/sui-move-natives/src/transfer.rs:52-75 | sui-execution/historical-versions/v2/sui-move-natives/src/transfer.rs:52-75 | sui-execution/historical-versions/v3/sui-move-natives/src/transfer.rs:52-75 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-move-natives/src/transfer.rs` and `sui-execution/historical-versions/v2/sui-move-natives/src/transfer.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 177 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 (24 lines × 3) sui-execution/src/v0.rs:249 — sui-execution/src/v0.rs:249-272 | sui-execution/src/v1.rs:249-272 | sui-execution/src/v2.rs:249-272 — before extracting anything, compare `sui-execution/src/v0.rs` and `sui-execution/src/v1.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 132 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (19 lines × 4) · ×6
  • Duplicated block (19 lines × 4) sui-execution/historical-versions/v0/sui-adapter/src/execution_engine.rs:739 — sui-execution/historical-versions/v0/sui-adapter/src/execution_engine.rs:739-757 | sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs:944-962 | sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs:971-989 | sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.rs:1153-1171 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/execution_engine.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 531 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (19 lines × 4) REDACTED:578 — REDACTED:578-596 | REDACTED:563-581 | REDACTED:569-587 | REDACTED:748-766 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 54 separate duplicated blocks between them, totalling at least 1035 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (19 lines × 4) REDACTED:844 — REDACTED:844-862 | REDACTED:777-795 | REDACTED:783-801 | REDACTED:1024-1042 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 54 separate duplicated blocks between them, totalling at least 1035 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (19 lines × 4) sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs:364 — sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs:364-382 | sui-execution/historical-versions/v2/sui-adapter/src/temporary_store.rs:382-400 | sui-execution/historical-versions/v3/sui-adapter/src/temporary_store.rs:350-368 | sui-execution/latest/sui-adapter/src/temporary_store.rs:598-616 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs` and `sui-execution/historical-versions/v2/sui-adapter/src/temporary_store.rs` as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 779 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (19 lines × 4) sui-execution/historical-versions/v1/sui-move-natives/src/event.rs:96 — sui-execution/historical-versions/v1/sui-move-natives/src/event.rs:96-114 | sui-execution/historical-versions/v2/sui-move-natives/src/event.rs:99-117 | sui-execution/historical-versions/v3/sui-move-natives/src/event.rs:182-200 | sui-execution/latest/sui-move-natives/src/event.rs:183-201 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-move-natives/src/event.rs` and `sui-execution/historical-versions/v2/sui-move-natives/src/event.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 124 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (19 lines × 4) sui-execution/src/v0.rs:320 — sui-execution/src/v0.rs:320-338 | sui-execution/src/v1.rs:314-332 | sui-execution/src/v2.rs:314-332 | sui-execution/src/v3.rs:326-344 — before extracting anything, compare `sui-execution/src/v0.rs` and `sui-execution/src/v1.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 132 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (10 lines × 4) · ×6
  • Duplicated block (10 lines × 4) sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/context.rs:300 — sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/context.rs:300-309 | sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:284-293 | sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs:289-298 | sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/context.rs:328-337 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/context.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 378 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 × 4) sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/context.rs:1100 — sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/context.rs:1100-1109 | sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:1070-1079 | sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs:1127-1136 | sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/context.rs:1720-1729 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/context.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 378 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 × 4) REDACTED:1292 — REDACTED:1292-1301 | REDACTED:1213-1222 | REDACTED:1225-1234 | REDACTED:1496-1505 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 54 separate duplicated blocks between them, totalling at least 1035 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 × 4) sui-execution/historical-versions/v3/sui-move-natives/src/funds_accumulator.rs:30 — sui-execution/historical-versions/v3/sui-move-natives/src/funds_accumulator.rs:30-39 | sui-execution/historical-versions/v3/sui-move-natives/src/funds_accumulator.rs:109-119 | sui-execution/latest/sui-move-natives/src/funds_accumulator.rs:49-58 | sui-execution/latest/sui-move-natives/src/funds_accumulator.rs:121-131 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-move-natives/src/funds_accumulator.rs` and `sui-execution/latest/sui-move-natives/src/funds_accumulator.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 46 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 × 4) crates/sui/src/validator_commands.rs:1282 — crates/sui/src/validator_commands.rs:1282-1291 | crates/sui/src/validator_commands.rs:1297-1306 | crates/sui/src/validator_commands.rs:1313-1322 | crates/sui/src/validator_commands.rs:1328-1337 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (10 lines × 4) sui-execution/historical-versions/v0/sui-move-natives/src/test_utils.rs:31 — sui-execution/historical-versions/v0/sui-move-natives/src/test_utils.rs:31-40 | sui-execution/historical-versions/v1/sui-move-natives/src/test_utils.rs:31-40 | sui-execution/historical-versions/v2/sui-move-natives/src/test_utils.rs:32-41 | sui-execution/historical-versions/v3/sui-move-natives/src/test_utils.rs:32-41 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/test_utils.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/test_utils.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (8 lines × 5) · ×6
  • Duplicated block (8 lines × 5) sui-execution/historical-versions/v0/sui-move-natives/src/dynamic_field.rs:137 — sui-execution/historical-versions/v0/sui-move-natives/src/dynamic_field.rs:137-144 | sui-execution/historical-versions/v1/sui-move-natives/src/dynamic_field.rs:136-143 | sui-execution/historical-versions/v2/sui-move-natives/src/dynamic_field.rs:136-143 | sui-execution/historical-versions/v3/sui-move-natives/src/dynamic_field.rs:145-152 | sui-execution/latest/sui-move-natives/src/dynamic_field.rs:148-155 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/dynamic_field.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/dynamic_field.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 384 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 × 5) sui-execution/historical-versions/v0/sui-verifier/src/global_storage_access_verifier.rs:102 — sui-execution/historical-versions/v0/sui-verifier/src/global_storage_access_verifier.rs:102-109 | sui-execution/historical-versions/v0/sui-verifier/src/id_leak_verifier.rs:551-558 | sui-execution/historical-versions/v1/sui-verifier/src/global_storage_access_verifier.rs:102-109 | sui-execution/historical-versions/v1/sui-verifier/src/id_leak_verifier.rs:525-532 | sui-execution/historical-versions/v2/sui-verifier/src/id_leak_verifier.rs:540-547 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-verifier/src/global_storage_access_verifier.rs` and `sui-execution/historical-versions/v1/sui-verifier/src/global_storage_access_verifier.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 127 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 × 5) sui-execution/historical-versions/v0/sui-move-natives/src/object_runtime/mod.rs:429 — sui-execution/historical-versions/v0/sui-move-natives/src/object_runtime/mod.rs:429-436 | sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/mod.rs:496-503 | sui-execution/historical-versions/v2/sui-move-natives/src/object_runtime/mod.rs:464-471 | sui-execution/historical-versions/v3/sui-move-natives/src/object_runtime/mod.rs:649-656 | sui-execution/latest/sui-move-natives/src/object_runtime/mod.rs:852-859 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/object_runtime/mod.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/mod.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 208 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 × 5) sui-execution/historical-versions/v0/sui-verifier/src/meter.rs:67 — sui-execution/historical-versions/v0/sui-verifier/src/meter.rs:67-74 | sui-execution/historical-versions/v1/sui-verifier/src/meter.rs:67-74 | sui-execution/historical-versions/v2/sui-verifier/src/meter.rs:67-74 | sui-execution/historical-versions/v3/sui-verifier/src/meter.rs:65-72 | sui-execution/latest/sui-verifier/src/meter.rs:65-72 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-verifier/src/meter.rs` and `sui-execution/historical-versions/v1/sui-verifier/src/meter.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 54 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 × 5) sui-execution/historical-versions/v0/sui-verifier/src/meter.rs:76 — sui-execution/historical-versions/v0/sui-verifier/src/meter.rs:76-83 | sui-execution/historical-versions/v1/sui-verifier/src/meter.rs:76-83 | sui-execution/historical-versions/v2/sui-verifier/src/meter.rs:76-83 | sui-execution/historical-versions/v3/sui-verifier/src/meter.rs:74-81 | sui-execution/latest/sui-verifier/src/meter.rs:74-81 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-verifier/src/meter.rs` and `sui-execution/historical-versions/v1/sui-verifier/src/meter.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 54 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 × 5) sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/context.rs:316 — sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/context.rs:316-323 | sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:301-308 | sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs:306-313 | sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/context.rs:359-366 | sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/context.rs:483-490 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/context.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 378 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (5 lines × 4) · ×6
  • Duplicated block (5 lines × 4) sui-execution/historical-versions/v0/sui-adapter/src/execution_value.rs:232 — sui-execution/historical-versions/v0/sui-adapter/src/execution_value.rs:232-236 | sui-execution/historical-versions/v1/sui-adapter/src/execution_value.rs:232-236 | sui-execution/historical-versions/v2/sui-adapter/src/execution_value.rs:232-236 | sui-execution/historical-versions/v3/sui-adapter/src/execution_value.rs:315-319 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/execution_value.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/execution_value.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 64 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 4) sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/linkage_view.rs:300 — sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/linkage_view.rs:300-304 | sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/linkage_view.rs:237-241 | sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/linkage_view.rs:237-241 | sui-execution/historical-versions/v3/sui-adapter/src/data_store/legacy/linkage_view.rs:262-266 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/linkage_view.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/linkage_view.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 128 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 4) sui-execution/historical-versions/v0/sui-adapter/src/execution_mode.rs:234 — sui-execution/historical-versions/v0/sui-adapter/src/execution_mode.rs:234-238 | sui-execution/historical-versions/v1/sui-adapter/src/execution_mode.rs:234-238 | sui-execution/historical-versions/v2/sui-adapter/src/execution_mode.rs:234-238 | sui-execution/historical-versions/v3/sui-adapter/src/execution_mode.rs:308-312 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/execution_mode.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/execution_mode.rs` as WHOLE FILES: this scan already matched 3 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 4) sui-execution/historical-versions/v0/sui-adapter/src/gas_meter.rs:71 — sui-execution/historical-versions/v0/sui-adapter/src/gas_meter.rs:71-75 | sui-execution/historical-versions/v1/sui-adapter/src/gas_meter.rs:71-75 | sui-execution/historical-versions/v2/sui-adapter/src/gas_meter.rs:71-75 | sui-execution/historical-versions/v3/sui-adapter/src/gas_meter.rs:73-77 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/gas_meter.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/gas_meter.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 155 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 4) sui-execution/historical-versions/v3/sui-adapter/src/gas_meter.rs:213 — sui-execution/historical-versions/v3/sui-adapter/src/gas_meter.rs:213-219 | sui-execution/historical-versions/v3/sui-adapter/src/gas_meter.rs:243-247 | sui-execution/latest/sui-adapter/src/gas_meter.rs:232-238 | sui-execution/latest/sui-adapter/src/gas_meter.rs:262-266 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/gas_meter.rs` and `sui-execution/latest/sui-adapter/src/gas_meter.rs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 123 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 4) crates/sui-json-rpc-types/src/sui_transaction.rs:374 — crates/sui-json-rpc-types/src/sui_transaction.rs:374-378 | crates/sui-json-rpc-types/src/sui_transaction.rs:1293-1297 | crates/sui-json-rpc-types/src/sui_transaction.rs:1678-1685 | crates/sui/src/displays/dry_run_tx_block.rs:86-90 — before extracting anything, compare `crates/sui-json-rpc-types/src/sui_transaction.rs` and `crates/sui/src/displays/dry_run_tx_block.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 67 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (6 lines × 5) · ×6
  • Duplicated block (6 lines × 5) sui-execution/historical-versions/v0/sui-verifier/src/id_leak_verifier.rs:251 — sui-execution/historical-versions/v0/sui-verifier/src/id_leak_verifier.rs:251-256 | sui-execution/historical-versions/v1/sui-verifier/src/id_leak_verifier.rs:225-230 | sui-execution/historical-versions/v2/sui-verifier/src/id_leak_verifier.rs:240-245 | sui-execution/historical-versions/v3/sui-verifier/src/id_leak_verifier.rs:267-272 | sui-execution/latest/sui-verifier/src/id_leak_verifier.rs:273-278 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-verifier/src/id_leak_verifier.rs` and `sui-execution/historical-versions/v1/sui-verifier/src/id_leak_verifier.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 350 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 5) sui-execution/historical-versions/v0/sui-verifier/src/id_leak_verifier.rs:258 — sui-execution/historical-versions/v0/sui-verifier/src/id_leak_verifier.rs:258-263 | sui-execution/historical-versions/v1/sui-verifier/src/id_leak_verifier.rs:232-237 | sui-execution/historical-versions/v2/sui-verifier/src/id_leak_verifier.rs:247-252 | sui-execution/historical-versions/v3/sui-verifier/src/id_leak_verifier.rs:274-279 | sui-execution/latest/sui-verifier/src/id_leak_verifier.rs:280-285 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-verifier/src/id_leak_verifier.rs` and `sui-execution/historical-versions/v1/sui-verifier/src/id_leak_verifier.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 350 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 5) sui-execution/historical-versions/v0/sui-verifier/src/id_leak_verifier.rs:339 — sui-execution/historical-versions/v0/sui-verifier/src/id_leak_verifier.rs:339-344 | sui-execution/historical-versions/v1/sui-verifier/src/id_leak_verifier.rs:313-318 | sui-execution/historical-versions/v2/sui-verifier/src/id_leak_verifier.rs:328-333 | sui-execution/historical-versions/v3/sui-verifier/src/id_leak_verifier.rs:352-357 | sui-execution/latest/sui-verifier/src/id_leak_verifier.rs:358-363 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-verifier/src/id_leak_verifier.rs` and `sui-execution/historical-versions/v1/sui-verifier/src/id_leak_verifier.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 350 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 5) crates/sui-display/src/v2/visitor/vec_map.rs:98 — crates/sui-display/src/v2/visitor/vec_map.rs:98-103 | crates/sui-display/src/v2/visitor/vec_map.rs:105-110 | crates/sui-types/src/allowance.rs:83-88 | crates/sui-types/src/balance.rs:65-70 | crates/sui-types/src/funds_accumulator.rs:69-74 — there are 5 copies across 4 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart.
  • Duplicated block (6 lines × 5) crates/sui-json-rpc-types/src/sui_transaction.rs:354 — crates/sui-json-rpc-types/src/sui_transaction.rs:354-359 | crates/sui-json-rpc-types/src/sui_transaction.rs:374-379 | crates/sui/src/displays/dry_run_tx_block.rs:27-32 | crates/sui/src/displays/dry_run_tx_block.rs:69-74 | crates/sui/src/displays/dry_run_tx_block.rs:86-91 — before extracting anything, compare `crates/sui-json-rpc-types/src/sui_transaction.rs` and `crates/sui/src/displays/dry_run_tx_block.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 67 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 5) sui-execution/historical-versions/v0/sui-move-natives/src/test_utils.rs:23 — sui-execution/historical-versions/v0/sui-move-natives/src/test_utils.rs:23-28 | sui-execution/historical-versions/v1/sui-move-natives/src/test_utils.rs:23-28 | sui-execution/historical-versions/v2/sui-move-natives/src/test_utils.rs:23-28 | sui-execution/historical-versions/v3/sui-move-natives/src/test_utils.rs:23-28 | sui-execution/latest/sui-move-natives/src/test_utils.rs:23-28 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/test_utils.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/test_utils.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 40 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.
D1 · Cyclomatic Complexity · sui_adapter_latest · ×5
  • sui_adapter_latest::execution_engine::checked::execution_loop (cyclomatic 30) sui-execution/latest/sui-adapter/src/execution_engine.rs:1572 — sui_adapter_latest::execution_engine::checked::execution_loop has cyclomatic complexity 30 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • sui_adapter_latest::static_programmable_transactions::execution::interpreter::execute_command (cyclomatic 23) sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/interpreter.rs:157 — sui_adapter_latest::static_programmable_transactions::execution::interpreter::execute_command 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.
  • sui_adapter_latest::static_programmable_transactions::typing::invariant_checks::type_check::command (cyclomatic 18) sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/type_check.rs:154 — sui_adapter_latest::static_programmable_transactions::typing::invariant_checks::type_check::command 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.
  • sui_adapter_latest::static_programmable_transactions::typing::verify::input_arguments::primitive_serialization_layout (cyclomatic 18) sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/verify/input_arguments.rs:144 — sui_adapter_latest::static_programmable_transactions::typing::verify::input_arguments::primitive_serialization_layout has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • sui_adapter_latest::static_programmable_transactions::typing::invariant_checks::memory_safety::call (cyclomatic 17) sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs:820 — sui_adapter_latest::static_programmable_transactions::typing::invariant_checks::memory_safety::call has cyclomatic complexity 17 (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.
D2 · Cognitive Complexity · ConsensusHandler · ×5
  • ConsensusHandler::filter_consensus_txns (cognitive 116) crates/sui-core/src/consensus_handler.rs:2722 — ConsensusHandler::filter_consensus_txns has cognitive complexity 116 (threshold 15). Drivers by points: if/else 23 (82 pts), loops 7 (18 pts), match/switch 4 (15 pts), boolean chains 1 (nesting depth added 81). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ConsensusHandler::deduplicate_consensus_txns (cognitive 29) crates/sui-core/src/consensus_handler.rs:3103 — ConsensusHandler::deduplicate_consensus_txns has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (21 pts), match/switch 2 (4 pts), boolean chains 2, loops 2 (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.
  • ConsensusHandler::handle_deferral_and_cancellation (cognitive 26) crates/sui-core/src/consensus_handler.rs:1921 — ConsensusHandler::handle_deferral_and_cancellation has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (22 pts), boolean chains 2, 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.
  • ConsensusHandler::collect_transactions_to_schedule (cognitive 21) crates/sui-core/src/consensus_handler.rs:1426 — ConsensusHandler::collect_transactions_to_schedule has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 3, 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.
  • ConsensusHandler::create_pending_checkpoints (cognitive 17) crates/sui-core/src/consensus_handler.rs:1645 — ConsensusHandler::create_pending_checkpoints has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (10 pts), loops 3 (4 pts), boolean chains 3 (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · sui_benchmark · ×5
  • sui_benchmark::drivers::bench_driver::run_bench_worker (cognitive 74) crates/sui-benchmark/src/drivers/bench_driver.rs:758 — sui_benchmark::drivers::bench_driver::run_bench_worker has cognitive complexity 74 (threshold 15). Drivers by points: if/else 24 (58 pts), match/switch 6 (14 pts), loops 2 (nesting depth added 42). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • sui_benchmark::execute_soft_bundle_with_retries (cognitive 45) crates/sui-benchmark/src/lib.rs:702 — sui_benchmark::execute_soft_bundle_with_retries has cognitive complexity 45 (threshold 15). Drivers by points: if/else 6 (16 pts), match/switch 7 (16 pts), boolean chains 8, loops 3 (5 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.
  • sui_benchmark::drivers::bench_driver::process_bundle_results (cognitive 42) crates/sui-benchmark/src/drivers/bench_driver.rs:1318 — sui_benchmark::drivers::bench_driver::process_bundle_results has cognitive complexity 42 (threshold 15). Drivers by points: if/else 7 (18 pts), match/switch 4 (17 pts), loops 3 (7 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.
  • sui_benchmark::bin::stress::main (cognitive 33) crates/sui-benchmark/src/bin/stress.rs:55 — sui_benchmark::bin::stress::main has cognitive complexity 33 (threshold 15). Drivers by points: if/else 10 (26 pts), match/switch 3 (6 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.
  • sui_benchmark::drivers::bench_driver::spawn_workers_scheduler (cognitive 19) crates/sui-benchmark/src/drivers/bench_driver.rs:612 — sui_benchmark::drivers::bench_driver::spawn_workers_scheduler has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 2 (4 pts), 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.
D2 · Cognitive Complexity · Inner · ×5
  • Inner::execute_transaction_with_effects_waiting (cognitive 60) crates/sui-core/src/transaction_orchestrator.rs:480 — Inner::execute_transaction_with_effects_waiting has cognitive complexity 60 (threshold 15). Drivers by points: if/else 26 (51 pts), match/switch 2 (5 pts), boolean chains 2, loops 2 (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.
  • Inner::verify_commits (cognitive 21) consensus/core/src/commit_syncer.rs:820 — Inner::verify_commits has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 3 (4 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.
  • Inner::get_or_fetch_object_from_store (cognitive 19) sui-execution/historical-versions/v0/sui-move-natives/src/object_runtime/object_store.rs:83 — Inner::get_or_fetch_object_from_store has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (13 pts), match/switch 2 (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.
  • Inner::get_or_fetch_object_from_store (cognitive 19) sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/object_store.rs:147 — Inner::get_or_fetch_object_from_store has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (13 pts), match/switch 2 (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.
  • Inner::get_or_fetch_object_from_store (cognitive 19) sui-execution/historical-versions/v2/sui-move-natives/src/object_runtime/object_store.rs:150 — Inner::get_or_fetch_object_from_store has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (13 pts), match/switch 2 (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.
D2 · Cognitive Complexity · AuthorityState · ×5
  • AuthorityState::simulate_fork_during_execution (cognitive 40) crates/sui-core/src/authority.rs:2367 — AuthorityState::simulate_fork_during_execution has cognitive complexity 40 (threshold 15). Drivers by points: if/else 11 (38 pts), boolean chains 2 (nesting depth added 27). 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.
  • AuthorityState::execute_certificate (cognitive 25) crates/sui-core/src/authority.rs:1987 — AuthorityState::execute_certificate has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (17 pts), match/switch 4 (6 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • AuthorityState::create_and_execute_advance_epoch_tx (cognitive 20) crates/sui-core/src/authority.rs:4654 — AuthorityState::create_and_execute_advance_epoch_tx has cognitive complexity 20 (threshold 15). Drivers by points: if/else 19 (20 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.
  • AuthorityState::try_execute_immediately (cognitive 17) crates/sui-core/src/authority.rs:1534 — AuthorityState::try_execute_immediately has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 1, 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.
  • AuthorityState::get_system_package_bytes (cognitive 16) crates/sui-core/src/authority.rs:4062 — AuthorityState::get_system_package_bytes has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Context · ×5
  • Context::resolve_location (cognitive 28) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/translate.rs:250 — Context::resolve_location has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (21 pts), match/switch 4 (7 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.
  • Context::resolve_location (cognitive 28) sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/translate.rs:265 — Context::resolve_location has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (21 pts), match/switch 4 (7 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.
  • Context::find_non_transferrable (cognitive 22) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/memory_safety.rs:214 — Context::find_non_transferrable has cognitive complexity 22 (threshold 15). Drivers by points: if/else 4 (13 pts), loops 3 (7 pts), boolean chains 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.
  • Context::find_non_transferrable (cognitive 22) sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/verify/memory_safety.rs:228 — Context::find_non_transferrable has cognitive complexity 22 (threshold 15). Drivers by points: if/else 4 (13 pts), loops 3 (7 pts), boolean chains 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.
  • Context::finish (cognitive 17) sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/context.rs:489 — Context::finish has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 3 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D4 · Code Duplication · Duplicated block (35 lines × 2) · ×5
  • Duplicated block (35 lines × 2) crates/sui-light-client/src/verifier.rs:96 — crates/sui-light-client/src/verifier.rs:96-130 | crates/sui-light-client/src/verifier.rs:172-206 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (35 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/adapter.rs:156 — sui-execution/historical-versions/v3/sui-adapter/src/adapter.rs:156-190 | sui-execution/latest/sui-adapter/src/adapter.rs:170-204 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/adapter.rs` and `sui-execution/latest/sui-adapter/src/adapter.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 130 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 (35 lines × 2) REDACTED:817 — REDACTED:817-851 | sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/context.rs:1024-1058 — before extracting anything, compare `REDACTED` and `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/context.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 56 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 (35 lines × 2) REDACTED:892 — REDACTED:892-926 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/context.rs:2561-2595 — before extracting anything, compare `REDACTED` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/context.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 255 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 (35 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs:664 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs:664-698 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs:1614-1648 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs` as WHOLE FILES: this scan already matched 35 separate duplicated blocks between them, totalling at least 484 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (31 lines × 3) · ×5
  • Duplicated block (31 lines × 3) consensus/core/src/network/observer.rs:353 — consensus/core/src/network/observer.rs:353-383 | consensus/core/src/network/tonic_network.rs:231-261 | consensus/core/src/network/tonic_network.rs:327-357 — before extracting anything, compare `consensus/core/src/network/observer.rs` and `consensus/core/src/network/tonic_network.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 185 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 (31 lines × 3) sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/context.rs:1153 — sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/context.rs:1153-1183 | sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:1138-1168 | sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs:1195-1225 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/context.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 378 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (31 lines × 3) sui-execution/historical-versions/v0/sui-move-natives/src/object_runtime/mod.rs:601 — sui-execution/historical-versions/v0/sui-move-natives/src/object_runtime/mod.rs:601-631 | sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/mod.rs:647-677 | sui-execution/historical-versions/v2/sui-move-natives/src/object_runtime/mod.rs:615-645 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/object_runtime/mod.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/mod.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 208 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (31 lines × 3) crates/sui-indexer-alt-reader/src/object_versions.rs:113 — crates/sui-indexer-alt-reader/src/object_versions.rs:113-145 | crates/sui-indexer-alt-reader/src/object_versions.rs:186-219 | crates/sui-indexer-alt-reader/src/object_versions.rs:263-293 — 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 (31 lines × 3) sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs:218 — sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs:218-248 | sui-execution/historical-versions/v1/sui-move-natives/src/test_scenario.rs:213-243 | sui-execution/historical-versions/v2/sui-move-natives/src/test_scenario.rs:215-245 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/test_scenario.rs` as WHOLE FILES: this scan already matched 35 separate duplicated blocks between them, totalling at least 619 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (27 lines × 4) · ×5
  • Duplicated block (27 lines × 4) sui-execution/historical-versions/v0/sui-adapter/src/gas_charger.rs:154 — sui-execution/historical-versions/v0/sui-adapter/src/gas_charger.rs:154-180 | sui-execution/historical-versions/v1/sui-adapter/src/gas_charger.rs:155-181 | sui-execution/historical-versions/v2/sui-adapter/src/gas_charger.rs:156-182 | sui-execution/historical-versions/v3/sui-adapter/src/gas_charger.rs:184-210 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/gas_charger.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/gas_charger.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 114 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 (27 lines × 4) sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/context.rs:621 — sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/context.rs:621-647 | sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:620-646 | sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs:641-667 | sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/context.rs:881-907 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/context.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 378 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 (27 lines × 4) REDACTED:350 — REDACTED:350-376 | REDACTED:354-380 | REDACTED:360-386 | REDACTED:529-555 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 54 separate duplicated blocks between them, totalling at least 1035 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 (27 lines × 4) REDACTED:1250 — REDACTED:1250-1276 | REDACTED:1171-1197 | REDACTED:1183-1209 | REDACTED:1459-1485 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 54 separate duplicated blocks between them, totalling at least 1035 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 (27 lines × 4) sui-execution/historical-versions/v0/sui-move-natives/src/types.rs:56 — sui-execution/historical-versions/v0/sui-move-natives/src/types.rs:56-82 | sui-execution/historical-versions/v1/sui-move-natives/src/types.rs:56-82 | sui-execution/historical-versions/v2/sui-move-natives/src/types.rs:65-91 | sui-execution/historical-versions/v3/sui-move-natives/src/types.rs:63-89 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/types.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/types.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 55 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (25 lines × 3) · ×5
  • Duplicated block (25 lines × 3) sui-execution/historical-versions/v0/sui-adapter/src/execution_engine.rs:387 — sui-execution/historical-versions/v0/sui-adapter/src/execution_engine.rs:387-411 | sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs:492-516 | sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs:512-536 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/execution_engine.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 531 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 (25 lines × 3) sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/context.rs:343 — sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/context.rs:343-367 | sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:328-352 | sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs:334-358 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/context.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 378 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 (25 lines × 3) REDACTED:1324 — REDACTED:1324-1348 | REDACTED:1247-1271 | REDACTED:1259-1283 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 54 separate duplicated blocks between them, totalling at least 1035 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 (25 lines × 3) sui-execution/historical-versions/v0/sui-verifier/src/meter.rs:41 — sui-execution/historical-versions/v0/sui-verifier/src/meter.rs:41-65 | sui-execution/historical-versions/v1/sui-verifier/src/meter.rs:41-65 | sui-execution/historical-versions/v2/sui-verifier/src/meter.rs:41-65 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-verifier/src/meter.rs` and `sui-execution/historical-versions/v1/sui-verifier/src/meter.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 54 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 (25 lines × 3) sui-execution/historical-versions/v2/sui-verifier/src/entry_points_verifier.rs:230 — sui-execution/historical-versions/v2/sui-verifier/src/entry_points_verifier.rs:230-254 | sui-execution/historical-versions/v3/sui-verifier/src/entry_points_verifier.rs:230-254 | sui-execution/latest/sui-verifier/src/entry_points_verifier.rs:230-254 — before extracting anything, compare `sui-execution/historical-versions/v2/sui-verifier/src/entry_points_verifier.rs` and `sui-execution/historical-versions/v3/sui-verifier/src/entry_points_verifier.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 184 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (23 lines × 3) · ×5
  • Duplicated block (23 lines × 3) sui-execution/historical-versions/v0/sui-adapter/src/gas_meter.rs:89 — sui-execution/historical-versions/v0/sui-adapter/src/gas_meter.rs:89-111 | sui-execution/historical-versions/v1/sui-adapter/src/gas_meter.rs:89-111 | sui-execution/historical-versions/v2/sui-adapter/src/gas_meter.rs:89-111 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/gas_meter.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/gas_meter.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 155 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 (23 lines × 3) sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs:1099 — sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs:1099-1121 | sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.rs:1364-1386 | sui-execution/latest/sui-adapter/src/execution_engine.rs:2362-2384 — before extracting anything, compare `sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs` and `sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.rs` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 603 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 (23 lines × 3) sui-execution/historical-versions/v2/sui-move-natives/src/crypto/poseidon.rs:59 — sui-execution/historical-versions/v2/sui-move-natives/src/crypto/poseidon.rs:59-81 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/poseidon.rs:58-80 | sui-execution/latest/sui-move-natives/src/crypto/poseidon.rs:59-81 — before extracting anything, compare `sui-execution/historical-versions/v2/sui-move-natives/src/crypto/poseidon.rs` and `sui-execution/historical-versions/v3/sui-move-natives/src/crypto/poseidon.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 47 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 (23 lines × 3) sui-execution/historical-versions/v2/sui-move-natives/src/object_runtime/mod.rs:216 — sui-execution/historical-versions/v2/sui-move-natives/src/object_runtime/mod.rs:216-238 | sui-execution/historical-versions/v3/sui-move-natives/src/object_runtime/mod.rs:251-273 | sui-execution/latest/sui-move-natives/src/object_runtime/mod.rs:387-409 — before extracting anything, compare `sui-execution/historical-versions/v2/sui-move-natives/src/object_runtime/mod.rs` and `sui-execution/historical-versions/v3/sui-move-natives/src/object_runtime/mod.rs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 263 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 (23 lines × 3) sui-execution/historical-versions/v2/sui-move-natives/src/object_runtime/object_store.rs:522 — sui-execution/historical-versions/v2/sui-move-natives/src/object_runtime/object_store.rs:522-544 | sui-execution/historical-versions/v3/sui-move-natives/src/object_runtime/object_store.rs:619-641 | sui-execution/latest/sui-move-natives/src/object_runtime/object_store.rs:621-643 — before extracting anything, compare `sui-execution/historical-versions/v2/sui-move-natives/src/object_runtime/object_store.rs` and `sui-execution/historical-versions/v3/sui-move-natives/src/object_runtime/object_store.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 179 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (22 lines × 5) · ×5
  • Duplicated block (22 lines × 5) crates/sui-types/src/sui_system_state/simtest_sui_system_state_inner.rs:173 — crates/sui-types/src/sui_system_state/simtest_sui_system_state_inner.rs:173-194 | crates/sui-types/src/sui_system_state/simtest_sui_system_state_inner.rs:298-319 | crates/sui-types/src/sui_system_state/simtest_sui_system_state_inner.rs:452-473 | crates/sui-types/src/sui_system_state/sui_system_state_inner_v1.rs:576-597 | crates/sui-types/src/sui_system_state/sui_system_state_inner_v2.rs:135-156 — before extracting anything, compare `crates/sui-types/src/sui_system_state/sui_system_state_inner_v1.rs` and `crates/sui-types/src/sui_system_state/sui_system_state_inner_v2.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 184 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 (22 lines × 5) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/bls12381.rs:70 — sui-execution/historical-versions/v0/sui-move-natives/src/crypto/bls12381.rs:70-91 | sui-execution/historical-versions/v1/sui-move-natives/src/crypto/bls12381.rs:70-91 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/bls12381.rs:70-91 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/bls12381.rs:68-89 | sui-execution/latest/sui-move-natives/src/crypto/bls12381.rs:67-88 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/crypto/bls12381.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/crypto/bls12381.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 128 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 (22 lines × 5) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/bls12381.rs:151 — sui-execution/historical-versions/v0/sui-move-natives/src/crypto/bls12381.rs:151-172 | sui-execution/historical-versions/v1/sui-move-natives/src/crypto/bls12381.rs:151-172 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/bls12381.rs:151-172 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/bls12381.rs:147-168 | sui-execution/latest/sui-move-natives/src/crypto/bls12381.rs:146-167 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/crypto/bls12381.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/crypto/bls12381.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 128 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 (22 lines × 5) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/groth16.rs:163 — sui-execution/historical-versions/v0/sui-move-natives/src/crypto/groth16.rs:163-184 | sui-execution/historical-versions/v1/sui-move-natives/src/crypto/groth16.rs:163-184 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/groth16.rs:163-184 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/groth16.rs:163-184 | sui-execution/latest/sui-move-natives/src/crypto/groth16.rs:187-208 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/crypto/groth16.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/crypto/groth16.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 227 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 (22 lines × 5) sui-execution/historical-versions/v0/sui-verifier/src/id_leak_verifier.rs:316 — sui-execution/historical-versions/v0/sui-verifier/src/id_leak_verifier.rs:316-337 | sui-execution/historical-versions/v1/sui-verifier/src/id_leak_verifier.rs:290-311 | sui-execution/historical-versions/v2/sui-verifier/src/id_leak_verifier.rs:305-326 | sui-execution/historical-versions/v3/sui-verifier/src/id_leak_verifier.rs:329-350 | sui-execution/latest/sui-verifier/src/id_leak_verifier.rs:335-356 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-verifier/src/id_leak_verifier.rs` and `sui-execution/historical-versions/v1/sui-verifier/src/id_leak_verifier.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 350 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (19 lines × 5) · ×5
  • Duplicated block (19 lines × 5) sui-execution/historical-versions/v0/sui-adapter/src/gas_meter.rs:101 — sui-execution/historical-versions/v0/sui-adapter/src/gas_meter.rs:101-119 | sui-execution/historical-versions/v1/sui-adapter/src/gas_meter.rs:101-119 | sui-execution/historical-versions/v2/sui-adapter/src/gas_meter.rs:101-119 | sui-execution/historical-versions/v3/sui-adapter/src/gas_meter.rs:105-123 | sui-execution/latest/sui-adapter/src/gas_meter.rs:127-145 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/gas_meter.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/gas_meter.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 155 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (19 lines × 5) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_k1.rs:74 — sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_k1.rs:74-92 | sui-execution/historical-versions/v1/sui-move-natives/src/crypto/ecdsa_k1.rs:74-92 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/ecdsa_k1.rs:74-92 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/ecdsa_k1.rs:85-103 | sui-execution/latest/sui-move-natives/src/crypto/ecdsa_k1.rs:87-105 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_k1.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/crypto/ecdsa_k1.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 263 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (19 lines × 5) sui-execution/historical-versions/v0/sui-verifier/src/entry_points_verifier.rs:202 — sui-execution/historical-versions/v0/sui-verifier/src/entry_points_verifier.rs:202-220 | sui-execution/historical-versions/v1/sui-verifier/src/entry_points_verifier.rs:197-215 | sui-execution/historical-versions/v2/sui-verifier/src/entry_points_verifier.rs:202-220 | sui-execution/historical-versions/v3/sui-verifier/src/entry_points_verifier.rs:202-220 | sui-execution/latest/sui-verifier/src/entry_points_verifier.rs:202-220 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-verifier/src/entry_points_verifier.rs` and `sui-execution/historical-versions/v1/sui-verifier/src/entry_points_verifier.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 130 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (19 lines × 5) sui-execution/historical-versions/v0/sui-verifier/src/one_time_witness_verifier.rs:113 — sui-execution/historical-versions/v0/sui-verifier/src/one_time_witness_verifier.rs:113-131 | sui-execution/historical-versions/v1/sui-verifier/src/one_time_witness_verifier.rs:123-141 | sui-execution/historical-versions/v2/sui-verifier/src/one_time_witness_verifier.rs:123-141 | sui-execution/historical-versions/v3/sui-verifier/src/one_time_witness_verifier.rs:123-141 | sui-execution/latest/sui-verifier/src/one_time_witness_verifier.rs:123-141 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-verifier/src/one_time_witness_verifier.rs` and `sui-execution/historical-versions/v1/sui-verifier/src/one_time_witness_verifier.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 138 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (19 lines × 5) sui-execution/historical-versions/v0/sui-verifier/src/one_time_witness_verifier.rs:170 — sui-execution/historical-versions/v0/sui-verifier/src/one_time_witness_verifier.rs:170-188 | sui-execution/historical-versions/v1/sui-verifier/src/one_time_witness_verifier.rs:180-198 | sui-execution/historical-versions/v2/sui-verifier/src/one_time_witness_verifier.rs:180-198 | sui-execution/historical-versions/v3/sui-verifier/src/one_time_witness_verifier.rs:180-198 | sui-execution/latest/sui-verifier/src/one_time_witness_verifier.rs:180-198 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-verifier/src/one_time_witness_verifier.rs` and `sui-execution/historical-versions/v1/sui-verifier/src/one_time_witness_verifier.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 138 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (17 lines × 5) · ×5
  • Duplicated block (17 lines × 5) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_k1.rs:265 — sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_k1.rs:265-281 | sui-execution/historical-versions/v1/sui-move-natives/src/crypto/ecdsa_k1.rs:265-281 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/ecdsa_k1.rs:265-281 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/ecdsa_k1.rs:274-290 | sui-execution/latest/sui-move-natives/src/crypto/ecdsa_k1.rs:276-292 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_k1.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/crypto/ecdsa_k1.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 263 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (17 lines × 5) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_r1.rs:224 — sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_r1.rs:224-240 | sui-execution/historical-versions/v1/sui-move-natives/src/crypto/ecdsa_r1.rs:224-240 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/ecdsa_r1.rs:224-240 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/ecdsa_r1.rs:224-240 | sui-execution/latest/sui-move-natives/src/crypto/ecdsa_r1.rs:226-242 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_r1.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/crypto/ecdsa_r1.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 225 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (17 lines × 5) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/groth16.rs:221 — sui-execution/historical-versions/v0/sui-move-natives/src/crypto/groth16.rs:221-237 | sui-execution/historical-versions/v1/sui-move-natives/src/crypto/groth16.rs:221-237 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/groth16.rs:221-237 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/groth16.rs:229-245 | sui-execution/latest/sui-move-natives/src/crypto/groth16.rs:269-285 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/crypto/groth16.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/crypto/groth16.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 227 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (17 lines × 5) sui-execution/historical-versions/v0/sui-move-natives/src/object_runtime/mod.rs:605 — sui-execution/historical-versions/v0/sui-move-natives/src/object_runtime/mod.rs:605-621 | sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/mod.rs:651-667 | sui-execution/historical-versions/v2/sui-move-natives/src/object_runtime/mod.rs:619-635 | sui-execution/historical-versions/v3/sui-move-natives/src/object_runtime/mod.rs:938-954 | sui-execution/latest/sui-move-natives/src/object_runtime/mod.rs:1086-1102 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/object_runtime/mod.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/mod.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 208 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (17 lines × 5) sui-execution/historical-versions/v0/sui-verifier/src/private_generics.rs:69 — sui-execution/historical-versions/v0/sui-verifier/src/private_generics.rs:69-85 | sui-execution/historical-versions/v1/sui-verifier/src/private_generics.rs:71-87 | sui-execution/historical-versions/v2/sui-verifier/src/private_generics.rs:83-99 | sui-execution/historical-versions/v3/sui-verifier/src/private_generics.rs:86-102 | sui-execution/latest/sui-verifier/src/private_generics.rs:86-102 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-verifier/src/private_generics.rs` and `sui-execution/historical-versions/v1/sui-verifier/src/private_generics.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 144 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (14 lines × 5) · ×5
  • Duplicated block (14 lines × 5) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/hash.rs:37 — sui-execution/historical-versions/v0/sui-move-natives/src/crypto/hash.rs:37-50 | sui-execution/historical-versions/v1/sui-move-natives/src/crypto/hash.rs:37-50 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/hash.rs:37-50 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/hash.rs:37-50 | sui-execution/latest/sui-move-natives/src/crypto/hash.rs:39-52 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/crypto/hash.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/crypto/hash.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 75 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 × 5) sui-execution/historical-versions/v0/sui-move-natives/src/object_runtime/mod.rs:301 — sui-execution/historical-versions/v0/sui-move-natives/src/object_runtime/mod.rs:301-314 | sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/mod.rs:327-340 | sui-execution/historical-versions/v2/sui-move-natives/src/object_runtime/mod.rs:289-302 | sui-execution/historical-versions/v3/sui-move-natives/src/object_runtime/mod.rs:351-364 | sui-execution/latest/sui-move-natives/src/object_runtime/mod.rs:513-526 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/object_runtime/mod.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/mod.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 208 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 × 5) sui-execution/historical-versions/v0/sui-verifier/src/id_leak_verifier.rs:143 — sui-execution/historical-versions/v0/sui-verifier/src/id_leak_verifier.rs:143-156 | sui-execution/historical-versions/v1/sui-verifier/src/id_leak_verifier.rs:117-130 | sui-execution/historical-versions/v2/sui-verifier/src/id_leak_verifier.rs:132-145 | sui-execution/historical-versions/v3/sui-verifier/src/id_leak_verifier.rs:159-172 | sui-execution/latest/sui-verifier/src/id_leak_verifier.rs:165-178 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-verifier/src/id_leak_verifier.rs` and `sui-execution/historical-versions/v1/sui-verifier/src/id_leak_verifier.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 350 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 × 5) sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs:311 — sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs:311-324 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs:384-397 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs:457-470 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs:546-559 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs:861-874 — 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) sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs:374 — sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs:374-387 | sui-execution/historical-versions/v1/sui-move-natives/src/test_scenario.rs:369-382 | sui-execution/historical-versions/v2/sui-move-natives/src/test_scenario.rs:371-384 | sui-execution/historical-versions/v3/sui-move-natives/src/test_scenario.rs:501-514 | sui-execution/latest/sui-move-natives/src/test_scenario.rs:676-689 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/test_scenario.rs` as WHOLE FILES: this scan already matched 35 separate duplicated blocks between them, totalling at least 619 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (12–13 lines × 2) · ×5
  • Duplicated block (12–13 lines × 2) crates/sui-rpc-api/src/grpc/v2/state_service/list_dynamic_fields.rs:52 — crates/sui-rpc-api/src/grpc/v2/state_service/list_dynamic_fields.rs:52-64 | crates/sui-rpc-api/src/grpc/v2/state_service/list_owned_objects.rs:54-65 — before extracting anything, compare `crates/sui-rpc-api/src/grpc/v2/state_service/list_dynamic_fields.rs` and `crates/sui-rpc-api/src/grpc/v2/state_service/list_owned_objects.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 46 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (12–13 lines × 2) crates/sui-rpc-api/src/ledger_history/filter.rs:124 — crates/sui-rpc-api/src/ledger_history/filter.rs:124-135 | crates/sui-rpc-api/src/ledger_history/filter.rs:155-167 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12–13 lines × 2) crates/sui-swarm-config/src/node_config_builder.rs:218 — crates/sui-swarm-config/src/node_config_builder.rs:218-229 | crates/sui-swarm-config/src/node_config_builder.rs:618-630 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12–13 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/input_arguments.rs:302 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/input_arguments.rs:302-313 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/verify/input_arguments.rs:310-322 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/input_arguments.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/verify/input_arguments.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 132 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (12–13 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/input_arguments.rs:328 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/input_arguments.rs:328-339 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/verify/input_arguments.rs:337-349 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/input_arguments.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/verify/input_arguments.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 132 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (8–10 lines × 2) · ×5
  • Duplicated block (8–10 lines × 2) crates/sui-benchmark/src/workloads/party.rs:286 — crates/sui-benchmark/src/workloads/party.rs:286-295 | crates/sui-benchmark/src/workloads/party.rs:332-339 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8–10 lines × 2) crates/sui-indexer-alt-consistent-store/src/rpc/type_filter.rs:63 — crates/sui-indexer-alt-consistent-store/src/rpc/type_filter.rs:63-70 | crates/sui-indexer-alt-graphql/src/api/scalars/type_filter.rs:147-156 — 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–10 lines × 2) crates/sui-indexer-alt-framework/src/lib.rs:521 — crates/sui-indexer-alt-framework/src/lib.rs:521-528 | crates/sui-indexer-alt-framework/src/lib.rs:574-583 — both copies are in the same file, so extract the 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–10 lines × 2) crates/sui-indexer-alt-reader/src/object_versions.rs:84 — crates/sui-indexer-alt-reader/src/object_versions.rs:84-93 | crates/sui-indexer-alt-reader/src/tx_balance_changes.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 both call sites, so a change lands once.
  • Duplicated block (8–10 lines × 2) crates/sui-kv-rpc/src/v2/list_transactions.rs:619 — crates/sui-kv-rpc/src/v2/list_transactions.rs:619-628 | crates/sui-rpc-api/src/grpc/v2/ledger_service/list_transactions.rs:608-615 — before extracting anything, compare `crates/sui-kv-rpc/src/v2/list_transactions.rs` and `crates/sui-rpc-api/src/grpc/v2/ledger_service/list_transactions.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (9–10 lines × 2) · ×5
  • Duplicated block (9–10 lines × 2) crates/sui-bridge-cli/src/main.rs:284 — crates/sui-bridge-cli/src/main.rs:284-292 | crates/sui-bridge-cli/src/main.rs:367-376 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9–10 lines × 2) crates/sui-indexer-alt-framework/src/ingestion/mod.rs:356 — crates/sui-indexer-alt-framework/src/ingestion/mod.rs:356-364 | crates/sui-kvstore/src/lib.rs:484-493 — 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–10 lines × 2) crates/sui-rpc-api/src/grpc/v2/ledger_service/get_transaction.rs:53 — crates/sui-rpc-api/src/grpc/v2/ledger_service/get_transaction.rs:53-62 | crates/sui-rpc-api/src/grpc/v2/ledger_service/get_transaction.rs:106-114 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9–10 lines × 2) crates/transaction-fuzzer/src/programmable_transaction_gen.rs:323 — crates/transaction-fuzzer/src/programmable_transaction_gen.rs:323-332 | crates/transaction-fuzzer/src/programmable_transaction_gen.rs:361-369 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9–10 lines × 2) sui-execution/historical-versions/v0/sui-adapter/src/gas_charger.rs:321 — sui-execution/historical-versions/v0/sui-adapter/src/gas_charger.rs:321-329 | sui-execution/historical-versions/v0/sui-adapter/src/gas_charger.rs:343-352 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (9 lines × 6) · ×5
  • Duplicated block (9 lines × 6) sui-execution/historical-versions/v1/sui-adapter/src/gas_charger.rs:330 — sui-execution/historical-versions/v1/sui-adapter/src/gas_charger.rs:330-338 | sui-execution/historical-versions/v1/sui-adapter/src/gas_charger.rs:352-361 | sui-execution/historical-versions/v2/sui-adapter/src/gas_charger.rs:331-339 | sui-execution/historical-versions/v2/sui-adapter/src/gas_charger.rs:353-362 | sui-execution/historical-versions/v3/sui-adapter/src/gas_charger.rs:446-454 | sui-execution/historical-versions/v3/sui-adapter/src/gas_charger.rs:469-478 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-adapter/src/gas_charger.rs` and `sui-execution/historical-versions/v2/sui-adapter/src/gas_charger.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 205 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 6) sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs:255 — sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs:255-263 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs:312-320 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs:384-392 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs:456-464 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs:526-534 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs:737-745 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (9 lines × 6) sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs:254 — sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs:254-262 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs:318-326 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs:391-399 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs:464-472 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs:553-561 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs:868-876 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (9 lines × 6) sui-execution/latest/sui-move-natives/src/crypto/group_ops.rs:257 — sui-execution/latest/sui-move-natives/src/crypto/group_ops.rs:257-265 | sui-execution/latest/sui-move-natives/src/crypto/group_ops.rs:321-329 | sui-execution/latest/sui-move-natives/src/crypto/group_ops.rs:394-402 | sui-execution/latest/sui-move-natives/src/crypto/group_ops.rs:467-475 | sui-execution/latest/sui-move-natives/src/crypto/group_ops.rs:556-564 | sui-execution/latest/sui-move-natives/src/crypto/group_ops.rs:870-878 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (9 lines × 6) sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs:362 — sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs:362-370 | sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs:444-452 | sui-execution/historical-versions/v1/sui-move-natives/src/test_scenario.rs:357-365 | sui-execution/historical-versions/v1/sui-move-natives/src/test_scenario.rs:439-447 | sui-execution/historical-versions/v2/sui-move-natives/src/test_scenario.rs:359-367 | sui-execution/historical-versions/v2/sui-move-natives/src/test_scenario.rs:441-449 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/test_scenario.rs` as WHOLE FILES: this scan already matched 35 separate duplicated blocks between them, totalling at least 619 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (8–9 lines × 2) · ×5
  • Duplicated block (8–9 lines × 2) crates/sui-analytics-indexer/src/handlers/tables/package.rs:35 — crates/sui-analytics-indexer/src/handlers/tables/package.rs:35-43 | crates/sui-analytics-indexer/src/handlers/tables/package_bcs.rs:37-44 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (8–9 lines × 2) crates/typed-store/src/rocks/options.rs:179 — crates/typed-store/src/rocks/options.rs:179-186 | crates/typed-store/src/rocks/options.rs:232-240 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8–9 lines × 2) REDACTED:227 — REDACTED:227-235 | REDACTED:262-269 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8–9 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/input_arguments.rs:372 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/input_arguments.rs:372-380 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/verify/input_arguments.rs:387-394 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/input_arguments.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/verify/input_arguments.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 132 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (8–9 lines × 2) sui-execution/historical-versions/v3/sui-move-natives/src/dynamic_field.rs:318 — sui-execution/historical-versions/v3/sui-move-natives/src/dynamic_field.rs:318-325 | sui-execution/historical-versions/v3/sui-move-natives/src/dynamic_field.rs:404-412 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D1 · Cyclomatic Complexity · Operations · ×4
  • Operations::parse_merge_and_redeem (cyclomatic 56) crates/sui-rosetta/src/operations.rs:1099 — Operations::parse_merge_and_redeem has cyclomatic complexity 56 (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.
  • Operations::parse_programmable_transaction (cyclomatic 51) crates/sui-rosetta/src/operations.rs:515 — Operations::parse_programmable_transaction has cyclomatic complexity 51 (threshold 15). Of this number, 26 points are the body's own statements and 25 belong to 6 function items inside it that branch. 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.
  • Operations::parse_consolidate (cyclomatic 29) crates/sui-rosetta/src/operations.rs:946 — Operations::parse_consolidate 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.
  • Operations::try_from_executed_transaction (cyclomatic 16) crates/sui-rosetta/src/operations.rs:1848 — Operations::try_from_executed_transaction has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ExecutionContext · ×4
  • ExecutionContext::finish (cyclomatic 33) sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/context.rs:547 — ExecutionContext::finish 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.
  • ExecutionContext::finish (cyclomatic 27) sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs:574 — ExecutionContext::finish 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.
  • ExecutionContext::finish (cyclomatic 24) sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/context.rs:803 — ExecutionContext::finish 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.
  • ExecutionContext::finish (cyclomatic 22) sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:556 — ExecutionContext::finish has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sui_kv_rpc · ×4
  • sui_kv_rpc::render::transaction_to_response (cyclomatic 26) crates/sui-kv-rpc/src/render.rs:201 — sui_kv_rpc::render::transaction_to_response 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.
  • sui_kv_rpc::pipeline::chunks_with_watermarks (cyclomatic 21) crates/sui-kv-rpc/src/pipeline.rs:522 — sui_kv_rpc::pipeline::chunks_with_watermarks 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.
  • sui_kv_rpc::v2::list_transactions::list_transactions (cyclomatic 18) crates/sui-kv-rpc/src/v2/list_transactions.rs:83 — sui_kv_rpc::v2::list_transactions::list_transactions 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.
  • sui_kv_rpc::v2::list_events::list_events (cyclomatic 16) crates/sui-kv-rpc/src/v2/list_events.rs:79 — sui_kv_rpc::v2::list_events::list_events 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.
D17 · Explicit Debt · HackComment · ×4
  • HackComment crates/sui-types/src/object/rpc_visitor/mod.rs:190 — // HACK: Bypassing the layout to deserialize its bytes as a Rust type. — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
  • HackComment crates/sui-types/src/object/rpc_visitor/mod.rs:201 — // HACK: Bypassing the layout to deserialize its bytes as a Rust type. — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
  • HackComment crates/sui-types/src/object/rpc_visitor/mod.rs:222 — // HACK: Bypassing the layout to deserialize its bytes as a Rust type. — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
  • HackComment crates/sui-types/src/dynamic_field/visitor.rs:114 — // HACK: Bypassing `id`'s layout to deserialize its bytes as a Rust type. — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
D2 · Cognitive Complexity · sui_inverted_index · ×4
  • sui_inverted_index::bitmap_query::iter::eval_bitmap_query_bucket_iter (cognitive 110) crates/sui-inverted-index/src/bitmap_query/iter.rs:206 — sui_inverted_index::bitmap_query::iter::eval_bitmap_query_bucket_iter has cognitive complexity 110 (threshold 15). Drivers by points: if/else 24 (64 pts), loops 11 (23 pts), match/switch 5 (19 pts), boolean chains 4 (nesting depth added 66). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • sui_inverted_index::bitmap_query::stream::eval_bitmap_query_bucket_stream (cognitive 102) crates/sui-inverted-index/src/bitmap_query/stream.rs:185 — sui_inverted_index::bitmap_query::stream::eval_bitmap_query_bucket_stream has cognitive complexity 102 (threshold 15). Drivers by points: if/else 22 (56 pts), loops 11 (22 pts), match/switch 5 (20 pts), boolean chains 4 (nesting depth added 60). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • sui_inverted_index::bitmap_query::stream::flatten_watermarked_buckets (cognitive 36) crates/sui-inverted-index/src/bitmap_query/stream.rs:521 — sui_inverted_index::bitmap_query::stream::flatten_watermarked_buckets has cognitive complexity 36 (threshold 15). Drivers by points: if/else 9 (23 pts), loops 3 (9 pts), boolean chains 2, match/switch 1 (2 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.
  • sui_inverted_index::dimensions::for_each_transaction_dimension (cognitive 17) crates/sui-inverted-index/src/dimensions.rs:137 — sui_inverted_index::dimensions::for_each_transaction_dimension has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 4 (5 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Operations · ×4
  • Operations::parse_merge_and_redeem (cognitive 99) crates/sui-rosetta/src/operations.rs:1099 — Operations::parse_merge_and_redeem has cognitive complexity 99 (threshold 15). Drivers by points: if/else 36 (79 pts), match/switch 5 (13 pts), loops 2 (4 pts), boolean chains 3 (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.
  • Operations::parse_consolidate (cognitive 65) crates/sui-rosetta/src/operations.rs:946 — Operations::parse_consolidate has cognitive complexity 65 (threshold 15). Drivers by points: if/else 19 (52 pts), match/switch 2 (6 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 39). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Operations::parse_programmable_transaction (cognitive 58) crates/sui-rosetta/src/operations.rs:515 — Operations::parse_programmable_transaction has cognitive complexity 58 (threshold 15). Drivers by points: match/switch 21 (34 pts), if/else 13 (15 pts), boolean chains 7, loops 2 (nesting depth added 15). Of this number, 21 points are the body's own statements and 37 belong to 6 function items inside it that branch. 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.
  • Operations::try_from_executed_transaction (cognitive 22) crates/sui-rosetta/src/operations.rs:1848 — Operations::try_from_executed_transaction has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 5, 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.
D2 · Cognitive Complexity · ExecutionContext · ×4
  • ExecutionContext::finish (cognitive 64) sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/context.rs:547 — ExecutionContext::finish has cognitive complexity 64 (threshold 15). Drivers by points: if/else 18 (33 pts), match/switch 5 (17 pts), loops 8 (11 pts), boolean chains 3 (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.
  • ExecutionContext::finish (cognitive 50) sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs:574 — ExecutionContext::finish has cognitive complexity 50 (threshold 15). Drivers by points: if/else 15 (33 pts), loops 8 (11 pts), match/switch 1 (4 pts), boolean chains 2 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ExecutionContext::finish (cognitive 41) sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/context.rs:803 — ExecutionContext::finish has cognitive complexity 41 (threshold 15). Drivers by points: if/else 12 (25 pts), loops 7 (10 pts), match/switch 1 (4 pts), boolean chains 2 (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.
  • ExecutionContext::finish (cognitive 39) sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:556 — ExecutionContext::finish has cognitive complexity 39 (threshold 15). Drivers by points: if/else 10 (23 pts), loops 7 (10 pts), match/switch 1 (4 pts), boolean chains 2 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sui_core · ×4
  • sui_core::traffic_controller::run_tally_loop (cognitive 49) crates/sui-core/src/traffic_controller/mod.rs:468 — sui_core::traffic_controller::run_tally_loop has cognitive complexity 49 (threshold 15). Drivers by points: if/else 12 (43 pts), match/switch 2 (5 pts), loops 1 (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.
  • sui_core::execution_driver::execution_process (cognitive 28) crates/sui-core/src/execution_driver.rs:140 — sui_core::execution_driver::execution_process has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (22 pts), loops 2 (3 pts), match/switch 1 (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.
  • sui_core::transaction_simulation::simulate_transaction (cognitive 19) crates/sui-core/src/transaction_simulation.rs:60 — sui_core::transaction_simulation::simulate_transaction has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 4, loops 2, 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.
  • sui_core::transaction_deny_config_manager::evaluate_deny_configs (cognitive 18) crates/sui-core/src/transaction_deny_config_manager.rs:501 — sui_core::transaction_deny_config_manager::evaluate_deny_configs has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 5 (7 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.
D2 · Cognitive Complexity · sui_indexer_alt_framework · ×4
  • sui_indexer_alt_framework::pipeline::sequential::collector::collector (cognitive 33) crates/sui-indexer-alt-framework/src/pipeline/sequential/collector.rs:53 — sui_indexer_alt_framework::pipeline::sequential::collector::collector has cognitive complexity 33 (threshold 15). Drivers by points: if/else 7 (20 pts), match/switch 2 (6 pts), loops 3 (5 pts), boolean chains 2 (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.
  • sui_indexer_alt_framework::pipeline::concurrent::commit_watermark::commit_watermark (cognitive 29) crates/sui-indexer-alt-framework/src/pipeline/concurrent/commit_watermark.rs:51 — sui_indexer_alt_framework::pipeline::concurrent::commit_watermark::commit_watermark has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 3 (6 pts), match/switch 2 (5 pts), boolean chains 2 (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.
  • sui_indexer_alt_framework::pipeline::concurrent::pruner::pruner (cognitive 28) crates/sui-indexer-alt-framework/src/pipeline/concurrent/pruner.rs:98 — sui_indexer_alt_framework::pipeline::concurrent::pruner::pruner has cognitive complexity 28 (threshold 15). Drivers by points: if/else 5 (12 pts), match/switch 3 (9 pts), loops 4 (7 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.
  • sui_indexer_alt_framework::pipeline::concurrent::collector::collector (cognitive 27) crates/sui-indexer-alt-framework/src/pipeline/concurrent/collector.rs:74 — sui_indexer_alt_framework::pipeline::concurrent::collector::collector has cognitive complexity 27 (threshold 15). Drivers by points: if/else 5 (16 pts), match/switch 2 (6 pts), loops 3 (5 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TemporaryStore · ×4
  • TemporaryStore::get_objects_to_authenticate (cognitive 23) sui-execution/historical-versions/v0/sui-adapter/src/temporary_store.rs:501 — TemporaryStore::get_objects_to_authenticate has cognitive complexity 23 (threshold 15). Drivers by points: match/switch 5 (12 pts), if/else 3 (6 pts), loops 3, boolean chains 2 (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.
  • TemporaryStore::check_sui_conserved (cognitive 18) sui-execution/historical-versions/v0/sui-adapter/src/temporary_store.rs:882 — TemporaryStore::check_sui_conserved has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (17 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.
  • TemporaryStore::check_ownership_invariants (cognitive 17) sui-execution/historical-versions/v3/sui-adapter/src/temporary_store.rs:636 — TemporaryStore::check_ownership_invariants has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), match/switch 2 (4 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.
  • TemporaryStore::check_accumulator_amounts_representable (cognitive 16) sui-execution/latest/sui-adapter/src/temporary_store.rs:390 — TemporaryStore::check_accumulator_amounts_representable 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.
D29 · Static Analysis (SAST) · REDACTED · ×4
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Duplicated block (58 lines × 2) · ×4
  • Duplicated block (58 lines × 2) sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:684 — sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:684-741 | sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs:705-762 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs` and `sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs` as WHOLE FILES: this scan already matched 61 separate duplicated blocks between them, totalling at least 1074 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 (58 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/type_check.rs:307 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/type_check.rs:307-364 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/type_check.rs:329-386 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/type_check.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/type_check.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 289 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 (58 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/translate.rs:267 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/translate.rs:267-324 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/translate.rs:282-339 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/translate.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/translate.rs` as WHOLE FILES: this scan already matched 40 separate duplicated blocks between them, totalling at least 589 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 (58 lines × 2) sui-execution/historical-versions/v3/sui-move-natives/src/object_runtime/object_store.rs:271 — sui-execution/historical-versions/v3/sui-move-natives/src/object_runtime/object_store.rs:271-328 | sui-execution/latest/sui-move-natives/src/object_runtime/object_store.rs:253-310 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-move-natives/src/object_runtime/object_store.rs` and `sui-execution/latest/sui-move-natives/src/object_runtime/object_store.rs` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 521 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (42 lines × 2) · ×4
  • Duplicated block (42 lines × 2) sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:169 — sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:169-210 | sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs:174-215 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs` and `sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs` as WHOLE FILES: this scan already matched 61 separate duplicated blocks between them, totalling at least 1074 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 (42 lines × 2) sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs:958 — sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs:958-999 | sui-execution/latest/sui-move-natives/src/crypto/group_ops.rs:960-1001 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs` and `sui-execution/latest/sui-move-natives/src/crypto/group_ops.rs` as WHOLE FILES: this scan already matched 33 separate duplicated blocks between them, totalling at least 590 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 (42 lines × 2) sui-execution/historical-versions/v3/sui-move-natives/src/tx_context.rs:383 — sui-execution/historical-versions/v3/sui-move-natives/src/tx_context.rs:383-424 | sui-execution/latest/sui-move-natives/src/tx_context.rs:385-426 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-move-natives/src/tx_context.rs` and `sui-execution/latest/sui-move-natives/src/tx_context.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 258 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 (42 lines × 2) sui-execution/historical-versions/v3/sui-move-natives/src/test_scenario.rs:297 — sui-execution/historical-versions/v3/sui-move-natives/src/test_scenario.rs:297-338 | sui-execution/latest/sui-move-natives/src/test_scenario.rs:440-481 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-move-natives/src/test_scenario.rs` and `sui-execution/latest/sui-move-natives/src/test_scenario.rs` as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 610 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (38 lines × 2) · ×4
  • Duplicated block (38 lines × 2) sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:973 — sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:973-1010 | sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs:1030-1067 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs` and `sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs` as WHOLE FILES: this scan already matched 61 separate duplicated blocks between them, totalling at least 1074 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 (38 lines × 2) sui-execution/historical-versions/v1/sui-move-natives/src/transfer.rs:68 — sui-execution/historical-versions/v1/sui-move-natives/src/transfer.rs:68-105 | sui-execution/historical-versions/v2/sui-move-natives/src/transfer.rs:68-105 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-move-natives/src/transfer.rs` and `sui-execution/historical-versions/v2/sui-move-natives/src/transfer.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 177 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 (38 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/linkage/resolution.rs:61 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/linkage/resolution.rs:61-98 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/linkage/resolution.rs:115-152 — 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 (38 lines × 2) sui-execution/historical-versions/v3/sui-verifier/src/struct_with_key_verifier.rs:28 — sui-execution/historical-versions/v3/sui-verifier/src/struct_with_key_verifier.rs:28-65 | sui-execution/latest/sui-verifier/src/struct_with_key_verifier.rs:28-65 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-verifier/src/struct_with_key_verifier.rs` and `sui-execution/latest/sui-verifier/src/struct_with_key_verifier.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 107 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (37 lines × 2) · ×4
  • Duplicated block (37 lines × 2) crates/sui-benchmark/src/workloads/expected_failure.rs:153 — crates/sui-benchmark/src/workloads/expected_failure.rs:153-189 | crates/sui-benchmark/src/workloads/transfer_object.rs:146-182 — before extracting anything, compare `crates/sui-benchmark/src/workloads/expected_failure.rs` and `crates/sui-benchmark/src/workloads/transfer_object.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 78 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 (37 lines × 2) sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:129 — sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:129-165 | sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs:134-170 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs` and `sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs` as WHOLE FILES: this scan already matched 61 separate duplicated blocks between them, totalling at least 1074 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (37 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/type_check.rs:419 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/type_check.rs:419-455 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/type_check.rs:449-485 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/type_check.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/type_check.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 289 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (37 lines × 2) sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs:86 — sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs:86-122 | sui-execution/historical-versions/v1/sui-move-natives/src/test_scenario.rs:80-116 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/test_scenario.rs` as WHOLE FILES: this scan already matched 35 separate duplicated blocks between them, totalling at least 619 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (30 lines × 3) · ×4
  • Duplicated block (30 lines × 3) REDACTED:935 — REDACTED:935-964 | REDACTED:857-886 | REDACTED:869-898 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 54 separate duplicated blocks between them, totalling at least 1035 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 (30 lines × 3) sui-execution/historical-versions/v0/sui-move-natives/src/dynamic_field.rs:470 — sui-execution/historical-versions/v0/sui-move-natives/src/dynamic_field.rs:470-499 | sui-execution/historical-versions/v1/sui-move-natives/src/dynamic_field.rs:469-498 | sui-execution/historical-versions/v2/sui-move-natives/src/dynamic_field.rs:469-498 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/dynamic_field.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/dynamic_field.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 384 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 (30 lines × 3) sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:1001 — sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:1001-1030 | sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs:1058-1087 | sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/context.rs:1651-1680 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs` and `sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs` as WHOLE FILES: this scan already matched 61 separate duplicated blocks between them, totalling at least 1074 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 (30 lines × 3) REDACTED:567 — REDACTED:567-596 | REDACTED:573-602 | REDACTED:752-781 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 77 separate duplicated blocks between them, totalling at least 1502 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (29 lines × 3) · ×4
  • Duplicated block (29 lines × 3) sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:633 — sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:633-661 | sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs:654-682 | sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/context.rs:894-922 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs` and `sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs` as WHOLE FILES: this scan already matched 61 separate duplicated blocks between them, totalling at least 1074 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 (29 lines × 3) sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs:355 — sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs:355-383 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs:475-503 | sui-execution/latest/sui-move-natives/src/crypto/group_ops.rs:478-506 — before extracting anything, compare `sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs` and `sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 256 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 (29 lines × 3) sui-execution/historical-versions/v2/sui-move-natives/src/event.rs:80 — sui-execution/historical-versions/v2/sui-move-natives/src/event.rs:80-108 | sui-execution/historical-versions/v3/sui-move-natives/src/event.rs:163-191 | sui-execution/latest/sui-move-natives/src/event.rs:164-192 — before extracting anything, compare `sui-execution/historical-versions/v2/sui-move-natives/src/event.rs` and `sui-execution/historical-versions/v3/sui-move-natives/src/event.rs` as WHOLE FILES: this scan already matched 4 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 (29 lines × 3) sui-execution/historical-versions/v2/sui-move-natives/src/object_runtime/mod.rs:138 — sui-execution/historical-versions/v2/sui-move-natives/src/object_runtime/mod.rs:138-166 | sui-execution/historical-versions/v3/sui-move-natives/src/object_runtime/mod.rs:166-194 | sui-execution/latest/sui-move-natives/src/object_runtime/mod.rs:203-231 — before extracting anything, compare `sui-execution/historical-versions/v2/sui-move-natives/src/object_runtime/mod.rs` and `sui-execution/historical-versions/v3/sui-move-natives/src/object_runtime/mod.rs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 263 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (27 lines × 3) · ×4
  • Duplicated block (27 lines × 3) sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/context.rs:400 — sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/context.rs:400-426 | sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:397-423 | sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs:415-441 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/context.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 378 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 (27 lines × 3) sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/linkage_view.rs:150 — sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/linkage_view.rs:150-176 | sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/linkage_view.rs:117-143 | sui-execution/historical-versions/v3/sui-adapter/src/data_store/legacy/linkage_view.rs:130-156 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/linkage_view.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/linkage_view.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 128 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 (27 lines × 3) sui-execution/historical-versions/v0/sui-move-natives/src/tx_context.rs:30 — sui-execution/historical-versions/v0/sui-move-natives/src/tx_context.rs:30-56 | sui-execution/historical-versions/v1/sui-move-natives/src/tx_context.rs:30-56 | sui-execution/historical-versions/v2/sui-move-natives/src/tx_context.rs:30-56 — 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 (27 lines × 3) sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs:421 — sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs:421-447 | sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs:441-467 | sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.rs:518-544 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs` and `sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs` as WHOLE FILES: this scan already matched 39 separate duplicated blocks between them, totalling at least 959 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (25 lines × 4) · ×4
  • Duplicated block (25 lines × 4) REDACTED:1206 — REDACTED:1206-1230 | REDACTED:1127-1151 | REDACTED:1139-1163 | REDACTED:1374-1398 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 54 separate duplicated blocks between them, totalling at least 1035 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 (25 lines × 4) sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/linkage_view.rs:258 — sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/linkage_view.rs:258-282 | sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/linkage_view.rs:200-224 | sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/linkage_view.rs:200-224 | sui-execution/historical-versions/v3/sui-adapter/src/data_store/legacy/linkage_view.rs:222-246 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/linkage_view.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/linkage_view.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 128 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 (25 lines × 4) sui-execution/historical-versions/v1/sui-move-natives/src/crypto/zklogin.rs:153 — sui-execution/historical-versions/v1/sui-move-natives/src/crypto/zklogin.rs:153-177 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/zklogin.rs:153-177 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/zklogin.rs:149-173 | sui-execution/latest/sui-move-natives/src/crypto/zklogin.rs:152-176 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-move-natives/src/crypto/zklogin.rs` and `sui-execution/historical-versions/v2/sui-move-natives/src/crypto/zklogin.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 95 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 (25 lines × 4) sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs:613 — sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs:613-637 | sui-execution/historical-versions/v1/sui-move-natives/src/test_scenario.rs:608-632 | sui-execution/historical-versions/v2/sui-move-natives/src/test_scenario.rs:610-634 | sui-execution/historical-versions/v3/sui-move-natives/src/test_scenario.rs:885-909 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/test_scenario.rs` as WHOLE FILES: this scan already matched 35 separate duplicated blocks between them, totalling at least 619 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (24 lines × 5) · ×4
  • Duplicated block (24 lines × 5) sui-execution/historical-versions/v0/sui-adapter/src/execution_engine.rs:577 — sui-execution/historical-versions/v0/sui-adapter/src/execution_engine.rs:577-600 | sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs:781-804 | sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs:808-831 | sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.rs:932-955 | sui-execution/latest/sui-adapter/src/execution_engine.rs:1963-1986 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/execution_engine.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 531 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 (24 lines × 5) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_k1.rs:220 — sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_k1.rs:220-243 | sui-execution/historical-versions/v1/sui-move-natives/src/crypto/ecdsa_k1.rs:220-243 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/ecdsa_k1.rs:220-243 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/ecdsa_k1.rs:229-252 | sui-execution/latest/sui-move-natives/src/crypto/ecdsa_k1.rs:231-254 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_k1.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/crypto/ecdsa_k1.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 263 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 (24 lines × 5) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_r1.rs:179 — sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_r1.rs:179-202 | sui-execution/historical-versions/v1/sui-move-natives/src/crypto/ecdsa_r1.rs:179-202 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/ecdsa_r1.rs:179-202 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/ecdsa_r1.rs:179-202 | sui-execution/latest/sui-move-natives/src/crypto/ecdsa_r1.rs:181-204 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_r1.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/crypto/ecdsa_r1.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 225 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 (24 lines × 5) sui-execution/historical-versions/v0/sui-verifier/src/struct_with_key_verifier.rs:59 — sui-execution/historical-versions/v0/sui-verifier/src/struct_with_key_verifier.rs:59-82 | sui-execution/historical-versions/v1/sui-verifier/src/struct_with_key_verifier.rs:59-82 | sui-execution/historical-versions/v2/sui-verifier/src/struct_with_key_verifier.rs:59-82 | sui-execution/historical-versions/v3/sui-verifier/src/struct_with_key_verifier.rs:60-83 | sui-execution/latest/sui-verifier/src/struct_with_key_verifier.rs:60-83 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-verifier/src/struct_with_key_verifier.rs` and `sui-execution/historical-versions/v1/sui-verifier/src/struct_with_key_verifier.rs` as WHOLE FILES: this scan already matched 4 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (22 lines × 4) · ×4
  • Duplicated block (22 lines × 4) sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/context.rs:1263 — sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/context.rs:1263-1284 | sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:1266-1287 | sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs:1323-1344 | sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/context.rs:2002-2023 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/context.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 378 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 (22 lines × 4) sui-execution/historical-versions/v0/sui-move-natives/src/transfer.rs:113 — sui-execution/historical-versions/v0/sui-move-natives/src/transfer.rs:113-134 | sui-execution/historical-versions/v1/sui-move-natives/src/transfer.rs:201-222 | sui-execution/historical-versions/v2/sui-move-natives/src/transfer.rs:201-222 | sui-execution/historical-versions/v3/sui-move-natives/src/transfer.rs:286-307 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/transfer.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/transfer.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 115 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 (22 lines × 4) sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs:413 — sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs:413-434 | sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs:433-454 | sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.rs:510-531 | sui-execution/latest/sui-adapter/src/execution_engine.rs:1535-1556 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs` and `sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs` as WHOLE FILES: this scan already matched 39 separate duplicated blocks between them, totalling at least 959 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 (22 lines × 4) sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs:992 — sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs:992-1013 | sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs:1034-1055 | sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.rs:1292-1313 | sui-execution/latest/sui-adapter/src/execution_engine.rs:2290-2311 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs` and `sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs` as WHOLE FILES: this scan already matched 39 separate duplicated blocks between them, totalling at least 959 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (20 lines × 5) · ×4
  • Duplicated block (20 lines × 5) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_r1.rs:75 — sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_r1.rs:75-94 | sui-execution/historical-versions/v1/sui-move-natives/src/crypto/ecdsa_r1.rs:75-94 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/ecdsa_r1.rs:75-94 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/ecdsa_r1.rs:75-94 | sui-execution/latest/sui-move-natives/src/crypto/ecdsa_r1.rs:77-96 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_r1.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/crypto/ecdsa_r1.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 225 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 (20 lines × 5) sui-execution/historical-versions/v0/sui-move-natives/src/validator.rs:37 — sui-execution/historical-versions/v0/sui-move-natives/src/validator.rs:37-56 | sui-execution/historical-versions/v1/sui-move-natives/src/validator.rs:37-56 | sui-execution/historical-versions/v2/sui-move-natives/src/validator.rs:37-56 | sui-execution/historical-versions/v3/sui-move-natives/src/validator.rs:35-54 | sui-execution/latest/sui-move-natives/src/validator.rs:36-55 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/validator.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/validator.rs` as WHOLE FILES: this scan already matched 3 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. 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 (20 lines × 5) sui-execution/historical-versions/v0/sui-verifier/src/private_generics.rs:169 — sui-execution/historical-versions/v0/sui-verifier/src/private_generics.rs:169-188 | sui-execution/historical-versions/v1/sui-verifier/src/private_generics.rs:171-190 | sui-execution/historical-versions/v2/sui-verifier/src/private_generics.rs:190-209 | sui-execution/historical-versions/v3/sui-verifier/src/private_generics.rs:252-271 | sui-execution/latest/sui-verifier/src/private_generics.rs:252-271 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-verifier/src/private_generics.rs` and `sui-execution/historical-versions/v1/sui-verifier/src/private_generics.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 144 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 (20 lines × 5) sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs:233 — sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs:233-252 | sui-execution/historical-versions/v1/sui-move-natives/src/test_scenario.rs:228-247 | sui-execution/historical-versions/v2/sui-move-natives/src/test_scenario.rs:230-249 | sui-execution/historical-versions/v3/sui-move-natives/src/test_scenario.rs:355-374 | sui-execution/latest/sui-move-natives/src/test_scenario.rs:498-517 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/test_scenario.rs` as WHOLE FILES: this scan already matched 35 separate duplicated blocks between them, totalling at least 619 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (18 lines × 5) · ×4
  • Duplicated block (18 lines × 5) sui-execution/historical-versions/v0/sui-adapter/src/error.rs:68 — sui-execution/historical-versions/v0/sui-adapter/src/error.rs:68-85 | sui-execution/historical-versions/v1/sui-adapter/src/error.rs:68-85 | sui-execution/historical-versions/v2/sui-adapter/src/error.rs:68-85 | sui-execution/historical-versions/v3/sui-adapter/src/error.rs:63-80 | sui-execution/latest/sui-adapter/src/error.rs:63-80 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/error.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/error.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 75 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 (18 lines × 5) sui-execution/historical-versions/v0/sui-adapter/src/execution_engine.rs:734 — sui-execution/historical-versions/v0/sui-adapter/src/execution_engine.rs:734-751 | sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs:939-956 | sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs:966-983 | sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.rs:1148-1165 | sui-execution/latest/sui-adapter/src/execution_engine.rs:2146-2163 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/execution_engine.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 531 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 (18 lines × 5) REDACTED:1535 — REDACTED:1535-1552 | REDACTED:1492-1509 | REDACTED:1504-1521 | REDACTED:1988-2005 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/context.rs:2126-2143 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 54 separate duplicated blocks between them, totalling at least 1035 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 (18 lines × 5) sui-execution/historical-versions/v0/sui-move-natives/src/address.rs:36 — sui-execution/historical-versions/v0/sui-move-natives/src/address.rs:36-53 | sui-execution/historical-versions/v1/sui-move-natives/src/address.rs:36-53 | sui-execution/historical-versions/v2/sui-move-natives/src/address.rs:36-53 | sui-execution/historical-versions/v3/sui-move-natives/src/address.rs:34-51 | sui-execution/latest/sui-move-natives/src/address.rs:38-55 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/address.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/address.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 108 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (17–18 lines × 2) · ×4
  • Duplicated block (17–18 lines × 2) crates/sui-benchmark/src/lib.rs:251 — crates/sui-benchmark/src/lib.rs:251-268 | crates/sui-benchmark/src/lib.rs:271-287 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (17–18 lines × 2) crates/sui-data-store/src/stores/in_memory.rs:296 — crates/sui-data-store/src/stores/in_memory.rs:296-313 | crates/sui-data-store/src/stores/in_memory_lru.rs:229-245 — before extracting anything, compare `crates/sui-data-store/src/stores/in_memory.rs` and `crates/sui-data-store/src/stores/in_memory_lru.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 144 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (17–18 lines × 2) sui-execution/historical-versions/v0/sui-move-natives/src/object_runtime/mod.rs:215 — sui-execution/historical-versions/v0/sui-move-natives/src/object_runtime/mod.rs:215-231 | sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/mod.rs:233-250 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/object_runtime/mod.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/mod.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 208 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (17–18 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/context.rs:322 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/context.rs:322-338 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/context.rs:515-532 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/context.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/context.rs` as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 625 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (16 lines × 4) · ×4
  • Duplicated block (16 lines × 4) sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/context.rs:1293 — sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/context.rs:1293-1308 | sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:1296-1311 | sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs:1353-1368 | sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/context.rs:2032-2047 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/context.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 378 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (16 lines × 4) REDACTED:1083 — REDACTED:1083-1098 | REDACTED:1002-1017 | REDACTED:1014-1029 | REDACTED:1247-1262 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 54 separate duplicated blocks between them, totalling at least 1035 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (16 lines × 4) REDACTED:1326 — REDACTED:1326-1341 | REDACTED:1249-1264 | REDACTED:1261-1276 | REDACTED:1528-1543 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 54 separate duplicated blocks between them, totalling at least 1035 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (16 lines × 4) REDACTED:1430 — REDACTED:1430-1445 | REDACTED:1387-1402 | REDACTED:1399-1414 | REDACTED:1815-1830 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 54 separate duplicated blocks between them, totalling at least 1035 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (14 lines × 4) · ×4
  • Duplicated block (14 lines × 4) crates/sui-bridge-indexer/src/eth_bridge_indexer.rs:653 — crates/sui-bridge-indexer/src/eth_bridge_indexer.rs:653-666 | crates/sui-bridge-indexer/src/eth_bridge_indexer.rs:713-726 | crates/sui-bridge-indexer/src/eth_bridge_indexer.rs:770-783 | crates/sui-bridge-indexer/src/eth_bridge_indexer.rs:864-877 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (14 lines × 4) REDACTED:1487 — REDACTED:1487-1500 | REDACTED:1444-1457 | REDACTED:1456-1469 | REDACTED:1872-1885 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 54 separate duplicated blocks between them, totalling at least 1035 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 × 4) sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:1421 — sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:1421-1434 | sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs:1478-1491 | sui-execution/historical-versions/v3/sui-adapter/src/data_store/legacy/sui_data_store.rs:83-96 | sui-execution/historical-versions/v3/sui-adapter/src/data_store/linked_data_store.rs:80-93 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs` and `sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs` as WHOLE FILES: this scan already matched 61 separate duplicated blocks between them, totalling at least 1074 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 × 4) sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs:762 — sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs:762-775 | sui-execution/historical-versions/v2/sui-adapter/src/temporary_store.rs:814-827 | sui-execution/historical-versions/v3/sui-adapter/src/temporary_store.rs:797-810 | sui-execution/latest/sui-adapter/src/temporary_store.rs:1081-1094 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs` and `sui-execution/historical-versions/v2/sui-adapter/src/temporary_store.rs` as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 779 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (13–14 lines × 2) · ×4
  • Duplicated block (13–14 lines × 2) crates/sui-kvstore/src/store/mod.rs:441 — crates/sui-kvstore/src/store/mod.rs:441-454 | crates/sui-kvstore/src/store/mod.rs:512-524 — both copies are in the same file, so extract the 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–14 lines × 2) crates/sui-rosetta/src/state.rs:129 — crates/sui-rosetta/src/state.rs:129-142 | crates/sui-rosetta/src/state.rs:163-175 — both copies are in the same file, so extract the 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–14 lines × 2) crates/sui-rpc-api/src/grpc/v2/move_package_service/list_package_versions.rs:46 — crates/sui-rpc-api/src/grpc/v2/move_package_service/list_package_versions.rs:46-59 | crates/sui-rpc-api/src/grpc/v2/state_service/list_balances.rs:41-53 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (13–14 lines × 2) crates/sui-indexer-alt-e2e-tests/src/coin_registry.rs:120 — crates/sui-indexer-alt-e2e-tests/src/coin_registry.rs:120-133 | crates/sui-indexer-alt-e2e-tests/src/coin_registry.rs:169-181 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (12 lines × 5) · ×4
  • Duplicated block (12 lines × 5) sui-execution/historical-versions/v0/sui-adapter/src/error.rs:19 — sui-execution/historical-versions/v0/sui-adapter/src/error.rs:19-30 | sui-execution/historical-versions/v1/sui-adapter/src/error.rs:19-30 | sui-execution/historical-versions/v2/sui-adapter/src/error.rs:19-30 | sui-execution/historical-versions/v3/sui-adapter/src/error.rs:20-31 | sui-execution/latest/sui-adapter/src/error.rs:20-31 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/error.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/error.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 75 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 5) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecvrf.rs:54 — sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecvrf.rs:54-65 | sui-execution/historical-versions/v1/sui-move-natives/src/crypto/ecvrf.rs:54-65 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/ecvrf.rs:54-65 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/ecvrf.rs:52-63 | sui-execution/latest/sui-move-natives/src/crypto/ecvrf.rs:54-65 — 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 (12 lines × 5) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/groth16.rs:209 — sui-execution/historical-versions/v0/sui-move-natives/src/crypto/groth16.rs:209-220 | sui-execution/historical-versions/v1/sui-move-natives/src/crypto/groth16.rs:209-220 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/groth16.rs:209-220 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/groth16.rs:217-228 | sui-execution/latest/sui-move-natives/src/crypto/groth16.rs:251-262 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/crypto/groth16.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/crypto/groth16.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 227 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 5) sui-execution/historical-versions/v0/sui-move-natives/src/object_runtime/mod.rs:170 — sui-execution/historical-versions/v0/sui-move-natives/src/object_runtime/mod.rs:170-181 | sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/mod.rs:186-197 | sui-execution/historical-versions/v2/sui-move-natives/src/object_runtime/mod.rs:139-150 | sui-execution/historical-versions/v3/sui-move-natives/src/object_runtime/mod.rs:167-178 | sui-execution/latest/sui-move-natives/src/object_runtime/mod.rs:204-215 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/object_runtime/mod.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/mod.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 208 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (7–8 lines × 3) · ×4
  • Duplicated block (7–8 lines × 3) crates/sui-analytics-indexer/src/handlers/tables/package.rs:34 — crates/sui-analytics-indexer/src/handlers/tables/package.rs:34-41 | crates/sui-analytics-indexer/src/handlers/tables/package_bcs.rs:36-42 | crates/sui-analytics-indexer/src/handlers/tables/wrapped_object.rs:49-56 — 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 (7–8 lines × 3) crates/sui-benchmark/src/workloads/adversarial.rs:481 — crates/sui-benchmark/src/workloads/adversarial.rs:481-488 | crates/sui-benchmark/src/workloads/party.rs:251-258 | crates/sui-benchmark/src/workloads/slow.rs:217-223 — before extracting anything, compare `crates/sui-benchmark/src/workloads/adversarial.rs` and `crates/sui-benchmark/src/workloads/party.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. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (7–8 lines × 3) crates/sui-rosetta/src/types/internal_operation/pay_coin.rs:239 — crates/sui-rosetta/src/types/internal_operation/pay_coin.rs:239-245 | crates/sui-rosetta/src/types/internal_operation/pay_coin.rs:294-301 | crates/sui-rosetta/src/types/internal_operation/pay_sui.rs:278-284 — before extracting anything, compare `crates/sui-rosetta/src/types/internal_operation/pay_coin.rs` and `crates/sui-rosetta/src/types/internal_operation/pay_sui.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 117 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (7–8 lines × 3) sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:991 — sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:991-998 | sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs:1048-1055 | sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/context.rs:1638-1644 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs` and `sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs` as WHOLE FILES: this scan already matched 61 separate duplicated blocks between them, totalling at least 1074 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.
D1 · Cyclomatic Complexity · sui_adapter_v1 · ×3
  • sui_adapter_v1::execution_engine::checked::execution_loop (cyclomatic 27) sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs:450 — sui_adapter_v1::execution_engine::checked::execution_loop 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.
  • sui_adapter_v1::programmable_transactions::execution::checked::primitive_serialization_layout (cyclomatic 20) REDACTED:1405 — sui_adapter_v1::programmable_transactions::execution::checked::primitive_serialization_layout 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.
  • sui_adapter_v1::programmable_transactions::execution::checked::execute_command (cyclomatic 19) REDACTED:118 — sui_adapter_v1::programmable_transactions::execution::checked::execute_command 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.
D1 · Cyclomatic Complexity · sui_adapter_v2 · ×3
  • sui_adapter_v2::execution_engine::checked::execution_loop (cyclomatic 27) sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs:470 — sui_adapter_v2::execution_engine::checked::execution_loop 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.
  • sui_adapter_v2::programmable_transactions::execution::checked::primitive_serialization_layout (cyclomatic 20) REDACTED:1417 — sui_adapter_v2::programmable_transactions::execution::checked::primitive_serialization_layout 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.
  • sui_adapter_v2::programmable_transactions::execution::checked::execute_command (cyclomatic 19) REDACTED:123 — sui_adapter_v2::programmable_transactions::execution::checked::execute_command 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.
D1 · Cyclomatic Complexity · sui_json · ×3
  • sui_json::primitive_type (cyclomatic 19) crates/sui-json/src/lib.rs:564 — sui_json::primitive_type 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.
  • sui_json::layout_of_primitive_typetag (cyclomatic 17) crates/sui-json/src/lib.rs:621 — sui_json::layout_of_primitive_typetag has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • sui_json::move_value_to_json (cyclomatic 16) crates/sui-json/src/lib.rs:393 — sui_json::move_value_to_json 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.
D2 · Cognitive Complexity · ValidatorService · ×3
  • ValidatorService::handle_submit_transaction_inner (cognitive 172) crates/sui-core/src/authority_server.rs:697 — ValidatorService::handle_submit_transaction_inner has cognitive complexity 172 (threshold 15). Drivers by points: if/else 61 (128 pts), match/switch 10 (24 pts), loops 6 (15 pts), boolean chains 5 (nesting depth added 90). 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.
  • ValidatorService::get_client_ip_addr (cognitive 25) crates/sui-core/src/authority_server.rs:2078 — ValidatorService::get_client_ip_addr has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (22 pts), match/switch 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.
  • ValidatorService::handle_submit_transaction (cognitive 18) crates/sui-core/src/authority_server.rs:624 — ValidatorService::handle_submit_transaction has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (14 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.
D2 · Cognitive Complexity · Synchronizer · ×3
  • Synchronizer::run (cognitive 53) consensus/core/src/synchronizer.rs:370 — Synchronizer::run has cognitive complexity 53 (threshold 15). Drivers by points: if/else 13 (36 pts), match/switch 5 (15 pts), boolean chains 1, loops 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.
  • Synchronizer::start_fetch_own_last_block_task (cognitive 32) consensus/core/src/synchronizer.rs:803 — Synchronizer::start_fetch_own_last_block_task has cognitive complexity 32 (threshold 15). Drivers by points: if/else 6 (14 pts), match/switch 3 (12 pts), loops 4 (6 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Synchronizer::fetch_blocks_from_peers (cognitive 31) consensus/core/src/synchronizer.rs:1205 — Synchronizer::fetch_blocks_from_peers has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (21 pts), loops 5, match/switch 2 (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.
D2 · Cognitive Complexity · CompositePayload · ×3
  • CompositePayload::make_transaction_batch (cognitive 30) crates/sui-benchmark/src/workloads/composite/mod.rs:1350 — CompositePayload::make_transaction_batch has cognitive complexity 30 (threshold 15). Drivers by points: if/else 14 (20 pts), loops 3 (6 pts), boolean chains 4 (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.
  • CompositePayload::handle_batch_results (cognitive 18) crates/sui-benchmark/src/workloads/composite/mod.rs:1529 — CompositePayload::handle_batch_results has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 2, match/switch 1 (2 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • CompositePayload::next_party_step (cognitive 17) crates/sui-benchmark/src/workloads/composite/mod.rs:1217 — CompositePayload::next_party_step has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 1 (4 pts), boolean chains 3, match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CommitFinalizer · ×3
  • CommitFinalizer::try_indirect_finalize_pending_transactions_in_block (cognitive 26) consensus/core/src/commit_finalizer.rs:689 — CommitFinalizer::try_indirect_finalize_pending_transactions_in_block has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (19 pts), loops 3 (7 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.
  • CommitFinalizer::run (cognitive 22) consensus/core/src/commit_finalizer.rs:133 — CommitFinalizer::run has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 3 (7 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • CommitFinalizer::process_commit (cognitive 21) consensus/core/src/commit_finalizer.rs:182 — CommitFinalizer::process_commit has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 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.
D2 · Cognitive Complexity · sui_adapter_v1 · ×3
  • sui_adapter_v1::programmable_transactions::execution::checked::execute_command (cognitive 24) REDACTED:118 — sui_adapter_v1::programmable_transactions::execution::checked::execute_command has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 4 (8 pts), match/switch 2 (3 pts), boolean chains 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.
  • sui_adapter_v1::programmable_transactions::execution::checked::check_param_type (cognitive 19) REDACTED:1274 — sui_adapter_v1::programmable_transactions::execution::checked::check_param_type has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 1, match/switch 1 (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • sui_adapter_v1::programmable_transactions::execution::checked::build_move_args (cognitive 18) REDACTED:1162 — sui_adapter_v1::programmable_transactions::execution::checked::build_move_args has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), match/switch 2 (3 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.
D2 · Cognitive Complexity · sui_adapter_v2 · ×3
  • sui_adapter_v2::programmable_transactions::execution::checked::execute_command (cognitive 24) REDACTED:123 — sui_adapter_v2::programmable_transactions::execution::checked::execute_command has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 4 (8 pts), match/switch 2 (3 pts), boolean chains 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.
  • sui_adapter_v2::programmable_transactions::execution::checked::check_param_type (cognitive 19) REDACTED:1286 — sui_adapter_v2::programmable_transactions::execution::checked::check_param_type has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 1, match/switch 1 (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • sui_adapter_v2::programmable_transactions::execution::checked::build_move_args (cognitive 18) REDACTED:1174 — sui_adapter_v2::programmable_transactions::execution::checked::build_move_args has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), match/switch 2 (3 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.
D2 · Cognitive Complexity · ObjectRuntimeState · ×3
  • ObjectRuntimeState::finish (cognitive 21) sui-execution/historical-versions/v0/sui-move-natives/src/object_runtime/mod.rs:447 — ObjectRuntimeState::finish has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (9 pts), loops 4 (5 pts), boolean chains 4, match/switch 2 (3 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.
  • ObjectRuntimeState::finish (cognitive 18) sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/mod.rs:514 — ObjectRuntimeState::finish has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (11 pts), match/switch 2 (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.
  • ObjectRuntimeState::finish (cognitive 18) sui-execution/historical-versions/v2/sui-move-natives/src/object_runtime/mod.rs:482 — ObjectRuntimeState::finish has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (11 pts), match/switch 2 (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.
D36 · Supply-chain Provenance & Signing · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Near-duplicate member family (4 members, 24 shared lines) · ×3
  • Near-duplicate member family (4 members, 24 shared lines) REDACTED:1141 — REDACTED:1141-1198 | REDACTED:1060-1119 | REDACTED:1072-1131 | REDACTED:1313-1368 — These 4 members are variants of one another: a block of 24 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them 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.
  • Near-duplicate member family (4 members, 24 shared lines) REDACTED:1420 — REDACTED:1420-1445 | REDACTED:1377-1402 | REDACTED:1389-1414 | REDACTED:1805-1830 — These 4 members are variants of one another: a block of 24 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them 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.
  • Near-duplicate member family (4 members, 24 shared lines) sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/mod.rs:518 — sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/mod.rs:518-632 | sui-execution/historical-versions/v2/sui-move-natives/src/object_runtime/mod.rs:486-600 | sui-execution/historical-versions/v3/sui-move-natives/src/object_runtime/mod.rs:671-758 | sui-execution/latest/sui-move-natives/src/object_runtime/mod.rs:874-963 — These 4 members are variants of one another: a block of 24 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Duplicated block (49 lines × 2) · ×3
  • Duplicated block (49 lines × 2) crates/sui-rosetta/src/types/internal_operation/pay_sui.rs:39 — crates/sui-rosetta/src/types/internal_operation/pay_sui.rs:39-87 | crates/sui-rosetta/src/types/internal_operation/stake.rs:45-93 — before extracting anything, compare `crates/sui-rosetta/src/types/internal_operation/pay_sui.rs` and `crates/sui-rosetta/src/types/internal_operation/stake.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 218 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 (49 lines × 2) sui-execution/historical-versions/v0/sui-adapter/src/execution_engine.rs:392 — sui-execution/historical-versions/v0/sui-adapter/src/execution_engine.rs:392-440 | sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs:497-545 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/execution_engine.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 531 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 (49 lines × 2) sui-execution/historical-versions/v3/sui-move-natives/src/object_runtime/object_store.rs:688 — sui-execution/historical-versions/v3/sui-move-natives/src/object_runtime/object_store.rs:688-736 | sui-execution/latest/sui-move-natives/src/object_runtime/object_store.rs:690-738 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-move-natives/src/object_runtime/object_store.rs` and `sui-execution/latest/sui-move-natives/src/object_runtime/object_store.rs` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 521 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (48 lines × 2) · ×3
  • Duplicated block (48 lines × 2) sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs:459 — sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs:459-506 | sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs:479-526 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs` and `sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs` as WHOLE FILES: this scan already matched 39 separate duplicated blocks between them, totalling at least 959 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 (48 lines × 2) sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs:539 — sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs:539-586 | sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs:559-606 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs` and `sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs` as WHOLE FILES: this scan already matched 39 separate duplicated blocks between them, totalling at least 959 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 (48 lines × 2) sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs:135 — sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs:135-182 | sui-execution/historical-versions/v1/sui-move-natives/src/test_scenario.rs:130-177 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/test_scenario.rs` as WHOLE FILES: this scan already matched 35 separate duplicated blocks between them, totalling at least 619 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (45 lines × 2) · ×3
  • Duplicated block (45 lines × 2) crates/sui-bridge/src/events.rs:325 — crates/sui-bridge/src/events.rs:325-369 | crates/sui-bridge/src/events.rs:378-422 — both copies are in the same file, so extract the 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 (45 lines × 2) sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs:248 — sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs:248-292 | sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs:268-312 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs` and `sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs` as WHOLE FILES: this scan already matched 39 separate duplicated blocks between them, totalling at least 959 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 (45 lines × 2) sui-execution/historical-versions/v3/sui-move-natives/src/config.rs:68 — sui-execution/historical-versions/v3/sui-move-natives/src/config.rs:68-112 | sui-execution/latest/sui-move-natives/src/config.rs:69-113 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-move-natives/src/config.rs` and `sui-execution/latest/sui-move-natives/src/config.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 104 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (43 lines × 2) · ×3
  • Duplicated block (43 lines × 2) crates/sui-indexer-alt-graphql/src/api/types/transaction/mod.rs:506 — crates/sui-indexer-alt-graphql/src/api/types/transaction/mod.rs:506-548 | crates/sui-indexer-alt-graphql/src/api/types/transaction_effects.rs:489-531 — 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 (43 lines × 2) sui-execution/historical-versions/v0/sui-adapter/src/temporary_store.rs:508 — sui-execution/historical-versions/v0/sui-adapter/src/temporary_store.rs:508-550 | sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs:633-675 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/temporary_store.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 195 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 (43 lines × 2) sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs:293 — sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs:293-335 | sui-execution/historical-versions/v2/sui-adapter/src/temporary_store.rs:311-353 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs` and `sui-execution/historical-versions/v2/sui-adapter/src/temporary_store.rs` as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 779 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (41 lines × 2) · ×3
  • Duplicated block (41 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/adapter.rs:200 — sui-execution/historical-versions/v3/sui-adapter/src/adapter.rs:200-240 | sui-execution/latest/sui-adapter/src/adapter.rs:214-254 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/adapter.rs` and `sui-execution/latest/sui-adapter/src/adapter.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 130 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 (41 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/translate.rs:636 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/translate.rs:636-676 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/translate.rs:641-681 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/translate.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/translate.rs` as WHOLE FILES: this scan already matched 40 separate duplicated blocks between them, totalling at least 589 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 (41 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/spanned.rs:21 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/spanned.rs:21-61 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/spanned.rs:21-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.
D4 · Code Duplication · Duplicated block (39 lines × 2) · ×3
  • Duplicated block (39 lines × 2) consensus/core/src/network/observer.rs:322 — consensus/core/src/network/observer.rs:322-360 | consensus/core/src/network/tonic_network.rs:200-238 — before extracting anything, compare `consensus/core/src/network/observer.rs` and `consensus/core/src/network/tonic_network.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 185 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 (39 lines × 2) crates/sui-benchmark/src/workloads/composite/operations.rs:500 — crates/sui-benchmark/src/workloads/composite/operations.rs:500-538 | crates/sui-benchmark/src/workloads/composite/operations.rs:1013-1051 — both copies are in the same file, so extract the 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 (39 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.rs:1093 — sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.rs:1093-1131 | sui-execution/latest/sui-adapter/src/execution_engine.rs:2091-2129 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.rs` and `sui-execution/latest/sui-adapter/src/execution_engine.rs` as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 689 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (36 lines × 3) · ×3
  • Duplicated block (36 lines × 3) sui-execution/historical-versions/v0/sui-move-natives/src/dynamic_field.rs:283 — sui-execution/historical-versions/v0/sui-move-natives/src/dynamic_field.rs:283-318 | sui-execution/historical-versions/v1/sui-move-natives/src/dynamic_field.rs:282-317 | sui-execution/historical-versions/v2/sui-move-natives/src/dynamic_field.rs:282-317 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/dynamic_field.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/dynamic_field.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 384 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 (36 lines × 3) sui-execution/historical-versions/v0/sui-move-natives/src/validator.rs:31 — sui-execution/historical-versions/v0/sui-move-natives/src/validator.rs:31-66 | sui-execution/historical-versions/v1/sui-move-natives/src/validator.rs:31-66 | sui-execution/historical-versions/v2/sui-move-natives/src/validator.rs:31-66 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/validator.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/validator.rs` as WHOLE FILES: this scan already matched 3 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. 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 (36 lines × 3) sui-execution/historical-versions/v2/sui-move-natives/src/test_scenario.rs:118 — sui-execution/historical-versions/v2/sui-move-natives/src/test_scenario.rs:118-153 | sui-execution/historical-versions/v3/sui-move-natives/src/test_scenario.rs:207-242 | sui-execution/latest/sui-move-natives/src/test_scenario.rs:346-381 — before extracting anything, compare `sui-execution/historical-versions/v2/sui-move-natives/src/test_scenario.rs` and `sui-execution/historical-versions/v3/sui-move-natives/src/test_scenario.rs` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 432 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (28 lines × 5) · ×3
  • Duplicated block (28 lines × 5) sui-execution/historical-versions/v0/sui-adapter/src/adapter.rs:100 — sui-execution/historical-versions/v0/sui-adapter/src/adapter.rs:100-127 | sui-execution/historical-versions/v1/sui-adapter/src/adapter.rs:102-129 | sui-execution/historical-versions/v2/sui-adapter/src/adapter.rs:100-127 | sui-execution/historical-versions/v3/sui-adapter/src/adapter.rs:107-134 | sui-execution/latest/sui-adapter/src/adapter.rs:121-148 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/adapter.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/adapter.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 100 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (28 lines × 5) sui-execution/historical-versions/v0/sui-adapter/src/execution_engine.rs:472 — sui-execution/historical-versions/v0/sui-adapter/src/execution_engine.rs:472-499 | sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs:676-703 | sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs:703-730 | sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.rs:827-854 | sui-execution/latest/sui-adapter/src/execution_engine.rs:1861-1888 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/execution_engine.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 531 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (28 lines × 5) sui-execution/historical-versions/v0/sui-verifier/src/private_generics.rs:107 — sui-execution/historical-versions/v0/sui-verifier/src/private_generics.rs:107-134 | sui-execution/historical-versions/v1/sui-verifier/src/private_generics.rs:109-136 | sui-execution/historical-versions/v2/sui-verifier/src/private_generics.rs:128-155 | sui-execution/historical-versions/v3/sui-verifier/src/private_generics.rs:133-160 | sui-execution/latest/sui-verifier/src/private_generics.rs:133-160 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-verifier/src/private_generics.rs` and `sui-execution/historical-versions/v1/sui-verifier/src/private_generics.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 144 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (28 lines × 3) · ×3
  • Duplicated block (28 lines × 3) REDACTED:1264 — REDACTED:1264-1291 | REDACTED:1185-1212 | REDACTED:1197-1224 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 54 separate duplicated blocks between them, totalling at least 1035 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (28 lines × 3) sui-execution/historical-versions/v0/sui-verifier/src/id_leak_verifier.rs:151 — sui-execution/historical-versions/v0/sui-verifier/src/id_leak_verifier.rs:151-178 | sui-execution/historical-versions/v1/sui-verifier/src/id_leak_verifier.rs:125-152 | sui-execution/historical-versions/v2/sui-verifier/src/id_leak_verifier.rs:140-167 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-verifier/src/id_leak_verifier.rs` and `sui-execution/historical-versions/v1/sui-verifier/src/id_leak_verifier.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 350 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (28 lines × 3) sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs:763 — sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs:763-790 | sui-execution/historical-versions/v2/sui-adapter/src/temporary_store.rs:815-842 | sui-execution/historical-versions/v3/sui-adapter/src/temporary_store.rs:798-825 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs` and `sui-execution/historical-versions/v2/sui-adapter/src/temporary_store.rs` as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 779 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (24–25 lines × 2) · ×3
  • Duplicated block (24–25 lines × 2) crates/sui-consistent-store/src/restore/formal_snapshot.rs:368 — crates/sui-consistent-store/src/restore/formal_snapshot.rs:368-391 | crates/sui-indexer-alt-consistent-store/src/restore/formal_snapshot.rs:140-164 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (24–25 lines × 2) crates/sui-indexer-alt-consistent-store/src/handlers/mod.rs:82 — crates/sui-indexer-alt-consistent-store/src/handlers/mod.rs:82-106 | crates/sui-rpc-store/src/indexer/mod.rs:173-196 — before extracting anything, compare `crates/sui-indexer-alt-consistent-store/src/handlers/mod.rs` and `crates/sui-rpc-store/src/indexer/mod.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 80 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 (24–25 lines × 2) crates/sui/src/client_commands.rs:4235 — crates/sui/src/client_commands.rs:4235-4258 | crates/sui/src/client_commands.rs:4382-4406 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (21–22 lines × 3) · ×3
  • Duplicated block (21–22 lines × 3) sui-execution/historical-versions/v0/sui-adapter/src/gas_charger.rs:129 — sui-execution/historical-versions/v0/sui-adapter/src/gas_charger.rs:129-149 | sui-execution/historical-versions/v1/sui-adapter/src/gas_charger.rs:130-150 | sui-execution/historical-versions/v2/sui-adapter/src/gas_charger.rs:130-151 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/gas_charger.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/gas_charger.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 114 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 (21–22 lines × 3) sui-execution/historical-versions/v1/sui-adapter/src/gas_charger.rs:346 — sui-execution/historical-versions/v1/sui-adapter/src/gas_charger.rs:346-366 | sui-execution/historical-versions/v2/sui-adapter/src/gas_charger.rs:347-367 | sui-execution/historical-versions/v3/sui-adapter/src/gas_charger.rs:462-483 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-adapter/src/gas_charger.rs` and `sui-execution/historical-versions/v2/sui-adapter/src/gas_charger.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 205 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 (21–22 lines × 3) sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/trace_utils.rs:207 — sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/trace_utils.rs:207-228 | sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/trace_utils.rs:198-218 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/trace_utils.rs:196-216 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/trace_utils.rs` and `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/trace_utils.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 105 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (20–22 lines × 2) · ×3
  • Duplicated block (20–22 lines × 2) crates/sui-indexer-alt-reader/src/transactions.rs:88 — crates/sui-indexer-alt-reader/src/transactions.rs:88-109 | crates/sui-indexer-alt-reader/src/transactions.rs:142-161 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (20–22 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/context.rs:1515 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/context.rs:1515-1534 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/context.rs:2689-2710 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/context.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/context.rs` as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 625 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 (20–22 lines × 2) crates/sui-core/src/authority/authority_test_utils.rs:110 — crates/sui-core/src/authority/authority_test_utils.rs:110-131 | crates/sui-core/src/authority/authority_test_utils.rs:190-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.
D4 · Code Duplication · Duplicated block (21 lines × 5) · ×3
  • Duplicated block (21 lines × 5) REDACTED:795 — REDACTED:795-815 | REDACTED:730-750 | REDACTED:736-756 | REDACTED:975-995 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/context.rs:2512-2532 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 54 separate duplicated blocks between them, totalling at least 1035 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 (21 lines × 5) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/groth16.rs:80 — sui-execution/historical-versions/v0/sui-move-natives/src/crypto/groth16.rs:80-100 | sui-execution/historical-versions/v1/sui-move-natives/src/crypto/groth16.rs:80-100 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/groth16.rs:80-100 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/groth16.rs:80-100 | sui-execution/latest/sui-move-natives/src/crypto/groth16.rs:100-120 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/crypto/groth16.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/crypto/groth16.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 227 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 (21 lines × 5) sui-execution/historical-versions/v0/sui-verifier/src/private_generics.rs:144 — sui-execution/historical-versions/v0/sui-verifier/src/private_generics.rs:144-164 | sui-execution/historical-versions/v1/sui-verifier/src/private_generics.rs:146-166 | sui-execution/historical-versions/v2/sui-verifier/src/private_generics.rs:165-185 | sui-execution/historical-versions/v3/sui-verifier/src/private_generics.rs:192-212 | sui-execution/latest/sui-verifier/src/private_generics.rs:192-212 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-verifier/src/private_generics.rs` and `sui-execution/historical-versions/v1/sui-verifier/src/private_generics.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 144 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (18–19 lines × 2) · ×3
  • Duplicated block (18–19 lines × 2) crates/sui-proxy/src/histogram_relay.rs:52 — crates/sui-proxy/src/histogram_relay.rs:52-69 | crates/sui-proxy/src/metrics.rs:49-67 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (18–19 lines × 2) sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/object_store.rs:461 — sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/object_store.rs:461-479 | sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/object_store.rs:510-527 — both copies are in the same file, so extract the 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–19 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/interpreter.rs:293 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/interpreter.rs:293-311 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/interpreter.rs:327-344 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/interpreter.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/interpreter.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 170 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (15–18 lines × 2) · ×3
  • Duplicated block (15–18 lines × 2) crates/sui-benchmark/src/workloads/composite/operations.rs:683 — crates/sui-benchmark/src/workloads/composite/operations.rs:683-700 | crates/test-cluster/src/addr_balance_test_env.rs:524-538 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (15–18 lines × 2) crates/sui-transactional-test-runner/src/test_adapter.rs:2031 — crates/sui-transactional-test-runner/src/test_adapter.rs:2031-2048 | crates/sui-transactional-test-runner/src/test_adapter.rs:2205-2219 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (15–18 lines × 2) crates/sui-transactional-test-runner/src/test_adapter.rs:2076 — crates/sui-transactional-test-runner/src/test_adapter.rs:2076-2090 | crates/sui-transactional-test-runner/src/test_adapter.rs:2246-2263 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (16–17 lines × 2) · ×3
  • Duplicated block (16–17 lines × 2) crates/sui-rpc-api/src/grpc/v2/ledger_service/event_scan.rs:190 — crates/sui-rpc-api/src/grpc/v2/ledger_service/event_scan.rs:190-205 | crates/sui-rpc-api/src/grpc/v2/ledger_service/event_scan.rs:208-224 — both copies are in the same file, so extract the 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–17 lines × 2) REDACTED:91 — REDACTED:91-106 | REDACTED:91-107 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 77 separate duplicated blocks between them, totalling at least 1502 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (16–17 lines × 2) sui-execution/historical-versions/v3/sui-move-natives/src/object_runtime/mod.rs:303 — sui-execution/historical-versions/v3/sui-move-natives/src/object_runtime/mod.rs:303-318 | sui-execution/latest/sui-move-natives/src/object_runtime/mod.rs:440-456 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-move-natives/src/object_runtime/mod.rs` and `sui-execution/latest/sui-move-natives/src/object_runtime/mod.rs` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 491 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (16 lines × 5) · ×3
  • Duplicated block (16 lines × 5) sui-execution/historical-versions/v0/sui-adapter/src/execution_engine.rs:665 — sui-execution/historical-versions/v0/sui-adapter/src/execution_engine.rs:665-680 | sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs:870-885 | sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs:897-912 | sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.rs:1075-1090 | sui-execution/latest/sui-adapter/src/execution_engine.rs:2073-2088 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/execution_engine.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 531 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (16 lines × 5) sui-execution/historical-versions/v0/sui-adapter/src/temporary_store.rs:800 — sui-execution/historical-versions/v0/sui-adapter/src/temporary_store.rs:800-815 | sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs:865-880 | sui-execution/historical-versions/v2/sui-adapter/src/temporary_store.rs:917-932 | sui-execution/historical-versions/v3/sui-adapter/src/temporary_store.rs:900-915 | sui-execution/latest/sui-adapter/src/temporary_store/invariants.rs:519-534 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/temporary_store.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 195 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (16 lines × 5) sui-execution/historical-versions/v0/sui-move-natives/src/types.rs:72 — sui-execution/historical-versions/v0/sui-move-natives/src/types.rs:72-87 | sui-execution/historical-versions/v1/sui-move-natives/src/types.rs:72-87 | sui-execution/historical-versions/v2/sui-move-natives/src/types.rs:81-96 | sui-execution/historical-versions/v3/sui-move-natives/src/types.rs:79-94 | sui-execution/latest/sui-move-natives/src/types.rs:79-94 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/types.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/types.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 55 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (15–16 lines × 2) · ×3
  • Duplicated block (15–16 lines × 2) consensus/core/src/authority_service.rs:287 — consensus/core/src/authority_service.rs:287-301 | consensus/core/src/observer_service.rs:198-213 — before extracting anything, compare `consensus/core/src/authority_service.rs` and `consensus/core/src/observer_service.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 85 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (15–16 lines × 2) crates/sui-rosetta/src/types/internal_operation/consolidate_to_fungible.rs:170 — crates/sui-rosetta/src/types/internal_operation/consolidate_to_fungible.rs:170-185 | crates/sui-rosetta/src/types/internal_operation/merge_and_redeem.rs:232-246 — before extracting anything, compare `crates/sui-rosetta/src/types/internal_operation/consolidate_to_fungible.rs` and `crates/sui-rosetta/src/types/internal_operation/merge_and_redeem.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 45 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (15–16 lines × 2) crates/sui-types/src/full_checkpoint_content.rs:88 — crates/sui-types/src/full_checkpoint_content.rs:88-102 | crates/sui-types/src/full_checkpoint_content.rs:277-292 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (15 lines × 5) · ×3
  • Duplicated block (15 lines × 5) sui-execution/historical-versions/v0/sui-verifier/src/entry_points_verifier.rs:89 — sui-execution/historical-versions/v0/sui-verifier/src/entry_points_verifier.rs:89-103 | sui-execution/historical-versions/v1/sui-verifier/src/entry_points_verifier.rs:88-102 | sui-execution/historical-versions/v2/sui-verifier/src/entry_points_verifier.rs:92-106 | sui-execution/historical-versions/v3/sui-verifier/src/entry_points_verifier.rs:92-106 | sui-execution/latest/sui-verifier/src/entry_points_verifier.rs:92-106 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-verifier/src/entry_points_verifier.rs` and `sui-execution/historical-versions/v1/sui-verifier/src/entry_points_verifier.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 130 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (15 lines × 5) sui-execution/historical-versions/v0/sui-verifier/src/one_time_witness_verifier.rs:140 — sui-execution/historical-versions/v0/sui-verifier/src/one_time_witness_verifier.rs:140-154 | sui-execution/historical-versions/v1/sui-verifier/src/one_time_witness_verifier.rs:150-164 | sui-execution/historical-versions/v2/sui-verifier/src/one_time_witness_verifier.rs:150-164 | sui-execution/historical-versions/v3/sui-verifier/src/one_time_witness_verifier.rs:150-164 | sui-execution/latest/sui-verifier/src/one_time_witness_verifier.rs:150-164 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-verifier/src/one_time_witness_verifier.rs` and `sui-execution/historical-versions/v1/sui-verifier/src/one_time_witness_verifier.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 138 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (15 lines × 5) sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs:210 — sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs:210-224 | sui-execution/historical-versions/v1/sui-move-natives/src/test_scenario.rs:205-219 | sui-execution/historical-versions/v2/sui-move-natives/src/test_scenario.rs:207-221 | sui-execution/historical-versions/v3/sui-move-natives/src/test_scenario.rs:333-347 | sui-execution/latest/sui-move-natives/src/test_scenario.rs:476-490 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/test_scenario.rs` as WHOLE FILES: this scan already matched 35 separate duplicated blocks between them, totalling at least 619 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (15 lines × 4) · ×3
  • Duplicated block (15 lines × 4) sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/context.rs:848 — sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/context.rs:848-862 | sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:781-795 | sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs:838-852 | sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/context.rs:2166-2180 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/context.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 378 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (15 lines × 4) REDACTED:254 — REDACTED:254-268 | REDACTED:258-272 | REDACTED:264-278 | REDACTED:401-415 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 54 separate duplicated blocks between them, totalling at least 1035 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (15 lines × 4) sui-execution/historical-versions/v0/sui-move-natives/src/dynamic_field.rs:94 — sui-execution/historical-versions/v0/sui-move-natives/src/dynamic_field.rs:94-108 | sui-execution/historical-versions/v1/sui-move-natives/src/dynamic_field.rs:93-107 | sui-execution/historical-versions/v2/sui-move-natives/src/dynamic_field.rs:93-107 | sui-execution/historical-versions/v3/sui-move-natives/src/dynamic_field.rs:99-113 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/dynamic_field.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/dynamic_field.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 384 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (12 lines × 6) · ×3
  • Duplicated block (12 lines × 6) crates/sui-rosetta/src/operations.rs:1420 — crates/sui-rosetta/src/operations.rs:1420-1432 | crates/sui-rosetta/src/operations.rs:1438-1450 | crates/sui-rosetta/src/operations.rs:1459-1470 | crates/sui-rosetta/src/operations.rs:1479-1490 | crates/sui-rosetta/src/operations.rs:1498-1509 | crates/sui-rosetta/src/operations.rs:1517-1528 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (12 lines × 6) sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs:313 — sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs:313-324 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs:386-397 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs:459-470 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs:548-559 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs:793-804 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs:863-874 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (12 lines × 6) sui-execution/latest/sui-move-natives/src/crypto/group_ops.rs:316 — sui-execution/latest/sui-move-natives/src/crypto/group_ops.rs:316-327 | sui-execution/latest/sui-move-natives/src/crypto/group_ops.rs:389-400 | sui-execution/latest/sui-move-natives/src/crypto/group_ops.rs:462-473 | sui-execution/latest/sui-move-natives/src/crypto/group_ops.rs:551-562 | sui-execution/latest/sui-move-natives/src/crypto/group_ops.rs:795-806 | sui-execution/latest/sui-move-natives/src/crypto/group_ops.rs:865-876 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (10–11 lines × 3) · ×3
  • Duplicated block (10–11 lines × 3) REDACTED:501 — REDACTED:501-511 | REDACTED:507-517 | REDACTED:682-691 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 77 separate duplicated blocks between them, totalling at least 1502 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–11 lines × 3) sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/trace_utils.rs:255 — sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/trace_utils.rs:255-265 | sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/trace_utils.rs:240-249 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/trace_utils.rs:238-247 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/trace_utils.rs` and `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/trace_utils.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 105 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–11 lines × 3) crates/sui-types/src/sui_system_state/mod.rs:353 — crates/sui-types/src/sui_system_state/mod.rs:353-363 | crates/sui-types/src/sui_system_state/mod.rs:365-375 | crates/sui-types/src/sui_system_state/mod.rs:376-385 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (9–11 lines × 2) · ×3
  • Duplicated block (9–11 lines × 2) crates/sui-indexer-alt-graphql/src/api/types/balance.rs:222 — crates/sui-indexer-alt-graphql/src/api/types/balance.rs:222-230 | crates/sui-indexer-alt-graphql/src/api/types/object.rs:1074-1084 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (9–11 lines × 2) crates/sui-node/src/db_shell.rs:152 — crates/sui-node/src/db_shell.rs:152-162 | crates/sui-tool/src/db_shell/vfs.rs:176-184 — 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–11 lines × 2) REDACTED:783 — REDACTED:783-793 | REDACTED:1037-1045 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (8–9 lines × 3) · ×3
  • Duplicated block (8–9 lines × 3) crates/sui-consistent-store/src/batch.rs:153 — crates/sui-consistent-store/src/batch.rs:153-160 | crates/sui-consistent-store/src/batch.rs:217-225 | crates/sui-consistent-store/src/batch.rs:261-268 — 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 × 3) crates/sui-transaction-builder/src/lib.rs:572 — crates/sui-transaction-builder/src/lib.rs:572-579 | crates/sui-transactional-test-runner/src/test_adapter.rs:1794-1802 | crates/sui-types/src/transaction.rs:2947-2954 — before extracting anything, compare `crates/sui-transaction-builder/src/lib.rs` and `crates/sui-types/src/transaction.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 45 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (8–9 lines × 3) sui-execution/historical-versions/v1/sui-move-natives/src/test_scenario.rs:117 — sui-execution/historical-versions/v1/sui-move-natives/src/test_scenario.rs:117-124 | sui-execution/historical-versions/v2/sui-move-natives/src/test_scenario.rs:116-123 | sui-execution/historical-versions/v3/sui-move-natives/src/test_scenario.rs:204-212 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-move-natives/src/test_scenario.rs` and `sui-execution/historical-versions/v2/sui-move-natives/src/test_scenario.rs` as WHOLE FILES: this scan already matched 32 separate duplicated blocks between them, totalling at least 519 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (7–8 lines × 2) · ×3
  • Duplicated block (7–8 lines × 2) crates/sui-bridge/src/utils.rs:421 — crates/sui-bridge/src/utils.rs:421-427 | crates/sui-bridge/src/utils.rs:429-436 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7–8 lines × 2) crates/sui-indexer-alt-object-store/src/lib.rs:107 — crates/sui-indexer-alt-object-store/src/lib.rs:107-114 | crates/sui-indexer-alt-object-store/src/lib.rs:187-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 (7–8 lines × 2) crates/sui-types/src/rpc_proto_conversions.rs:2520 — crates/sui-types/src/rpc_proto_conversions.rs:2520-2527 | crates/sui-types/src/rpc_proto_conversions.rs:2533-2539 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (5 lines × 5) · ×3
  • Duplicated block (5 lines × 5) sui-execution/historical-versions/v0/sui-adapter/src/gas_charger.rs:95 — sui-execution/historical-versions/v0/sui-adapter/src/gas_charger.rs:95-99 | sui-execution/historical-versions/v1/sui-adapter/src/gas_charger.rs:96-100 | sui-execution/historical-versions/v2/sui-adapter/src/gas_charger.rs:96-100 | sui-execution/historical-versions/v3/sui-adapter/src/gas_charger.rs:124-128 | sui-execution/latest/sui-adapter/src/gas_charger.rs:231-235 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/gas_charger.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/gas_charger.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 114 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 5) sui-execution/historical-versions/v0/sui-adapter/src/gas_meter.rs:226 — sui-execution/historical-versions/v0/sui-adapter/src/gas_meter.rs:226-230 | sui-execution/historical-versions/v1/sui-adapter/src/gas_meter.rs:226-230 | sui-execution/historical-versions/v2/sui-adapter/src/gas_meter.rs:226-230 | sui-execution/historical-versions/v3/sui-adapter/src/gas_meter.rs:237-241 | sui-execution/latest/sui-adapter/src/gas_meter.rs:256-260 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/gas_meter.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/gas_meter.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 155 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 5) sui-execution/historical-versions/v0/sui-verifier/src/private_generics.rs:196 — sui-execution/historical-versions/v0/sui-verifier/src/private_generics.rs:196-200 | sui-execution/historical-versions/v1/sui-verifier/src/private_generics.rs:198-202 | sui-execution/historical-versions/v2/sui-verifier/src/private_generics.rs:217-221 | sui-execution/historical-versions/v3/sui-verifier/src/private_generics.rs:279-283 | sui-execution/latest/sui-verifier/src/private_generics.rs:279-283 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-verifier/src/private_generics.rs` and `sui-execution/historical-versions/v1/sui-verifier/src/private_generics.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 144 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.
D1 · Cyclomatic Complexity · sui_inverted_index · ×2
  • sui_inverted_index::bitmap_query::iter::eval_bitmap_query_bucket_iter (cyclomatic 44) crates/sui-inverted-index/src/bitmap_query/iter.rs:206 — sui_inverted_index::bitmap_query::iter::eval_bitmap_query_bucket_iter has cyclomatic complexity 44 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • sui_inverted_index::bitmap_query::stream::eval_bitmap_query_bucket_stream (cyclomatic 41) crates/sui-inverted-index/src/bitmap_query/stream.rs:185 — sui_inverted_index::bitmap_query::stream::eval_bitmap_query_bucket_stream has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sui · ×2
  • sui::sui_commands::start (cyclomatic 40) crates/sui/src/sui_commands.rs:868 — sui::sui_commands::start has cyclomatic complexity 40 (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.
  • sui::sui_commands::genesis (cyclomatic 31) crates/sui/src/sui_commands.rs:1373 — sui::sui_commands::genesis 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.
D1 · Cyclomatic Complexity · Lexer · ×2
  • Lexer::next (cyclomatic 34) crates/sui/src/client_ptb/lexer.rs:206 — Lexer::next 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.
  • Lexer::next_expr_token (cyclomatic 29) crates/sui-display/src/v2/lexer.rs:149 — Lexer::next_expr_token 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. This is NOT this file's highest cyclomatic complexity: OwnedLexeme::fmt (cyclomatic 36) 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.
D1 · Cyclomatic Complexity · BridgeMonitor · ×2
  • BridgeMonitor::handle_eth_events (cyclomatic 33) crates/sui-bridge/src/monitor.rs:227 — BridgeMonitor::handle_eth_events has cyclomatic complexity 33 (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.
  • BridgeMonitor::handle_sui_events (cyclomatic 19) crates/sui-bridge/src/monitor.rs:107 — BridgeMonitor::handle_sui_events has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · ConsensusHandler · ×2
  • ConsensusHandler::filter_consensus_txns (cyclomatic 33) crates/sui-core/src/consensus_handler.rs:2722 — ConsensusHandler::filter_consensus_txns 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.
  • ConsensusHandler::deduplicate_consensus_txns (cyclomatic 17) crates/sui-core/src/consensus_handler.rs:3103 — ConsensusHandler::deduplicate_consensus_txns has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sui_benchmark · ×2
  • sui_benchmark::drivers::bench_driver::run_bench_worker (cyclomatic 32) crates/sui-benchmark/src/drivers/bench_driver.rs:758 — sui_benchmark::drivers::bench_driver::run_bench_worker has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • sui_benchmark::execute_soft_bundle_with_retries (cyclomatic 27) crates/sui-benchmark/src/lib.rs:702 — sui_benchmark::execute_soft_bundle_with_retries has cyclomatic complexity 27 (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.
D1 · Cyclomatic Complexity · Interpreter · ×2
  • Interpreter::eval_chain (cyclomatic 30) crates/sui-display/src/v2/interpreter.rs:105 — Interpreter::eval_chain 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.
  • Interpreter::eval_literal (cyclomatic 20) crates/sui-display/src/v2/interpreter.rs:305 — Interpreter::eval_literal has cyclomatic complexity 20 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · SuiNode · ×2
  • SuiNode::start_async (cyclomatic 26) crates/sui-node/src/lib.rs:478 — SuiNode::start_async 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.
  • SuiNode::monitor_reconfiguration (cyclomatic 26) crates/sui-node/src/lib.rs:1904 — SuiNode::monitor_reconfiguration 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.
D1 · Cyclomatic Complexity · PTBBuilder · ×2
  • PTBBuilder::handle_command_ (cyclomatic 25) crates/sui/src/client_ptb/builder.rs:812 — PTBBuilder::handle_command_ has cyclomatic complexity 25 (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.
  • PTBBuilder::resolve (cyclomatic 18) crates/sui/src/client_ptb/builder.rs:647 — PTBBuilder::resolve has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · TransactionEffects · ×2
  • TransactionEffects::merge (cyclomatic 25) crates/sui-types/src/rpc_proto_conversions.rs:3112 — TransactionEffects::merge 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. This is NOT this file's highest cyclomatic complexity: ExecutionError::from (cyclomatic 42) 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.
  • TransactionEffects::merge (cyclomatic 16) crates/sui-types/src/rpc_proto_conversions.rs:3295 — TransactionEffects::merge 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. This is NOT this file's highest cyclomatic complexity: ExecutionError::from (cyclomatic 42) 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.
D1 · Cyclomatic Complexity · TemporaryStore · ×2
  • TemporaryStore::get_objects_to_authenticate (cyclomatic 24) sui-execution/historical-versions/v0/sui-adapter/src/temporary_store.rs:501 — TemporaryStore::get_objects_to_authenticate has cyclomatic complexity 24 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • TemporaryStore::check_ownership_invariants (cyclomatic 16) sui-execution/historical-versions/v2/sui-adapter/src/temporary_store.rs:671 — TemporaryStore::check_ownership_invariants has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Argument · ×2
  • Argument::checked_to_pure_move_value (cyclomatic 22) crates/sui/src/client_ptb/ast.rs:191 — Argument::checked_to_pure_move_value 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.
  • Argument::fmt (cyclomatic 20) crates/sui/src/client_ptb/ast.rs:356 — Argument::fmt has cyclomatic complexity 20 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · TxPayloadRule · ×2
  • TxPayloadRule::check_tx_arg (cyclomatic 21) crates/sui-indexer-alt-graphql/src/extensions/query_limits/payload.rs:69 — TxPayloadRule::check_tx_arg 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.
  • TxPayloadRule::check_tx_var (cyclomatic 21) crates/sui-indexer-alt-graphql/src/extensions/query_limits/payload.rs:166 — TxPayloadRule::check_tx_var 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.
D1 · Cyclomatic Complexity · BigTableClient · ×2
  • BigTableClient::write_entries (cyclomatic 21) crates/sui-kvstore/src/bigtable/client/mod.rs:713 — BigTableClient::write_entries 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.
  • BigTableClient::read_rows_stream (cyclomatic 19) crates/sui-kvstore/src/bigtable/client/mod.rs:830 — BigTableClient::read_rows_stream has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sui_adapter_v0 · ×2
  • sui_adapter_v0::programmable_transactions::execution::checked::primitive_serialization_layout (cyclomatic 20) REDACTED:1448 — sui_adapter_v0::programmable_transactions::execution::checked::primitive_serialization_layout 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.
  • sui_adapter_v0::programmable_transactions::execution::checked::execute_command (cyclomatic 19) REDACTED:115 — sui_adapter_v0::programmable_transactions::execution::checked::execute_command 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.
D1 · Cyclomatic Complexity · ValidatorProposer · ×2
  • ValidatorProposer::smart_ancestors_to_propose (cyclomatic 18) consensus/core/src/proposer.rs:130 — ValidatorProposer::smart_ancestors_to_propose 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.
  • ValidatorProposer::try_new_block (cyclomatic 18) consensus/core/src/proposer.rs:364 — ValidatorProposer::try_new_block 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.
D1 · Cyclomatic Complexity · SuiBridgeEvent · ×2
  • SuiBridgeEvent::try_from_event (cyclomatic 18) crates/sui-bridge/src/events.rs:428 — SuiBridgeEvent::try_from_event 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.
  • SuiBridgeEvent::try_from_sui_event (cyclomatic 17) crates/sui-bridge/src/events.rs:428 — SuiBridgeEvent::try_from_sui_event 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.
D1 · Cyclomatic Complexity · AuthorityState · ×2
  • AuthorityState::create_and_execute_advance_epoch_tx (cyclomatic 18) crates/sui-core/src/authority.rs:4654 — AuthorityState::create_and_execute_advance_epoch_tx 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.
  • AuthorityState::execute_certificate (cyclomatic 16) crates/sui-core/src/authority.rs:1987 — AuthorityState::execute_certificate has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sui_rpc_benchmark · ×2
  • sui_rpc_benchmark::json_rpc::runner::run_queries (cyclomatic 18) crates/sui-rpc-benchmark/src/json_rpc/runner.rs:180 — sui_rpc_benchmark::json_rpc::runner::run_queries 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.
  • sui_rpc_benchmark::bin::pull_grafana_logs::run (cyclomatic 16) crates/sui-rpc-benchmark/src/bin/pull_grafana_logs.rs:194 — sui_rpc_benchmark::bin::pull_grafana_logs::run has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sui_indexer_alt_framework · ×2
  • sui_indexer_alt_framework::pipeline::concurrent::commit_watermark::commit_watermark (cyclomatic 16) crates/sui-indexer-alt-framework/src/pipeline/concurrent/commit_watermark.rs:51 — sui_indexer_alt_framework::pipeline::concurrent::commit_watermark::commit_watermark 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.
  • sui_indexer_alt_framework::pipeline::sequential::collector::collector (cyclomatic 16) crates/sui-indexer-alt-framework/src/pipeline/sequential/collector.rs:53 — sui_indexer_alt_framework::pipeline::sequential::collector::collector 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.
D17 · Explicit Debt · XxxComment · ×2
  • XxxComment crates/transaction-fuzzer/src/account_universe/universe.rs:73 — // XXX should we also test edge cases around large sequence numbers? — 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.
  • XxxComment crates/sui-rpc-api/src/grpc/v2/transaction_execution_service/simulate/resolve/mod.rs:722 — //XXX do we want to ensure its only used once as receiving? — 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.
D2 · Cognitive Complexity · SuiNode · ×2
  • SuiNode::monitor_reconfiguration (cognitive 60) crates/sui-node/src/lib.rs:1904 — SuiNode::monitor_reconfiguration has cognitive complexity 60 (threshold 15). Drivers by points: if/else 19 (44 pts), match/switch 2 (7 pts), boolean chains 5, loops 2 (4 pts) (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • SuiNode::start_async (cognitive 33) crates/sui-node/src/lib.rs:478 — SuiNode::start_async has cognitive complexity 33 (threshold 15). Drivers by points: if/else 24 (26 pts), boolean chains 5, loops 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.
D2 · Cognitive Complexity · sui_types · ×2
  • sui_types::nitro_attestation::verify_cert_chain (cognitive 48) crates/sui-types/src/nitro_attestation.rs:720 — sui_types::nitro_attestation::verify_cert_chain has cognitive complexity 48 (threshold 15). Drivers by points: if/else 18 (45 pts), boolean chains 2, loops 1 (nesting depth added 27). 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.
  • sui_types::move_package::build_linkage_table (cognitive 20) crates/sui-types/src/move_package.rs:740 — sui_types::move_package::build_linkage_table has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 3 (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.
D2 · Cognitive Complexity · SuiTxValidator · ×2
  • SuiTxValidator::validate_transactions (cognitive 43) crates/sui-core/src/consensus_validator.rs:70 — SuiTxValidator::validate_transactions has cognitive complexity 43 (threshold 15). Drivers by points: if/else 11 (35 pts), loops 3 (6 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.
  • SuiTxValidator::vote_transaction (cognitive 16) crates/sui-core/src/consensus_validator.rs:296 — SuiTxValidator::vote_transaction has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TxPayloadRule · ×2
  • TxPayloadRule::check_tx_var (cognitive 43) crates/sui-indexer-alt-graphql/src/extensions/query_limits/payload.rs:166 — TxPayloadRule::check_tx_var has cognitive complexity 43 (threshold 15). Drivers by points: if/else 22 (40 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • TxPayloadRule::check_tx_arg (cognitive 42) crates/sui-indexer-alt-graphql/src/extensions/query_limits/payload.rs:69 — TxPayloadRule::check_tx_arg has cognitive complexity 42 (threshold 15). Drivers by points: if/else 21 (39 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sui_rpc_benchmark · ×2
  • sui_rpc_benchmark::json_rpc::runner::run_queries (cognitive 43) crates/sui-rpc-benchmark/src/json_rpc/runner.rs:180 — sui_rpc_benchmark::json_rpc::runner::run_queries has cognitive complexity 43 (threshold 15). Drivers by points: if/else 16 (28 pts), match/switch 5 (12 pts), boolean chains 3 (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.
  • sui_rpc_benchmark::bin::pull_grafana_logs::run (cognitive 24) crates/sui-rpc-benchmark/src/bin/pull_grafana_logs.rs:194 — sui_rpc_benchmark::bin::pull_grafana_logs::run has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (17 pts), loops 4, match/switch 1 (2 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BigTableClient · ×2
  • BigTableClient::write_entries (cognitive 41) crates/sui-kvstore/src/bigtable/client/mod.rs:713 — BigTableClient::write_entries has cognitive complexity 41 (threshold 15). Drivers by points: if/else 13 (31 pts), match/switch 4 (5 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.
  • BigTableClient::read_rows_stream (cognitive 41) crates/sui-kvstore/src/bigtable/client/mod.rs:830 — BigTableClient::read_rows_stream has cognitive complexity 41 (threshold 15). Drivers by points: if/else 11 (33 pts), match/switch 3 (5 pts), loops 2 (3 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.
D2 · Cognitive Complexity · ResolutionContext · ×2
  • ResolutionContext::add_type_tag (cognitive 40) crates/sui-package-resolver/src/lib.rs:1243 — ResolutionContext::add_type_tag has cognitive complexity 40 (threshold 15). Drivers by points: loops 5 (20 pts), if/else 4 (13 pts), match/switch 2 (6 pts), boolean chains 1 (nesting depth added 28). 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.
  • ResolutionContext::add_signature (cognitive 19) crates/sui-package-resolver/src/lib.rs:1359 — ResolutionContext::add_signature has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (11 pts), match/switch 2 (7 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.
D2 · Cognitive Complexity · TransactionEffects · ×2
  • TransactionEffects::merge (cognitive 40) crates/sui-types/src/rpc_proto_conversions.rs:3112 — TransactionEffects::merge has cognitive complexity 40 (threshold 15). Drivers by points: if/else 15 (22 pts), loops 8 (16 pts), boolean chains 2 (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.
  • TransactionEffects::merge (cognitive 16) crates/sui-types/src/rpc_proto_conversions.rs:3295 — TransactionEffects::merge has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13 (14 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.
D2 · Cognitive Complexity · InvariantChecker · ×2
  • InvariantChecker::check_ownership_invariants (cognitive 40) sui-execution/latest/sui-adapter/src/temporary_store/invariants.rs:632 — InvariantChecker::check_ownership_invariants has cognitive complexity 40 (threshold 15). Drivers by points: if/else 9 (18 pts), match/switch 6 (11 pts), boolean chains 7, loops 4 (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.
  • InvariantChecker::check_address_balance_changes (cognitive 19) sui-execution/latest/sui-adapter/src/temporary_store/invariants.rs:301 — InvariantChecker::check_address_balance_changes has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (13 pts), match/switch 2 (4 pts), 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.
D2 · Cognitive Complexity · AuthorityStorePruner · ×2
  • AuthorityStorePruner::setup_pruning (cognitive 36) crates/sui-core/src/authority/authority_store_pruner.rs:912 — AuthorityStorePruner::setup_pruning has cognitive complexity 36 (threshold 15). Drivers by points: if/else 10 (24 pts), match/switch 3 (7 pts), loops 3 (4 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.
  • AuthorityStorePruner::prune_objects_and_indexes (cognitive 17) crates/sui-core/src/authority/authority_store_pruner.rs:152 — AuthorityStorePruner::prune_objects_and_indexes has cognitive complexity 17 (threshold 15). Drivers by points: loops 7 (13 pts), if/else 3 (4 pts) (nesting depth added 7). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · PTBBuilder · ×2
  • PTBBuilder::handle_command_ (cognitive 34) crates/sui/src/client_ptb/builder.rs:812 — PTBBuilder::handle_command_ has cognitive complexity 34 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 6 (15 pts), match/switch 2 (3 pts) (nesting depth added 17). 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.
  • PTBBuilder::resolve (cognitive 22) crates/sui/src/client_ptb/builder.rs:647 — PTBBuilder::resolve has cognitive complexity 22 (threshold 15). Drivers by points: match/switch 5 (13 pts), if/else 3 (7 pts), boolean chains 2 (nesting depth added 12). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · MockBigtableServer · ×2
  • MockBigtableServer::read_rows (cognitive 34) crates/sui-kvstore/src/bigtable/mock_server.rs:785 — MockBigtableServer::read_rows has cognitive complexity 34 (threshold 15). Drivers by points: if/else 16 (25 pts), boolean chains 5, loops 3 (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.
  • MockBigtableServer::mutate_rows (cognitive 26) crates/sui-kvstore/src/bigtable/mock_server.rs:659 — MockBigtableServer::mutate_rows has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (21 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.
D2 · Cognitive Complexity · sui_bridge · ×2
  • sui_bridge::monitor::subscribe_bridge_events (cognitive 28) crates/sui-bridge/src/monitor.rs:474 — sui_bridge::monitor::subscribe_bridge_events has cognitive complexity 28 (threshold 15). Drivers by points: loops 4 (10 pts), match/switch 3 (10 pts), if/else 2 (8 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • sui_bridge::utils::publish_and_register_coins_return_add_coins_on_sui_action (cognitive 18) crates/sui-bridge/src/utils.rs:353 — sui_bridge::utils::publish_and_register_coins_return_add_coins_on_sui_action has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 4 (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.
D2 · Cognitive Complexity · CommitSyncer · ×2
  • CommitSyncer::fetch_once (cognitive 26) consensus/core/src/commit_syncer.rs:542 — CommitSyncer::fetch_once has cognitive complexity 26 (threshold 15). Drivers by points: loops 13 (17 pts), if/else 5 (9 pts) (nesting depth added 8). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
  • CommitSyncer::handle_fetch_result (cognitive 16) consensus/core/src/commit_syncer.rs:252 — CommitSyncer::handle_fetch_result has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 2 (4 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.
D2 · Cognitive Complexity · CheckpointBuilder · ×2
  • CheckpointBuilder::create_checkpoint (cognitive 26) crates/sui-core/src/checkpoints/mod.rs:1902 — CheckpointBuilder::create_checkpoint has cognitive complexity 26 (threshold 15). Drivers by points: if/else 17 (22 pts), match/switch 1 (2 pts), boolean chains 1, loops 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.
  • CheckpointBuilder::expensive_consensus_commit_prologue_invariants_check (cognitive 17) crates/sui-core/src/checkpoints/mod.rs:2242 — CheckpointBuilder::expensive_consensus_commit_prologue_invariants_check has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 2 (4 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.
D2 · Cognitive Complexity · ValidatorProposer · ×2
  • ValidatorProposer::smart_ancestors_to_propose (cognitive 25) consensus/core/src/proposer.rs:130 — ValidatorProposer::smart_ancestors_to_propose has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (15 pts), match/switch 2 (4 pts), boolean chains 3, 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.
  • ValidatorProposer::try_new_block (cognitive 22) consensus/core/src/proposer.rs:364 — ValidatorProposer::try_new_block has cognitive complexity 22 (threshold 15). Drivers by points: if/else 17 (20 pts), loops 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · AuthorityStore · ×2
  • AuthorityStore::expensive_check_sui_conservation (cognitive 25) crates/sui-core/src/authority/authority_store.rs:971 — AuthorityStore::expensive_check_sui_conservation has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (12 pts), match/switch 2 (7 pts), loops 3 (6 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.
  • AuthorityStore::maybe_reaccumulate_state_hash (cognitive 21) crates/sui-core/src/authority/authority_store.rs:1148 — AuthorityStore::maybe_reaccumulate_state_hash has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 3 (5 pts), match/switch 1 (3 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sui_adapter_v0 · ×2
  • sui_adapter_v0::programmable_transactions::execution::checked::execute_command (cognitive 24) REDACTED:115 — sui_adapter_v0::programmable_transactions::execution::checked::execute_command has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 4 (8 pts), match/switch 2 (3 pts), boolean chains 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.
  • sui_adapter_v0::programmable_transactions::execution::checked::build_move_args (cognitive 18) REDACTED:1241 — sui_adapter_v0::programmable_transactions::execution::checked::build_move_args has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), match/switch 2 (3 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.
D2 · Cognitive Complexity · sui_rpc_store · ×2
  • sui_rpc_store::schema::epochs::merge (cognitive 21) crates/sui-rpc-store/src/schema/epochs.rs:126 — sui_rpc_store::schema::epochs::merge has cognitive complexity 21 (threshold 15). Drivers by points: if/else 19 (20 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.
  • sui_rpc_store::indexer::checkpoint_input_objects (cognitive 17) crates/sui-rpc-store/src/indexer/mod.rs:114 — sui_rpc_store::indexer::checkpoint_input_objects has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 3 (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.
D2 · Cognitive Complexity · sui_tool · ×2
  • sui_tool::tideconsole_cmd::repl (cognitive 21) crates/sui-tool/src/tideconsole_cmd.rs:47 — sui_tool::tideconsole_cmd::repl has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (15 pts), match/switch 2 (5 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.
  • sui_tool::download_formal_snapshot (cognitive 17) crates/sui-tool/src/lib.rs:786 — sui_tool::download_formal_snapshot has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7, match/switch 3 (6 pts), loops 3, boolean chains 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.
D2 · Cognitive Complexity · TonicValidatorClient · ×2
  • TonicValidatorClient::fetch_blocks (cognitive 20) consensus/core/src/network/tonic_network.rs:192 — TonicValidatorClient::fetch_blocks has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 2 (4 pts), match/switch 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.
  • TonicValidatorClient::fetch_latest_blocks (cognitive 19) consensus/core/src/network/tonic_network.rs:291 — TonicValidatorClient::fetch_latest_blocks has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 2 (4 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.
D2 · Cognitive Complexity · RandomnessEventLoop · ×2
  • RandomnessEventLoop::maybe_aggregate_partial_signatures (cognitive 19) crates/sui-network/src/randomness/mod.rs:575 — RandomnessEventLoop::maybe_aggregate_partial_signatures has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 2, match/switch 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.
  • RandomnessEventLoop::receive_partial_signatures (cognitive 16) crates/sui-network/src/randomness/mod.rs:456 — RandomnessEventLoop::receive_partial_signatures has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 3, 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.
D2 · Cognitive Complexity · RandomnessManager · ×2
  • RandomnessManager::try_merge_messages (cognitive 18) crates/sui-core/src/epoch/randomness.rs:715 — RandomnessManager::try_merge_messages has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (13 pts), match/switch 2 (3 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.
  • RandomnessManager::try_new (cognitive 16) crates/sui-core/src/epoch/randomness.rs:347 — RandomnessManager::try_new has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (8 pts), loops 2 (5 pts), match/switch 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.
D2 · Cognitive Complexity · sui_light_client · ×2
  • sui_light_client::authenticated_events::stream::fetch_settlements_for_range (cognitive 18) crates/sui-light-client/src/authenticated_events/stream.rs:376 — sui_light_client::authenticated_events::stream::fetch_settlements_for_range has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (15 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.
  • sui_light_client::authenticated_events::stream::create_event_stream_with_head (cognitive 16) crates/sui-light-client/src/authenticated_events/stream.rs:465 — sui_light_client::authenticated_events::stream::create_event_stream_with_head has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (10 pts), loops 2 (4 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.
D2 · Cognitive Complexity · sui_rosetta · ×2
  • sui_rosetta::types::internal_operation::pay_sui::pay_sui_pt_ab_gas (cognitive 18) crates/sui-rosetta/src/types/internal_operation/pay_sui.rs:186 — sui_rosetta::types::internal_operation::pay_sui::pay_sui_pt_ab_gas has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (14 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.
  • sui_rosetta::types::internal_operation::stake::stake_pt_ab_gas (cognitive 18) crates/sui-rosetta/src/types/internal_operation/stake.rs:208 — sui_rosetta::types::internal_operation::stake::stake_pt_ab_gas has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (15 pts), match/switch 1 (2 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.
D2 · Cognitive Complexity · RpcService · ×2
  • RpcService::annotate_effects (cognitive 18) crates/sui-rpc-api/src/grpc/v2/render.rs:306 — RpcService::annotate_effects has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 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.
  • RpcService::subscribe_events (cognitive 16) crates/sui-rpc-api/src/grpc/v2/subscription_service.rs:217 — RpcService::subscribe_events has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 2 (4 pts), match/switch 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SuiBridgeEvent · ×2
  • SuiBridgeEvent::try_from_event (cognitive 17) crates/sui-bridge/src/events.rs:428 — SuiBridgeEvent::try_from_event has cognitive complexity 17 (threshold 15). Drivers by points: if/else 17. 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.
  • SuiBridgeEvent::try_from_sui_event (cognitive 16) crates/sui-bridge/src/events.rs:428 — SuiBridgeEvent::try_from_sui_event has cognitive complexity 16 (threshold 15). Drivers by points: if/else 16. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · AuthorityPerEpochStore · ×2
  • AuthorityPerEpochStore::verify_consensus_transaction (cognitive 17) crates/sui-core/src/authority/authority_per_epoch_store.rs:2978 — AuthorityPerEpochStore::verify_consensus_transaction has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (16 pts), match/switch 1 (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • AuthorityPerEpochStore::clear_state_hashes_after_checkpoint (cognitive 16) crates/sui-core/src/authority/authority_per_epoch_store.rs:1428 — AuthorityPerEpochStore::clear_state_hashes_after_checkpoint has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 4 (6 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Page · ×2
  • Page::paginate_from_front (cognitive 16) crates/sui-indexer-alt-consistent-store/src/rpc/pagination.rs:163 — Page::paginate_from_front has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 2, loops 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. This shape REPEATS in the file: one other method here (Page::paginate_from_back) 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.
  • Page::paginate_from_back (cognitive 16) crates/sui-indexer-alt-consistent-store/src/rpc/pagination.rs:238 — Page::paginate_from_back has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 2, loops 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. This shape REPEATS in the file: one other method here (Page::paginate_from_front) 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.
D29 · Static Analysis (SAST) · REDACTED · ×2
  • REDACTED
  • REDACTED
D4 · Code Duplication · Near-duplicate member family (5 members, 34 shared lines) · ×2
  • Near-duplicate member family (5 members, 34 shared lines) sui-execution/historical-versions/v0/sui-adapter/src/execution_engine.rs:555 — sui-execution/historical-versions/v0/sui-adapter/src/execution_engine.rs:555-600 | sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs:759-804 | sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs:786-831 | sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.rs:910-955 | sui-execution/latest/sui-adapter/src/execution_engine.rs:1943-1986 — These 5 members are variants of one another: a block of 34 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them 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.
  • Near-duplicate member family (5 members, 34 shared lines) sui-execution/historical-versions/v0/sui-move-natives/src/dynamic_field.rs:87 — sui-execution/historical-versions/v0/sui-move-natives/src/dynamic_field.rs:87-144 | sui-execution/historical-versions/v1/sui-move-natives/src/dynamic_field.rs:86-143 | sui-execution/historical-versions/v2/sui-move-natives/src/dynamic_field.rs:86-143 | sui-execution/historical-versions/v3/sui-move-natives/src/dynamic_field.rs:94-152 | sui-execution/latest/sui-move-natives/src/dynamic_field.rs:97-155 — These 5 members are variants of one another: a block of 34 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them 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 · Near-duplicate member family (5 members, 31 shared lines) · ×2
  • Near-duplicate member family (5 members, 31 shared lines) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/bls12381.rs:45 — sui-execution/historical-versions/v0/sui-move-natives/src/crypto/bls12381.rs:45-101 | sui-execution/historical-versions/v1/sui-move-natives/src/crypto/bls12381.rs:45-101 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/bls12381.rs:45-101 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/bls12381.rs:45-99 | sui-execution/latest/sui-move-natives/src/crypto/bls12381.rs:44-98 — These 5 members are variants of one another: a block of 31 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them 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.
  • Near-duplicate member family (5 members, 31 shared lines) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/bls12381.rs:125 — sui-execution/historical-versions/v0/sui-move-natives/src/crypto/bls12381.rs:125-182 | sui-execution/historical-versions/v1/sui-move-natives/src/crypto/bls12381.rs:125-182 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/bls12381.rs:125-182 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/bls12381.rs:123-178 | sui-execution/latest/sui-move-natives/src/crypto/bls12381.rs:122-177 — These 5 members are variants of one another: a block of 31 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them 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 · Near-duplicate member family (4 members, 29 shared lines) · ×2
  • Near-duplicate member family (4 members, 29 shared lines) sui-execution/historical-versions/v0/sui-adapter/src/execution_engine.rs:610 — sui-execution/historical-versions/v0/sui-adapter/src/execution_engine.rs:610-719 | sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs:815-924 | sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs:842-951 | sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.rs:968-1061 — These 4 members are variants of one another: a block of 29 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them 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.
  • Near-duplicate member family (4 members, 29 shared lines) sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/context.rs:1152 — sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/context.rs:1152-1209 | sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:1137-1194 | sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs:1194-1251 | sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/context.rs:1797-1864 — These 4 members are variants of one another: a block of 29 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Near-duplicate member family (4 members, 26 shared lines) · ×2
  • Near-duplicate member family (4 members, 26 shared lines) REDACTED:553 — REDACTED:553-690 | REDACTED:541-637 | REDACTED:547-643 | REDACTED:723-862 — These 4 members are variants of one another: a block of 26 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them 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.
  • Near-duplicate member family (4 members, 26 shared lines) sui-execution/historical-versions/v0/sui-move-natives/src/dynamic_field.rs:340 — sui-execution/historical-versions/v0/sui-move-natives/src/dynamic_field.rs:340-386 | sui-execution/historical-versions/v1/sui-move-natives/src/dynamic_field.rs:339-385 | sui-execution/historical-versions/v2/sui-move-natives/src/dynamic_field.rs:339-385 | sui-execution/historical-versions/v3/sui-move-natives/src/dynamic_field.rs:370-434 — These 4 members are variants of one another: a block of 26 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Near-duplicate member pair (45 shared lines) · ×2
  • Near-duplicate member pair (45 shared lines) sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs:307 — sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs:307-369 | sui-execution/latest/sui-move-natives/src/crypto/group_ops.rs:310-372 — These two members are variants of one another: 45 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
  • Near-duplicate member pair (45 shared lines) sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs:380 — sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs:380-442 | sui-execution/latest/sui-move-natives/src/crypto/group_ops.rs:383-445 — These two members are variants of one another: 45 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Edited copy of a member (30 corresponding lines) · ×2
  • Edited copy of a member (30 corresponding lines) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/ast.rs:260 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/ast.rs:260-289 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/ast.rs:274-303 — 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) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/trace_utils.rs:436 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/trace_utils.rs:436-465 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/trace_utils.rs:426-455 — 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 (36 corresponding lines) · ×2
  • Edited copy of a member (36 corresponding lines) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/type_check.rs:376 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/type_check.rs:376-411 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/type_check.rs:406-441 — 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) REDACTED:77 — REDACTED:77-114 | REDACTED:77-119 — 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 copy of a member (17 corresponding lines) · ×2
  • Edited copy of a member (17 corresponding lines) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/loading/ast.rs:294 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/loading/ast.rs:294-310 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/loading/ast.rs:390-406 — 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) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/ast.rs:242 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/ast.rs:242-258 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/ast.rs:256-272 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (13 corresponding lines) · ×2
  • Edited copy of a member (13 corresponding lines) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/ast.rs:291 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/ast.rs:291-303 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/ast.rs:305-317 — 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) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/type_check.rs:33 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/type_check.rs:33-45 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/type_check.rs:35-47 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Members sharing a duplicated core (7 members, 50+ identical tokens) · ×2
  • Members sharing a duplicated core (7 members, 50+ identical tokens) crates/sui-indexer-alt-reader/src/object_versions.rs:44 — crates/sui-indexer-alt-reader/src/object_versions.rs:44-93 | crates/sui-indexer-alt-reader/src/object_versions.rs:104-166 | crates/sui-indexer-alt-reader/src/object_versions.rs:177-243 | crates/sui-indexer-alt-reader/src/object_versions.rs:254-311 | crates/sui-indexer-alt-reader/src/packages.rs:40-85 | crates/sui-indexer-alt-reader/src/packages.rs:96-161 | crates/sui-indexer-alt-reader/src/packages.rs:172-229 — These 7 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 7 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 7 times.
  • Members sharing a duplicated core (7 members, 50+ identical tokens) sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs:500 — sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs:500-517 | sui-execution/historical-versions/v2/sui-adapter/src/temporary_store.rs:519-536 | sui-execution/historical-versions/v2/sui-adapter/src/temporary_store.rs:541-559 | sui-execution/historical-versions/v3/sui-adapter/src/temporary_store.rs:487-504 | sui-execution/historical-versions/v3/sui-adapter/src/temporary_store.rs:509-527 | sui-execution/latest/sui-adapter/src/temporary_store.rs:800-817 | sui-execution/latest/sui-adapter/src/temporary_store/invariants.rs:147-165 — These 7 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 7 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 7 times.
D4 · Code Duplication · Duplicated block (57 lines × 2) · ×2
  • Duplicated block (57 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/drop_safety.rs:132 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/drop_safety.rs:132-188 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/verify/drop_safety.rs:132-188 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/drop_safety.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/verify/drop_safety.rs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 196 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 (57 lines × 2) sui-execution/historical-versions/v3/sui-move-natives/src/crypto/nitro_attestation.rs:88 — sui-execution/historical-versions/v3/sui-move-natives/src/crypto/nitro_attestation.rs:88-144 | sui-execution/latest/sui-move-natives/src/crypto/nitro_attestation.rs:90-146 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-move-natives/src/crypto/nitro_attestation.rs` and `sui-execution/latest/sui-move-natives/src/crypto/nitro_attestation.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 108 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (53 lines × 2) · ×2
  • Duplicated block (53 lines × 2) consensus/core/src/network/observer.rs:180 — consensus/core/src/network/observer.rs:180-232 | consensus/core/src/network/tonic_network.rs:512-564 — before extracting anything, compare `consensus/core/src/network/observer.rs` and `consensus/core/src/network/tonic_network.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 185 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 (53 lines × 2) sui-execution/historical-versions/v3/sui-verifier/src/private_generics_verifier_v2.rs:162 — sui-execution/historical-versions/v3/sui-verifier/src/private_generics_verifier_v2.rs:162-214 | sui-execution/latest/sui-verifier/src/private_generics_verifier_v2.rs:163-215 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-verifier/src/private_generics_verifier_v2.rs` and `sui-execution/latest/sui-verifier/src/private_generics_verifier_v2.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 169 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (46 lines × 3) · ×2
  • Duplicated block (46 lines × 3) sui-execution/historical-versions/v0/sui-adapter/src/execution_engine.rs:623 — sui-execution/historical-versions/v0/sui-adapter/src/execution_engine.rs:623-668 | sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs:828-873 | sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs:855-900 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/execution_engine.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 531 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 (46 lines × 3) sui-execution/historical-versions/v0/sui-move-natives/src/dynamic_field.rs:341 — sui-execution/historical-versions/v0/sui-move-natives/src/dynamic_field.rs:341-386 | sui-execution/historical-versions/v1/sui-move-natives/src/dynamic_field.rs:340-385 | sui-execution/historical-versions/v2/sui-move-natives/src/dynamic_field.rs:340-385 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/dynamic_field.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/dynamic_field.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 384 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (40 lines × 2) · ×2
  • Duplicated block (40 lines × 2) crates/sui-types/src/sui_system_state/sui_system_state_inner_v1.rs:647 — crates/sui-types/src/sui_system_state/sui_system_state_inner_v1.rs:647-686 | crates/sui-types/src/sui_system_state/sui_system_state_inner_v2.rs:206-245 — before extracting anything, compare `crates/sui-types/src/sui_system_state/sui_system_state_inner_v1.rs` and `crates/sui-types/src/sui_system_state/sui_system_state_inner_v2.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 184 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 (40 lines × 2) sui-execution/historical-versions/v3/sui-move-natives/src/event.rs:108 — sui-execution/historical-versions/v3/sui-move-natives/src/event.rs:108-147 | sui-execution/latest/sui-move-natives/src/event.rs:111-150 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-move-natives/src/event.rs` and `sui-execution/latest/sui-move-natives/src/event.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 145 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (38 lines × 3) · ×2
  • Duplicated block (38 lines × 3) sui-execution/historical-versions/v0/sui-move-natives/src/dynamic_field.rs:88 — sui-execution/historical-versions/v0/sui-move-natives/src/dynamic_field.rs:88-125 | sui-execution/historical-versions/v1/sui-move-natives/src/dynamic_field.rs:87-124 | sui-execution/historical-versions/v2/sui-move-natives/src/dynamic_field.rs:87-124 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/dynamic_field.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/dynamic_field.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 384 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 (38 lines × 3) sui-execution/historical-versions/v0/sui-verifier/src/struct_with_key_verifier.rs:27 — sui-execution/historical-versions/v0/sui-verifier/src/struct_with_key_verifier.rs:27-64 | sui-execution/historical-versions/v1/sui-verifier/src/struct_with_key_verifier.rs:27-64 | sui-execution/historical-versions/v2/sui-verifier/src/struct_with_key_verifier.rs:27-64 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-verifier/src/struct_with_key_verifier.rs` and `sui-execution/historical-versions/v1/sui-verifier/src/struct_with_key_verifier.rs` as WHOLE FILES: this scan already matched 4 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (35 lines × 3) · ×2
  • Duplicated block (35 lines × 3) sui-execution/historical-versions/v0/sui-adapter/src/execution_engine.rs:677 — sui-execution/historical-versions/v0/sui-adapter/src/execution_engine.rs:677-711 | sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs:882-916 | sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs:909-943 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/execution_engine.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 531 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 (35 lines × 3) sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs:421 — sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs:421-455 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs:558-592 | sui-execution/latest/sui-move-natives/src/crypto/group_ops.rs:561-595 — before extracting anything, compare `sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs` and `sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 256 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (34 lines × 3) · ×2
  • Duplicated block (34 lines × 3) sui-execution/historical-versions/v0/sui-move-natives/src/dynamic_field.rs:169 — sui-execution/historical-versions/v0/sui-move-natives/src/dynamic_field.rs:169-202 | sui-execution/historical-versions/v1/sui-move-natives/src/dynamic_field.rs:168-201 | sui-execution/historical-versions/v2/sui-move-natives/src/dynamic_field.rs:168-201 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/dynamic_field.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/dynamic_field.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 384 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 (34 lines × 3) sui-execution/historical-versions/v2/sui-move-natives/src/object_runtime/mod.rs:551 — sui-execution/historical-versions/v2/sui-move-natives/src/object_runtime/mod.rs:551-584 | sui-execution/historical-versions/v3/sui-move-natives/src/object_runtime/mod.rs:706-739 | sui-execution/latest/sui-move-natives/src/object_runtime/mod.rs:911-944 — before extracting anything, compare `sui-execution/historical-versions/v2/sui-move-natives/src/object_runtime/mod.rs` and `sui-execution/historical-versions/v3/sui-move-natives/src/object_runtime/mod.rs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 263 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (32 lines × 2) · ×2
  • Duplicated block (32 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs:307 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs:307-338 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs:1239-1270 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs` as WHOLE FILES: this scan already matched 35 separate duplicated blocks between them, totalling at least 484 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 (32 lines × 2) sui-execution/historical-versions/v3/sui-move-natives/src/transfer.rs:70 — sui-execution/historical-versions/v3/sui-move-natives/src/transfer.rs:70-101 | sui-execution/latest/sui-move-natives/src/transfer.rs:80-111 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-move-natives/src/transfer.rs` and `sui-execution/latest/sui-move-natives/src/transfer.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 122 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (31 lines × 4) · ×2
  • Duplicated block (31 lines × 4) crates/sui-bridge/src/sui_transaction_builder.rs:324 — crates/sui-bridge/src/sui_transaction_builder.rs:324-354 | crates/sui-bridge/src/sui_transaction_builder.rs:391-421 | crates/sui-bridge/src/sui_transaction_builder.rs:454-484 | crates/sui-bridge/src/sui_transaction_builder.rs:517-547 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (31 lines × 4) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/bls12381.rs:133 — sui-execution/historical-versions/v0/sui-move-natives/src/crypto/bls12381.rs:133-163 | sui-execution/historical-versions/v1/sui-move-natives/src/crypto/bls12381.rs:133-163 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/bls12381.rs:133-163 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/bls12381.rs:129-159 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/crypto/bls12381.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/crypto/bls12381.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 128 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (31 lines × 2) · ×2
  • Duplicated block (31 lines × 2) sui-execution/historical-versions/v3/sui-move-natives/src/dynamic_field.rs:516 — sui-execution/historical-versions/v3/sui-move-natives/src/dynamic_field.rs:516-546 | sui-execution/latest/sui-move-natives/src/dynamic_field.rs:522-552 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-move-natives/src/dynamic_field.rs` and `sui-execution/latest/sui-move-natives/src/dynamic_field.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 177 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (31 lines × 2) crates/sui-indexer-alt-reader/src/packages.rs:105 — crates/sui-indexer-alt-reader/src/packages.rs:105-138 | crates/sui-indexer-alt-reader/src/packages.rs:181-211 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (30 lines × 4) · ×2
  • Duplicated block (30 lines × 4) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/bls12381.rs:53 — sui-execution/historical-versions/v0/sui-move-natives/src/crypto/bls12381.rs:53-82 | sui-execution/historical-versions/v1/sui-move-natives/src/crypto/bls12381.rs:53-82 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/bls12381.rs:53-82 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/bls12381.rs:51-80 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/crypto/bls12381.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/crypto/bls12381.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 128 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 (30 lines × 4) sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs:388 — sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs:388-417 | sui-execution/historical-versions/v2/sui-adapter/src/temporary_store.rs:406-435 | sui-execution/historical-versions/v3/sui-adapter/src/temporary_store.rs:374-403 | sui-execution/latest/sui-adapter/src/temporary_store.rs:622-651 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs` and `sui-execution/historical-versions/v2/sui-adapter/src/temporary_store.rs` as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 779 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (26–27 lines × 4) · ×2
  • Duplicated block (26–27 lines × 4) sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/context.rs:158 — sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/context.rs:158-183 | sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:154-180 | sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs:159-185 | sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/context.rs:194-220 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/context.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 378 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 (26–27 lines × 4) sui-execution/historical-versions/v0/sui-move-natives/src/dynamic_field.rs:452 — sui-execution/historical-versions/v0/sui-move-natives/src/dynamic_field.rs:452-478 | sui-execution/historical-versions/v1/sui-move-natives/src/dynamic_field.rs:451-477 | sui-execution/historical-versions/v2/sui-move-natives/src/dynamic_field.rs:451-477 | sui-execution/historical-versions/v3/sui-move-natives/src/dynamic_field.rs:498-523 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/dynamic_field.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/dynamic_field.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 384 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (25–27 lines × 3) · ×2
  • Duplicated block (25–27 lines × 3) REDACTED:1302 — REDACTED:1302-1326 | REDACTED:1314-1338 | REDACTED:1588-1614 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 77 separate duplicated blocks between them, totalling at least 1502 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 (25–27 lines × 3) sui-execution/historical-versions/v2/sui-adapter/src/temporary_store.rs:73 — sui-execution/historical-versions/v2/sui-adapter/src/temporary_store.rs:73-97 | sui-execution/historical-versions/v3/sui-adapter/src/temporary_store.rs:103-129 | sui-execution/latest/sui-adapter/src/temporary_store.rs:221-247 — before extracting anything, compare `sui-execution/historical-versions/v2/sui-adapter/src/temporary_store.rs` and `sui-execution/historical-versions/v3/sui-adapter/src/temporary_store.rs` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 547 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (26 lines × 5) · ×2
  • Duplicated block (26 lines × 5) sui-execution/historical-versions/v0/sui-move-natives/src/dynamic_field.rs:110 — sui-execution/historical-versions/v0/sui-move-natives/src/dynamic_field.rs:110-135 | sui-execution/historical-versions/v1/sui-move-natives/src/dynamic_field.rs:109-134 | sui-execution/historical-versions/v2/sui-move-natives/src/dynamic_field.rs:109-134 | sui-execution/historical-versions/v3/sui-move-natives/src/dynamic_field.rs:118-143 | sui-execution/latest/sui-move-natives/src/dynamic_field.rs:121-146 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/dynamic_field.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/dynamic_field.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 384 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 (26 lines × 5) sui-execution/historical-versions/v0/sui-verifier/src/one_time_witness_verifier.rs:197 — sui-execution/historical-versions/v0/sui-verifier/src/one_time_witness_verifier.rs:197-222 | sui-execution/historical-versions/v1/sui-verifier/src/one_time_witness_verifier.rs:207-232 | sui-execution/historical-versions/v2/sui-verifier/src/one_time_witness_verifier.rs:207-232 | sui-execution/historical-versions/v3/sui-verifier/src/one_time_witness_verifier.rs:207-232 | sui-execution/latest/sui-verifier/src/one_time_witness_verifier.rs:207-232 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-verifier/src/one_time_witness_verifier.rs` and `sui-execution/historical-versions/v1/sui-verifier/src/one_time_witness_verifier.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 138 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (26 lines × 4) · ×2
  • Duplicated block (26 lines × 4) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ed25519.rs:52 — sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ed25519.rs:52-77 | sui-execution/historical-versions/v1/sui-move-natives/src/crypto/ed25519.rs:52-77 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/ed25519.rs:52-77 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/ed25519.rs:50-75 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ed25519.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/crypto/ed25519.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 61 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 (26 lines × 4) sui-execution/historical-versions/v0/sui-move-natives/src/dynamic_field.rs:271 — sui-execution/historical-versions/v0/sui-move-natives/src/dynamic_field.rs:271-296 | sui-execution/historical-versions/v1/sui-move-natives/src/dynamic_field.rs:270-295 | sui-execution/historical-versions/v2/sui-move-natives/src/dynamic_field.rs:270-295 | sui-execution/historical-versions/v3/sui-move-natives/src/dynamic_field.rs:282-307 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/dynamic_field.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/dynamic_field.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 384 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (25–26 lines × 3) · ×2
  • Duplicated block (25–26 lines × 3) sui-execution/historical-versions/v0/sui-adapter/src/adapter.rs:150 — sui-execution/historical-versions/v0/sui-adapter/src/adapter.rs:150-175 | sui-execution/historical-versions/v1/sui-adapter/src/adapter.rs:151-175 | sui-execution/historical-versions/v2/sui-adapter/src/adapter.rs:149-174 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/adapter.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/adapter.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 100 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 (25–26 lines × 3) sui-execution/historical-versions/v2/sui-move-natives/src/object_runtime/object_store.rs:465 — sui-execution/historical-versions/v2/sui-move-natives/src/object_runtime/object_store.rs:465-490 | sui-execution/historical-versions/v3/sui-move-natives/src/object_runtime/object_store.rs:556-580 | sui-execution/latest/sui-move-natives/src/object_runtime/object_store.rs:558-582 — before extracting anything, compare `sui-execution/historical-versions/v2/sui-move-natives/src/object_runtime/object_store.rs` and `sui-execution/historical-versions/v3/sui-move-natives/src/object_runtime/object_store.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 179 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (24–26 lines × 2) · ×2
  • Duplicated block (24–26 lines × 2) crates/sui-consistent-store/src/restore/format.rs:182 — crates/sui-consistent-store/src/restore/format.rs:182-205 | crates/sui-indexer-alt-consistent-store/src/restore/format.rs:169-194 — before extracting anything, compare `crates/sui-consistent-store/src/restore/format.rs` and `crates/sui-indexer-alt-consistent-store/src/restore/format.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 67 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 (24–26 lines × 2) crates/sui-indexer-alt-consistent-store/src/rpc/pagination.rs:177 — crates/sui-indexer-alt-consistent-store/src/rpc/pagination.rs:177-202 | crates/sui-indexer-alt-consistent-store/src/rpc/pagination.rs:252-275 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (23 lines × 4) · ×2
  • Duplicated block (23 lines × 4) REDACTED:1364 — REDACTED:1364-1386 | REDACTED:1287-1309 | REDACTED:1299-1321 | REDACTED:1573-1595 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 54 separate duplicated blocks between them, totalling at least 1035 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 (23 lines × 4) sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/linkage_view.rs:204 — sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/linkage_view.rs:204-226 | sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/linkage_view.rs:167-189 | sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/linkage_view.rs:167-189 | sui-execution/historical-versions/v3/sui-adapter/src/data_store/legacy/linkage_view.rs:183-205 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/linkage_view.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/linkage_view.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 128 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (22–23 lines × 2) · ×2
  • Duplicated block (22–23 lines × 2) crates/sui-bridge-indexer-alt/src/main.rs:102 — crates/sui-bridge-indexer-alt/src/main.rs:102-123 | crates/sui-checkpoint-blob-indexer/src/main.rs:203-225 — 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 (22–23 lines × 2) crates/sui-indexer-alt/src/handlers/kv_epoch_ends.rs:57 — crates/sui-indexer-alt/src/handlers/kv_epoch_ends.rs:57-79 | crates/sui-kvstore/src/handlers/epochs_end.rs:66-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.
D4 · Code Duplication · Duplicated block (21–22 lines × 2) · ×2
  • Duplicated block (21–22 lines × 2) crates/sui-benchmark/src/workloads/addr_bal_deposit.rs:191 — crates/sui-benchmark/src/workloads/addr_bal_deposit.rs:191-211 | crates/sui-benchmark/src/workloads/composite/mod.rs:2037-2058 — before extracting anything, compare `crates/sui-benchmark/src/workloads/addr_bal_deposit.rs` and `crates/sui-benchmark/src/workloads/composite/mod.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 65 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 (21–22 lines × 2) sui-execution/historical-versions/v0/sui-adapter/src/temporary_store.rs:568 — sui-execution/historical-versions/v0/sui-adapter/src/temporary_store.rs:568-588 | sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs:690-711 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/temporary_store.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 195 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (21 lines × 3) · ×2
  • Duplicated block (21 lines × 3) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_k1.rs:148 — sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_k1.rs:148-168 | sui-execution/historical-versions/v1/sui-move-natives/src/crypto/ecdsa_k1.rs:148-168 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/ecdsa_k1.rs:148-168 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_k1.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/crypto/ecdsa_k1.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 263 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 (21 lines × 3) sui-execution/src/v0.rs:309 — sui-execution/src/v0.rs:309-329 | sui-execution/src/v1.rs:303-323 | sui-execution/src/v2.rs:303-323 — before extracting anything, compare `sui-execution/src/v0.rs` and `sui-execution/src/v1.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 132 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (18–20 lines × 5) · ×2
  • Duplicated block (18–20 lines × 5) sui-execution/historical-versions/v0/sui-adapter/src/execution_engine.rs:111 — sui-execution/historical-versions/v0/sui-adapter/src/execution_engine.rs:111-128 | sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs:123-140 | sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs:135-154 | sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.rs:185-204 | sui-execution/latest/sui-adapter/src/execution_engine.rs:1174-1193 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/execution_engine.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 531 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 (18–20 lines × 5) sui-execution/historical-versions/v0/sui-move-natives/src/transfer.rs:123 — sui-execution/historical-versions/v0/sui-move-natives/src/transfer.rs:123-142 | sui-execution/historical-versions/v1/sui-move-natives/src/transfer.rs:211-228 | sui-execution/historical-versions/v2/sui-move-natives/src/transfer.rs:211-228 | sui-execution/historical-versions/v3/sui-move-natives/src/transfer.rs:296-313 | sui-execution/latest/sui-move-natives/src/transfer.rs:319-337 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/transfer.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/transfer.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 115 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (19–20 lines × 2) · ×2
  • Duplicated block (19–20 lines × 2) crates/sui/src/client_commands.rs:1262 — crates/sui/src/client_commands.rs:1262-1280 | crates/sui/src/client_commands.rs:1319-1338 — both copies are in the same file, so extract the 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 (19–20 lines × 2) crates/sui-test-transaction-builder/src/lib.rs:588 — crates/sui-test-transaction-builder/src/lib.rs:588-606 | crates/sui-test-transaction-builder/src/lib.rs:614-633 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (16–19 lines × 2) · ×2
  • Duplicated block (16–19 lines × 2) crates/sui-indexer-alt-reader/src/alpha_ledger_grpc_reader.rs:70 — crates/sui-indexer-alt-reader/src/alpha_ledger_grpc_reader.rs:70-85 | crates/sui-indexer-alt-reader/src/ledger_grpc_reader.rs:178-196 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (16–19 lines × 2) sui-execution/historical-versions/v3/sui-move-natives/src/lib.rs:819 — sui-execution/historical-versions/v3/sui-move-natives/src/lib.rs:819-837 | sui-execution/latest/sui-move-natives/src/lib.rs:912-927 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-move-natives/src/lib.rs` and `sui-execution/latest/sui-move-natives/src/lib.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 511 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (16–18 lines × 3) · ×2
  • Duplicated block (16–18 lines × 3) crates/simulacrum/src/store/in_mem_store.rs:245 — crates/simulacrum/src/store/in_mem_store.rs:245-262 | crates/sui-transactional-test-runner/src/simulator_persisted_store.rs:418-435 | crates/sui-types/src/in_memory_storage.rs:53-68 — before extracting anything, compare `crates/simulacrum/src/store/in_mem_store.rs` and `crates/sui-transactional-test-runner/src/simulator_persisted_store.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 59 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (16–18 lines × 3) crates/sui-protocol-config/src/lib.rs:4168 — crates/sui-protocol-config/src/lib.rs:4168-4185 | crates/sui-protocol-config/src/lib.rs:4252-4267 | crates/sui-protocol-config/src/lib.rs:4284-4299 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (17–18 lines × 3) · ×2
  • Duplicated block (17–18 lines × 3) REDACTED:120 — REDACTED:120-137 | REDACTED:123-139 | REDACTED:128-145 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 54 separate duplicated blocks between them, totalling at least 1035 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (17–18 lines × 3) sui-execution/historical-versions/v0/sui-move-natives/src/transfer.rs:72 — sui-execution/historical-versions/v0/sui-move-natives/src/transfer.rs:72-88 | sui-execution/historical-versions/v1/sui-move-natives/src/transfer.rs:159-176 | sui-execution/historical-versions/v2/sui-move-natives/src/transfer.rs:159-176 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/transfer.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/transfer.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 115 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (14–16 lines × 2) · ×2
  • Duplicated block (14–16 lines × 2) crates/sui-consistent-store/src/restore/formal_snapshot.rs:482 — crates/sui-consistent-store/src/restore/formal_snapshot.rs:482-495 | crates/sui-indexer-alt-consistent-store/src/restore/broadcaster.rs:178-193 — 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 (14–16 lines × 2) crates/sui-consistent-store/src/restore/format.rs:122 — crates/sui-consistent-store/src/restore/format.rs:122-135 | crates/sui-indexer-alt-consistent-store/src/restore/format.rs:105-120 — before extracting anything, compare `crates/sui-consistent-store/src/restore/format.rs` and `crates/sui-indexer-alt-consistent-store/src/restore/format.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 67 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (14–15 lines × 4) · ×2
  • Duplicated block (14–15 lines × 4) sui-execution/historical-versions/v0/sui-move-natives/src/transfer.rs:78 — sui-execution/historical-versions/v0/sui-move-natives/src/transfer.rs:78-91 | sui-execution/historical-versions/v1/sui-move-natives/src/transfer.rs:165-179 | sui-execution/historical-versions/v2/sui-move-natives/src/transfer.rs:165-179 | sui-execution/historical-versions/v3/sui-move-natives/src/transfer.rs:252-266 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/transfer.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/transfer.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 115 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–15 lines × 4) sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs:133 — sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs:133-146 | sui-execution/historical-versions/v2/sui-adapter/src/temporary_store.rs:151-164 | sui-execution/historical-versions/v3/sui-adapter/src/temporary_store.rs:242-256 | sui-execution/latest/sui-adapter/src/temporary_store.rs:489-503 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs` and `sui-execution/historical-versions/v2/sui-adapter/src/temporary_store.rs` as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 779 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (9–15 lines × 2) · ×2
  • Duplicated block (9–15 lines × 2) crates/sui-analytics-indexer/src/handlers/tables/object.rs:143 — crates/sui-analytics-indexer/src/handlers/tables/object.rs:143-151 | crates/sui-analytics-indexer/src/handlers/tables/wrapped_object.rs:65-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.
  • Duplicated block (9–15 lines × 2) crates/sui/src/client_commands.rs:1496 — crates/sui/src/client_commands.rs:1496-1510 | crates/sui/src/client_commands.rs:3622-3630 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (13–15 lines × 2) · ×2
  • Duplicated block (13–15 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/context.rs:592 — sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/context.rs:592-606 | sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/context.rs:680-692 — both copies are in the same file, so extract the 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–15 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/context.rs:916 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/context.rs:916-928 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/context.rs:1266-1280 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/context.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/context.rs` as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 625 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (13–14 lines × 5) · ×2
  • Duplicated block (13–14 lines × 5) sui-execution/historical-versions/v0/sui-move-natives/src/event.rs:53 — sui-execution/historical-versions/v0/sui-move-natives/src/event.rs:53-66 | sui-execution/historical-versions/v1/sui-move-natives/src/event.rs:53-66 | sui-execution/historical-versions/v2/sui-move-natives/src/event.rs:53-66 | sui-execution/historical-versions/v3/sui-move-natives/src/event.rs:120-132 | sui-execution/latest/sui-move-natives/src/event.rs:123-135 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/event.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/event.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 70 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (13–14 lines × 5) sui-execution/historical-versions/v0/sui-move-natives/src/object_runtime/object_store.rs:200 — sui-execution/historical-versions/v0/sui-move-natives/src/object_runtime/object_store.rs:200-212 | sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/object_store.rs:269-281 | sui-execution/historical-versions/v2/sui-move-natives/src/object_runtime/object_store.rs:272-284 | sui-execution/historical-versions/v3/sui-move-natives/src/object_runtime/object_store.rs:356-369 | sui-execution/latest/sui-move-natives/src/object_runtime/object_store.rs:336-349 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/object_runtime/object_store.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/object_store.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 237 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (13–14 lines × 3) · ×2
  • Duplicated block (13–14 lines × 3) sui-execution/historical-versions/v0/sui-adapter/src/execution_engine.rs:165 — sui-execution/historical-versions/v0/sui-adapter/src/execution_engine.rs:165-177 | sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs:181-194 | sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs:201-214 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/execution_engine.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 531 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (13–14 lines × 3) sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:670 — sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:670-682 | sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs:691-703 | sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/context.rs:940-953 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs` and `sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs` as WHOLE FILES: this scan already matched 61 separate duplicated blocks between them, totalling at least 1074 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (12–13 lines × 4) · ×2
  • Duplicated block (12–13 lines × 4) sui-execution/historical-versions/v0/sui-move-natives/src/transfer.rs:41 — sui-execution/historical-versions/v0/sui-move-natives/src/transfer.rs:41-52 | sui-execution/historical-versions/v1/sui-move-natives/src/transfer.rs:127-139 | sui-execution/historical-versions/v2/sui-move-natives/src/transfer.rs:127-139 | sui-execution/historical-versions/v3/sui-move-natives/src/transfer.rs:124-136 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/transfer.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/transfer.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 115 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (12–13 lines × 4) sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/object_store.rs:317 — sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/object_store.rs:317-329 | sui-execution/historical-versions/v2/sui-move-natives/src/object_runtime/object_store.rs:324-336 | sui-execution/historical-versions/v3/sui-move-natives/src/object_runtime/object_store.rs:416-427 | sui-execution/latest/sui-move-natives/src/object_runtime/object_store.rs:394-405 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/object_store.rs` and `sui-execution/historical-versions/v2/sui-move-natives/src/object_runtime/object_store.rs` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 415 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (11–13 lines × 2) · ×2
  • Duplicated block (11–13 lines × 2) crates/sui/src/client_commands.rs:2333 — crates/sui/src/client_commands.rs:2333-2345 | crates/sui/src/client_commands.rs:2354-2364 — both copies are in the same file, so extract the 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–13 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/values.rs:333 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/values.rs:333-345 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/values.rs:388-398 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/values.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/values.rs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 118 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (12 lines × 10) · ×2
  • Duplicated block (12 lines × 10) sui-execution/historical-versions/v0/sui-adapter/src/execution_engine.rs:520 — sui-execution/historical-versions/v0/sui-adapter/src/execution_engine.rs:520-531 | sui-execution/historical-versions/v0/sui-adapter/src/execution_engine.rs:578-589 | sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs:724-735 | sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs:782-793 | sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs:751-762 | sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs:809-820 | sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.rs:875-886 | sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.rs:933-944 | sui-execution/latest/sui-adapter/src/execution_engine.rs:1909-1920 | sui-execution/latest/sui-adapter/src/execution_engine.rs:1964-1975 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/execution_engine.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 531 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 10) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_k1.rs:95 — sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_k1.rs:95-106 | sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_r1.rs:98-109 | sui-execution/historical-versions/v1/sui-move-natives/src/crypto/ecdsa_k1.rs:95-106 | sui-execution/historical-versions/v1/sui-move-natives/src/crypto/ecdsa_r1.rs:98-109 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/ecdsa_k1.rs:95-106 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/ecdsa_r1.rs:98-109 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/ecdsa_k1.rs:106-117 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/ecdsa_r1.rs:98-109 | sui-execution/latest/sui-move-natives/src/crypto/ecdsa_k1.rs:108-119 | sui-execution/latest/sui-move-natives/src/crypto/ecdsa_r1.rs:100-111 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_k1.rs` and `sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_r1.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 151 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (10–11 lines × 4) · ×2
  • Duplicated block (10–11 lines × 4) crates/sui-benchmark/src/workloads/composite/operations.rs:505 — crates/sui-benchmark/src/workloads/composite/operations.rs:505-515 | crates/sui-benchmark/src/workloads/composite/operations.rs:671-680 | crates/sui-benchmark/src/workloads/composite/operations.rs:810-819 | crates/sui-benchmark/src/workloads/composite/operations.rs:1018-1028 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (10–11 lines × 4) sui-execution/historical-versions/v3/sui-move-natives/src/dynamic_field.rs:307 — sui-execution/historical-versions/v3/sui-move-natives/src/dynamic_field.rs:307-316 | sui-execution/historical-versions/v3/sui-move-natives/src/dynamic_field.rs:392-402 | sui-execution/latest/sui-move-natives/src/dynamic_field.rs:303-312 | sui-execution/latest/sui-move-natives/src/dynamic_field.rs:393-403 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-move-natives/src/dynamic_field.rs` and `sui-execution/latest/sui-move-natives/src/dynamic_field.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 177 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (9–11 lines × 3) · ×2
  • Duplicated block (9–11 lines × 3) crates/sui-kv-rpc/src/v2/list_checkpoints.rs:164 — crates/sui-kv-rpc/src/v2/list_checkpoints.rs:164-174 | crates/sui-kv-rpc/src/v2/list_events.rs:142-150 | crates/sui-kv-rpc/src/v2/list_transactions.rs:147-157 — before extracting anything, compare `crates/sui-kv-rpc/src/v2/list_checkpoints.rs` and `crates/sui-kv-rpc/src/v2/list_events.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.
  • Duplicated block (9–11 lines × 3) crates/sui/src/client_commands.rs:1184 — crates/sui/src/client_commands.rs:1184-1194 | crates/sui/src/client_commands.rs:1218-1227 | crates/sui/src/client_commands.rs:1927-1935 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (10–11 lines × 2) · ×2
  • Duplicated block (10–11 lines × 2) crates/sui-benchmark/src/workloads/party.rs:247 — crates/sui-benchmark/src/workloads/party.rs:247-257 | crates/sui-benchmark/src/workloads/slow.rs:213-222 — before extracting anything, compare `crates/sui-benchmark/src/workloads/party.rs` and `crates/sui-benchmark/src/workloads/slow.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 55 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (10–11 lines × 2) crates/sui-core/src/transaction_driver/error.rs:117 — crates/sui-core/src/transaction_driver/error.rs:117-127 | crates/sui-core/src/transaction_driver/error.rs:132-141 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (8–11 lines × 2) · ×2
  • Duplicated block (8–11 lines × 2) crates/sui-indexer-alt-graphql/src/pagination.rs:308 — crates/sui-indexer-alt-graphql/src/pagination.rs:308-318 | crates/sui-indexer-alt-graphql/src/pagination.rs:323-330 — both copies are in the same file, so extract the 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) sui-execution/historical-versions/v3/sui-adapter/src/gas_meter.rs:132 — sui-execution/historical-versions/v3/sui-adapter/src/gas_meter.rs:132-142 | sui-execution/latest/sui-adapter/src/gas_meter.rs:153-160 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/gas_meter.rs` and `sui-execution/latest/sui-adapter/src/gas_meter.rs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 123 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (10 lines × 10) · ×2
  • Duplicated block (10 lines × 10) sui-execution/historical-versions/v0/sui-verifier/src/global_storage_access_verifier.rs:23 — sui-execution/historical-versions/v0/sui-verifier/src/global_storage_access_verifier.rs:23-32 | sui-execution/historical-versions/v0/sui-verifier/src/id_leak_verifier.rs:476-485 | sui-execution/historical-versions/v1/sui-verifier/src/global_storage_access_verifier.rs:23-32 | sui-execution/historical-versions/v1/sui-verifier/src/id_leak_verifier.rs:450-459 | sui-execution/historical-versions/v2/sui-verifier/src/global_storage_access_verifier.rs:23-32 | sui-execution/historical-versions/v2/sui-verifier/src/id_leak_verifier.rs:465-474 | sui-execution/historical-versions/v3/sui-verifier/src/global_storage_access_verifier.rs:23-32 | sui-execution/historical-versions/v3/sui-verifier/src/id_leak_verifier.rs:494-503 | sui-execution/latest/sui-verifier/src/global_storage_access_verifier.rs:23-32 | sui-execution/latest/sui-verifier/src/id_leak_verifier.rs:500-509 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-verifier/src/global_storage_access_verifier.rs` and `sui-execution/historical-versions/v1/sui-verifier/src/global_storage_access_verifier.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 127 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 × 10) sui-execution/historical-versions/v0/sui-verifier/src/private_generics.rs:113 — sui-execution/historical-versions/v0/sui-verifier/src/private_generics.rs:113-122 | sui-execution/historical-versions/v0/sui-verifier/src/private_generics.rs:145-154 | sui-execution/historical-versions/v1/sui-verifier/src/private_generics.rs:115-124 | sui-execution/historical-versions/v1/sui-verifier/src/private_generics.rs:147-156 | sui-execution/historical-versions/v2/sui-verifier/src/private_generics.rs:134-143 | sui-execution/historical-versions/v2/sui-verifier/src/private_generics.rs:166-175 | sui-execution/historical-versions/v3/sui-verifier/src/private_generics.rs:139-148 | sui-execution/historical-versions/v3/sui-verifier/src/private_generics.rs:193-202 | sui-execution/latest/sui-verifier/src/private_generics.rs:139-148 | sui-execution/latest/sui-verifier/src/private_generics.rs:193-202 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-verifier/src/private_generics.rs` and `sui-execution/historical-versions/v1/sui-verifier/src/private_generics.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 144 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (10 lines × 6) · ×2
  • Duplicated block (10 lines × 6) sui-execution/historical-versions/v0/sui-move-natives/src/dynamic_field.rs:296 — sui-execution/historical-versions/v0/sui-move-natives/src/dynamic_field.rs:296-305 | sui-execution/historical-versions/v0/sui-move-natives/src/dynamic_field.rs:364-373 | sui-execution/historical-versions/v1/sui-move-natives/src/dynamic_field.rs:295-304 | sui-execution/historical-versions/v1/sui-move-natives/src/dynamic_field.rs:363-372 | sui-execution/historical-versions/v2/sui-move-natives/src/dynamic_field.rs:295-304 | sui-execution/historical-versions/v2/sui-move-natives/src/dynamic_field.rs:363-372 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/dynamic_field.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/dynamic_field.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 384 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 × 6) sui-execution/historical-versions/v3/sui-move-natives/src/crypto/ecdsa_r1.rs:174 — sui-execution/historical-versions/v3/sui-move-natives/src/crypto/ecdsa_r1.rs:174-183 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/groth16.rs:45-55 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/groth16.rs:132-144 | sui-execution/latest/sui-move-natives/src/crypto/ecdsa_r1.rs:176-185 | sui-execution/latest/sui-move-natives/src/crypto/groth16.rs:48-58 | sui-execution/latest/sui-move-natives/src/crypto/groth16.rs:156-168 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-move-natives/src/crypto/ecdsa_r1.rs` and `sui-execution/latest/sui-move-natives/src/crypto/ecdsa_r1.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 143 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (9 lines × 5) · ×2
  • Duplicated block (9 lines × 5) sui-execution/historical-versions/v0/sui-move-natives/src/dynamic_field.rs:513 — sui-execution/historical-versions/v0/sui-move-natives/src/dynamic_field.rs:513-521 | sui-execution/historical-versions/v1/sui-move-natives/src/lib.rs:791-799 | sui-execution/historical-versions/v2/sui-move-natives/src/lib.rs:944-952 | sui-execution/historical-versions/v3/sui-move-natives/src/lib.rs:1389-1397 | sui-execution/latest/sui-move-natives/src/lib.rs:1561-1569 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-move-natives/src/lib.rs` and `sui-execution/historical-versions/v2/sui-move-natives/src/lib.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 341 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 5) sui-execution/historical-versions/v0/sui-verifier/src/id_leak_verifier.rs:241 — sui-execution/historical-versions/v0/sui-verifier/src/id_leak_verifier.rs:241-249 | sui-execution/historical-versions/v1/sui-verifier/src/id_leak_verifier.rs:215-223 | sui-execution/historical-versions/v2/sui-verifier/src/id_leak_verifier.rs:230-238 | sui-execution/historical-versions/v3/sui-verifier/src/id_leak_verifier.rs:257-265 | sui-execution/latest/sui-verifier/src/id_leak_verifier.rs:263-271 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-verifier/src/id_leak_verifier.rs` and `sui-execution/historical-versions/v1/sui-verifier/src/id_leak_verifier.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 350 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (8 lines × 7) · ×2
  • Duplicated block (8 lines × 7) sui-execution/historical-versions/v0/sui-verifier/src/private_generics.rs:167 — sui-execution/historical-versions/v0/sui-verifier/src/private_generics.rs:167-174 | sui-execution/historical-versions/v1/sui-verifier/src/private_generics.rs:169-176 | sui-execution/historical-versions/v2/sui-verifier/src/private_generics.rs:188-195 | sui-execution/historical-versions/v3/sui-verifier/src/private_generics.rs:250-257 | sui-execution/historical-versions/v3/sui-verifier/src/private_generics_verifier_v2.rs:289-296 | sui-execution/latest/sui-verifier/src/private_generics.rs:250-257 | sui-execution/latest/sui-verifier/src/private_generics_verifier_v2.rs:290-297 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-verifier/src/private_generics.rs` and `sui-execution/historical-versions/v1/sui-verifier/src/private_generics.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 144 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 × 7) crates/sui-types/src/allowance.rs:74 — crates/sui-types/src/allowance.rs:74-81 | crates/sui-types/src/balance.rs:52-59 | crates/sui-types/src/coin.rs:58-65 | crates/sui-types/src/config.rs:56-63 | crates/sui-types/src/display_registry.rs:62-69 | crates/sui-types/src/dynamic_field.rs:137-144 | crates/sui-types/src/funds_accumulator.rs:56-63 — 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 7 call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (6–8 lines × 2) · ×2
  • Duplicated block (6–8 lines × 2) crates/sui-kvstore/src/bigtable/client/mod.rs:517 — crates/sui-kvstore/src/bigtable/client/mod.rs:517-522 | crates/sui-kvstore/src/bigtable/client/mod.rs:693-700 — both copies are in the same file, so extract the 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–8 lines × 2) sui-execution/latest/sui-move-natives/src/crypto/ed25519.rs:60 — sui-execution/latest/sui-move-natives/src/crypto/ed25519.rs:60-65 | sui-execution/latest/sui-move-natives/src/crypto/groth16.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.
D4 · Code Duplication · Duplicated block (5 lines × 6) · ×2
  • Duplicated block (5 lines × 6) crates/sui-benchmark/src/drivers/mod.rs:464 — crates/sui-benchmark/src/drivers/mod.rs:464-468 | crates/sui-benchmark/src/drivers/mod.rs:479-483 | crates/sui-benchmark/src/drivers/mod.rs:494-498 | crates/sui-benchmark/src/drivers/mod.rs:509-513 | crates/sui-benchmark/src/drivers/mod.rs:524-528 | crates/sui-benchmark/src/drivers/mod.rs:539-543 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (5 lines × 6) crates/sui-bridge/src/eth_transaction_builder.rs:76 — crates/sui-bridge/src/eth_transaction_builder.rs:76-80 | crates/sui-bridge/src/eth_transaction_builder.rs:97-101 | crates/sui-bridge/src/eth_transaction_builder.rs:118-122 | crates/sui-bridge/src/eth_transaction_builder.rs:139-143 | crates/sui-bridge/src/eth_transaction_builder.rs:160-164 | crates/sui-bridge/src/eth_transaction_builder.rs:181-186 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D1 · Cyclomatic Complexity · ProtocolConfig · ×1
  • ProtocolConfig::get_for_version_impl (cyclomatic 282) crates/sui-protocol-config/src/lib.rs:2695 — ProtocolConfig::get_for_version_impl has cyclomatic complexity 282 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SuiClientCommands · ×1
  • SuiClientCommands::execute (cyclomatic 78) crates/sui/src/client_commands.rs:872 — SuiClientCommands::execute has cyclomatic complexity 78 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · ValidatorService · ×1
  • ValidatorService::handle_submit_transaction_inner (cyclomatic 74) crates/sui-core/src/authority_server.rs:697 — ValidatorService::handle_submit_transaction_inner has cyclomatic complexity 74 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TransactionDataV1 · ×1
  • TransactionDataV1::validity_check (cyclomatic 51) crates/sui-types/src/transaction.rs:3427 — TransactionDataV1::validity_check has cyclomatic complexity 51 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SuiClientCommandResult · ×1
  • SuiClientCommandResult::fmt (cyclomatic 47) crates/sui/src/client_commands.rs:2230 — SuiClientCommandResult::fmt has cyclomatic complexity 47 (threshold 15). Of this number, 44 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · KeyToolCommand · ×1
  • KeyToolCommand::execute (cyclomatic 47) crates/sui/src/keytool.rs:485 — KeyToolCommand::execute has cyclomatic complexity 47 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · ToolCommand · ×1
  • ToolCommand::execute (cyclomatic 44) crates/sui-tool/src/commands.rs:361 — ToolCommand::execute has cyclomatic complexity 44 (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.
D1 · Cyclomatic Complexity · CompositeWorkload · ×1
  • CompositeWorkload::init (cyclomatic 39) crates/sui-benchmark/src/workloads/composite/mod.rs:1898 — CompositeWorkload::init 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.
D1 · Cyclomatic Complexity · SubscriptionMatcher · ×1
  • SubscriptionMatcher::dispatch_with_keys (cyclomatic 39) crates/sui-rpc-api/src/subscription/matcher.rs:351 — SubscriptionMatcher::dispatch_with_keys 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.
D1 · Cyclomatic Complexity · SuiCommand · ×1
  • SuiCommand::execute (cyclomatic 35) crates/sui/src/sui_commands.rs:449 — SuiCommand::execute 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.
D1 · Cyclomatic Complexity · ProgramParser · ×1
  • ProgramParser::parse (cyclomatic 33) crates/sui/src/client_ptb/parser.rs:93 — ProgramParser::parse has cyclomatic complexity 33 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · ConfigBuilder · ×1
  • ConfigBuilder::build (cyclomatic 33) crates/sui-swarm-config/src/network_config_builder.rs:443 — ConfigBuilder::build 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.
D1 · Cyclomatic Complexity · EthBridgeEvent · ×1
  • EthBridgeEvent::try_into_bridge_action (cyclomatic 32) crates/sui-bridge/src/abi.rs:109 — EthBridgeEvent::try_into_bridge_action has cyclomatic complexity 32 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · sui_bridge_cli · ×1
  • sui_bridge_cli::main (cyclomatic 32) crates/sui-bridge-cli/src/main.rs:46 — sui_bridge_cli::main has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · reachpoints.parse_otool_segments_and_section (cyclomatic 32) · ×1
  • reachpoints.parse_otool_segments_and_section (cyclomatic 32) scripts/simtest/reachpoints.py:70 — reachpoints.parse_otool_segments_and_section has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AttestationDocument · ×1
  • AttestationDocument::validate_document_map (cyclomatic 31) crates/sui-types/src/nitro_attestation.rs:458 — AttestationDocument::validate_document_map 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.
D1 · Cyclomatic Complexity · InvariantChecker · ×1
  • InvariantChecker::check_ownership_invariants (cyclomatic 30) sui-execution/latest/sui-adapter/src/temporary_store/invariants.rs:632 — InvariantChecker::check_ownership_invariants has cyclomatic complexity 30 (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.
D1 · Cyclomatic Complexity · seed-search.discover_binaries (cyclomatic 30) · ×1
  • seed-search.discover_binaries (cyclomatic 30) scripts/simtest/seed-search.py:250 — seed-search.discover_binaries 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.
D1 · Cyclomatic Complexity · MultiSig · ×1
  • MultiSig::verify_claims (cyclomatic 29) crates/sui-types/src/multisig.rs:98 — MultiSig::verify_claims has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TelemetryConfig · ×1
  • TelemetryConfig::init (cyclomatic 29) crates/telemetry-subscribers/src/lib.rs:600 — TelemetryConfig::init 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.
D1 · Cyclomatic Complexity · BlockSyncService · ×1
  • BlockSyncService::fetch_blocks (cyclomatic 28) consensus/core/src/block_sync_service.rs:66 — BlockSyncService::fetch_blocks 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.
D1 · Cyclomatic Complexity · sui_futures · ×1
  • sui_futures::stream::adaptive_spawn_send (cyclomatic 28) crates/sui-futures/src/stream.rs:434 — sui_futures::stream::adaptive_spawn_send 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.
D1 · Cyclomatic Complexity · SwarmBuilder · ×1
  • SwarmBuilder::build (cyclomatic 27) crates/sui-swarm/src/memory/swarm.rs:383 — SwarmBuilder::build 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.
D1 · Cyclomatic Complexity · PTB · ×1
  • PTB::execute (cyclomatic 26) crates/sui/src/client_ptb/ptb.rs:81 — PTB::execute 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.
D1 · Cyclomatic Complexity · Inner · ×1
  • Inner::execute_transaction_with_effects_waiting (cyclomatic 26) crates/sui-core/src/transaction_orchestrator.rs:480 — Inner::execute_transaction_with_effects_waiting 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.
D1 · Cyclomatic Complexity · SuiJsonValue · ×1
  • SuiJsonValue::to_move_value (cyclomatic 26) crates/sui-json/src/lib.rs:235 — SuiJsonValue::to_move_value 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.
D1 · Cyclomatic Complexity · EndOfEpochTransactionKind · ×1
  • EndOfEpochTransactionKind::validity_check (cyclomatic 26) crates/sui-types/src/transaction.rs:720 — EndOfEpochTransactionKind::validity_check 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.
D1 · Cyclomatic Complexity · SuiTxValidator · ×1
  • SuiTxValidator::validate_transactions (cyclomatic 25) crates/sui-core/src/consensus_validator.rs:70 — SuiTxValidator::validate_transactions has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · seed-search.run_command (cyclomatic 25) · ×1
  • seed-search.run_command (cyclomatic 25) scripts/simtest/seed-search.py:432 — seed-search.run_command has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ConsensusAdapter · ×1
  • ConsensusAdapter::submit_and_wait_inner (cyclomatic 24) crates/sui-core/src/consensus_adapter.rs:449 — ConsensusAdapter::submit_and_wait_inner has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · EffectsCertifier · ×1
  • EffectsCertifier::wait_for_acknowledgments (cyclomatic 24) crates/sui-core/src/transaction_driver/effects_certifier.rs:385 — EffectsCertifier::wait_for_acknowledgments has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MockBigtableServer · ×1
  • MockBigtableServer::read_rows (cyclomatic 24) crates/sui-kvstore/src/bigtable/mock_server.rs:785 — MockBigtableServer::read_rows has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DiscoveryEventLoop · ×1
  • DiscoveryEventLoop::handle_tick (cyclomatic 24) crates/sui-network/src/discovery/mod.rs:811 — DiscoveryEventLoop::handle_tick has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SignedBlockVerifier · ×1
  • SignedBlockVerifier::verify_block (cyclomatic 23) consensus/core/src/block_verifier.rs:69 — SignedBlockVerifier::verify_block 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.
D1 · Cyclomatic Complexity · AuthorityStorePruner · ×1
  • AuthorityStorePruner::setup_pruning (cyclomatic 23) crates/sui-core/src/authority/authority_store_pruner.rs:912 — AuthorityStorePruner::setup_pruning has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sui_indexer_alt · ×1
  • sui_indexer_alt::setup_indexer (cyclomatic 23) crates/sui-indexer-alt/src/lib.rs:55 — sui_indexer_alt::setup_indexer 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.
D1 · Cyclomatic Complexity · ObjectRuntimeState · ×1
  • ObjectRuntimeState::finish (cyclomatic 23) sui-execution/historical-versions/v0/sui-move-natives/src/object_runtime/mod.rs:447 — ObjectRuntimeState::finish has cyclomatic complexity 23 (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.
D1 · Cyclomatic Complexity · Synchronizer · ×1
  • Synchronizer::run (cyclomatic 22) consensus/core/src/synchronizer.rs:370 — Synchronizer::run has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SuiValidatorCommand · ×1
  • SuiValidatorCommand::execute (cyclomatic 22) crates/sui/src/validator_commands.rs:294 — SuiValidatorCommand::execute has cyclomatic complexity 22 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · EthDataMapper · ×1
  • EthDataMapper::map (cyclomatic 22) crates/sui-bridge-indexer/src/eth_bridge_indexer.rs:528 — EthDataMapper::map has cyclomatic complexity 22 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · release_notes.do_generate (cyclomatic 22) · ×1
  • release_notes.do_generate (cyclomatic 22) scripts/release_notes.py:610 — release_notes.do_generate has cyclomatic complexity 22 (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.
D1 · Cyclomatic Complexity · ExecutionTimeObserver · ×1
  • ExecutionTimeObserver::record_local_observations_timing (cyclomatic 21) crates/sui-core/src/authority/execution_time_estimator.rs:333 — ExecutionTimeObserver::record_local_observations_timing 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.
D1 · Cyclomatic Complexity · sui_keys · ×1
  • sui_keys::key_derive::validate_path (cyclomatic 21) crates/sui-keys/src/key_derive.rs:84 — sui_keys::key_derive::validate_path 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.
D1 · Cyclomatic Complexity · sui_rpc_store · ×1
  • sui_rpc_store::schema::epochs::merge (cyclomatic 21) crates/sui-rpc-store/src/schema/epochs.rs:126 — sui_rpc_store::schema::epochs::merge 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.
D1 · Cyclomatic Complexity · ValidatorMetadataV1 · ×1
  • ValidatorMetadataV1::verify (cyclomatic 21) crates/sui-types/src/sui_system_state/sui_system_state_inner_v1.rs:125 — ValidatorMetadataV1::verify has cyclomatic complexity 21 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · dual_replay._matching (cyclomatic 21) · ×1
  • dual_replay._matching (cyclomatic 21) scripts/dual_replay.py:672 — dual_replay._matching 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.
D1 · Cyclomatic Complexity · ObserverSubscriber · ×1
  • ObserverSubscriber::run_subscription (cyclomatic 20) consensus/core/src/observer_subscriber.rs:233 — ObserverSubscriber::run_subscription has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ConsensusTransactionPool · ×1
  • ConsensusTransactionPool::take (cyclomatic 20) crates/sui-core/src/consensus_transaction_pool.rs:1018 — ConsensusTransactionPool::take has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GenesisValidatorInfo · ×1
  • GenesisValidatorInfo::validate (cyclomatic 20) crates/sui-genesis-builder/src/validator_info.rs:92 — GenesisValidatorInfo::validate 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.
D1 · Cyclomatic Complexity · sui_network · ×1
  • sui_network::discovery::update_known_peers_versioned (cyclomatic 20) crates/sui-network/src/discovery/mod.rs:1360 — sui_network::discovery::update_known_peers_versioned has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · InternalOperation · ×1
  • InternalOperation::try_into_data (cyclomatic 20) crates/sui-rosetta/src/types/internal_operation.rs:166 — InternalOperation::try_into_data has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · release_notes.do_check (cyclomatic 20) · ×1
  • release_notes.do_check (cyclomatic 20) scripts/release_notes.py:396 — release_notes.do_check has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CommitSyncer · ×1
  • CommitSyncer::fetch_once (cyclomatic 19) consensus/core/src/commit_syncer.rs:542 — CommitSyncer::fetch_once 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.
D1 · Cyclomatic Complexity · LeaderScheduleV3 · ×1
  • LeaderScheduleV3::add_commit (cyclomatic 19) consensus/core/src/leader_schedule_v3.rs:248 — LeaderScheduleV3::add_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.
D1 · Cyclomatic Complexity · AuthorityPerEpochStore · ×1
  • AuthorityPerEpochStore::verify_consensus_transaction (cyclomatic 19) crates/sui-core/src/authority/authority_per_epoch_store.rs:2978 — AuthorityPerEpochStore::verify_consensus_transaction has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WritebackCache · ×1
  • WritebackCache::find_object_lt_or_eq_version (cyclomatic 19) crates/sui-core/src/execution_cache/writeback_cache.rs:1745 — WritebackCache::find_object_lt_or_eq_version has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CheckpointBuilder · ×1
  • CheckpointBuilder::create_checkpoint (cyclomatic 18) crates/sui-core/src/checkpoints/mod.rs:1902 — CheckpointBuilder::create_checkpoint 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.
D1 · Cyclomatic Complexity · CheckArithmetic · ×1
  • CheckArithmetic::fold_expr (cyclomatic 18) crates/sui-proc-macros/src/lib.rs:265 — CheckArithmetic::fold_expr has cyclomatic complexity 18 (threshold 15). Of this number, 17 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Indexer · ×1
  • Indexer::add_pipelines (cyclomatic 18) crates/sui-rpc-store/src/indexer/mod.rs:360 — Indexer::add_pipelines 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.
D1 · Cyclomatic Complexity · sui_types · ×1
  • sui_types::nitro_attestation::verify_cert_chain (cyclomatic 18) crates/sui-types/src/nitro_attestation.rs:720 — sui_types::nitro_attestation::verify_cert_chain has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CommitObserver · ×1
  • CommitObserver::recover_and_send_commits (cyclomatic 17) consensus/core/src/commit_observer.rs:151 — CommitObserver::recover_and_send_commits has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ParquetWriter · ×1
  • ParquetWriter::write (cyclomatic 17) crates/sui-analytics-indexer/src/writers/parquet.rs:66 — ParquetWriter::write has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · BenchDriver · ×1
  • BenchDriver::run (cyclomatic 17) crates/sui-benchmark/src/drivers/bench_driver.rs:378 — BenchDriver::run has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CompositePayload · ×1
  • CompositePayload::make_transaction_batch (cyclomatic 17) crates/sui-benchmark/src/workloads/composite/mod.rs:1350 — CompositePayload::make_transaction_batch has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PartyState · ×1
  • PartyState::handle_result (cyclomatic 17) crates/sui-benchmark/src/workloads/composite/mod.rs:630 — PartyState::handle_result has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · RandomnessEventLoop · ×1
  • RandomnessEventLoop::maybe_aggregate_partial_signatures (cyclomatic 17) crates/sui-network/src/randomness/mod.rs:575 — RandomnessEventLoop::maybe_aggregate_partial_signatures has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Resolver · ×1
  • Resolver::pure_input_layouts (cyclomatic 17) crates/sui-package-resolver/src/lib.rs:499 — Resolver::pure_input_layouts has cyclomatic complexity 17 (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.
D1 · Cyclomatic Complexity · RpcError · ×1
  • RpcError::from (cyclomatic 17) crates/sui-rpc-api/src/error.rs:131 — RpcError::from has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · ArgUses · ×1
  • ArgUses::build (cyclomatic 17) crates/sui-rpc-api/src/grpc/v2/transaction_execution_service/simulate/resolve/mod.rs:843 — ArgUses::build has cyclomatic complexity 17 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D1 · Cyclomatic Complexity · SubscriptionService · ×1
  • SubscriptionService::start (cyclomatic 17) crates/sui-rpc-api/src/subscription/mod.rs:549 — SubscriptionService::start has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · TransactionKind · ×1
  • TransactionKind::validity_check (cyclomatic 17) crates/sui-types/src/transaction.rs:2217 — TransactionKind::validity_check has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CutPlan · ×1
  • CutPlan::discover (cyclomatic 17) sui-execution/cut/src/plan.rs:92 — CutPlan::discover 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.
D1 · Cyclomatic Complexity · monitor_synced.main (cyclomatic 17) · ×1
  • monitor_synced.main (cyclomatic 17) scripts/compatibility/monitor_synced.py:102 — monitor_synced.main has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Core · ×1
  • Core::try_commit (cyclomatic 16) consensus/core/src/core.rs:616 — Core::try_commit has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DagState · ×1
  • DagState::new (cyclomatic 16) consensus/core/src/dag_state.rs:117 — DagState::new has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sui_core · ×1
  • sui_core::traffic_controller::run_tally_loop (cyclomatic 16) crates/sui-core/src/traffic_controller/mod.rs:468 — sui_core::traffic_controller::run_tally_loop has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WorkerPool · ×1
  • WorkerPool::run (cyclomatic 16) crates/sui-data-ingestion-core/src/worker_pool.rs:47 — WorkerPool::run has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Display · ×1
  • Display::display (cyclomatic 16) crates/sui-display/src/v2/mod.rs:184 — Display::display has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · TransactionFilter · ×1
  • TransactionFilter::matches (cyclomatic 16) crates/sui-indexer-alt-graphql/src/api/types/transaction/filter.rs:214 — TransactionFilter::matches has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · StateSnapshotReaderV1 · ×1
  • StateSnapshotReaderV1::new (cyclomatic 16) crates/sui-snapshot/src/reader.rs:114 — StateSnapshotReaderV1::new has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · SurfStrategy · ×1
  • SurfStrategy::choose_function_call_args (cyclomatic 16) crates/sui-surfer/src/surf_strategy.rs:62 — SurfStrategy::choose_function_call_args has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · sui_transaction_checks · ×1
  • sui_transaction_checks::checked::check_one_object (cyclomatic 16) crates/sui-transaction-checks/src/lib.rs:501 — sui_transaction_checks::checked::check_one_object has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Env · ×1
  • Env::load_vm_type_from_type_tag (cyclomatic 16) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/env.rs:408 — Env::load_vm_type_from_type_tag has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to 3 function items inside it that branch (load_type_tag, load_struct_tag, load_struct_tag::execution_error). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest. This is NOT this file's highest cyclomatic complexity: Env::adapter_type_from_vm_type (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 function is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · dual_replay._end_of_struct_decl (cyclomatic 16) · ×1
  • dual_replay._end_of_struct_decl (cyclomatic 16) scripts/dual_replay.py:607 — dual_replay._end_of_struct_decl 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.
D15 · Churn × Complexity Hotspots · Repeated repair · ×1
  • Repeated repair: crates/sui-types/src/accumulator_root.rs crates/sui-types/src/accumulator_root.rs:207 — crates/sui-types/src/accumulator_root.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 3 (its worst body is AccumulatorValue::load at line 207), 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: “Remove no longer needed acc fix (#28307)”; “Better (protocol-gated) fix for accumulator DoS”; “Fix for accumulator settlement DoS”. 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-07-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 22:19:49 -07:00' --until='2026-10-26 22:19:49 -07:00' --full-history --no-merges -- crates/sui-types/src/accumulator_root.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.
D2 · Cognitive Complexity · ProtocolConfig · ×1
  • ProtocolConfig::get_for_version_impl (cognitive 337) crates/sui-protocol-config/src/lib.rs:2695 — ProtocolConfig::get_for_version_impl has cognitive complexity 337 (threshold 15). Drivers by points: if/else 98 (292 pts), boolean chains 39, match/switch 2 (5 pts), loops 1 (nesting depth added 197). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SubscriptionMatcher · ×1
  • SubscriptionMatcher::dispatch_with_keys (cognitive 115) crates/sui-rpc-api/src/subscription/matcher.rs:351 — SubscriptionMatcher::dispatch_with_keys has cognitive complexity 115 (threshold 15). Drivers by points: match/switch 10 (47 pts), if/else 14 (42 pts), loops 9 (25 pts), boolean chains 1 (nesting depth added 81). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · reachpoints.parse_otool_segments_and_section (cognitive 107) · ×1
  • reachpoints.parse_otool_segments_and_section (cognitive 107) scripts/simtest/reachpoints.py:70 — reachpoints.parse_otool_segments_and_section has cognitive complexity 107 (threshold 15). Drivers by points: if/else 19 (91 pts), loops 4 (12 pts), boolean chains 4 (nesting depth added 80). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · TransactionDataV1 · ×1
  • TransactionDataV1::validity_check (cognitive 89) crates/sui-types/src/transaction.rs:3427 — TransactionDataV1::validity_check has cognitive complexity 89 (threshold 15). Drivers by points: if/else 32 (60 pts), boolean chains 12, match/switch 4 (9 pts), loops 4 (8 pts) (nesting depth added 37). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SuiClientCommands · ×1
  • SuiClientCommands::execute (cognitive 77) crates/sui/src/client_commands.rs:872 — SuiClientCommands::execute has cognitive complexity 77 (threshold 15). Drivers by points: if/else 30 (54 pts), match/switch 8 (16 pts), loops 2 (5 pts), boolean chains 2 (nesting depth added 35). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · sui_bridge_cli · ×1
  • sui_bridge_cli::main (cognitive 64) crates/sui-bridge-cli/src/main.rs:46 — sui_bridge_cli::main has cognitive complexity 64 (threshold 15). Drivers by points: if/else 16 (40 pts), match/switch 6 (14 pts), loops 5 (10 pts) (nesting depth added 37). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · CompositeWorkload · ×1
  • CompositeWorkload::init (cognitive 63) crates/sui-benchmark/src/workloads/composite/mod.rs:1898 — CompositeWorkload::init has cognitive complexity 63 (threshold 15). Drivers by points: if/else 23 (35 pts), loops 11 (17 pts), match/switch 6 (11 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.
D2 · Cognitive Complexity · BlockSyncService · ×1
  • BlockSyncService::fetch_blocks (cognitive 62) consensus/core/src/block_sync_service.rs:66 — BlockSyncService::fetch_blocks has cognitive complexity 62 (threshold 15). Drivers by points: if/else 20 (41 pts), loops 5 (15 pts), boolean chains 6 (nesting depth added 31). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · ObserverSubscriber · ×1
  • ObserverSubscriber::run_subscription (cognitive 60) consensus/core/src/observer_subscriber.rs:233 — ObserverSubscriber::run_subscription has cognitive complexity 60 (threshold 15). Drivers by points: if/else 8 (25 pts), loops 7 (21 pts), match/switch 4 (14 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.
D2 · Cognitive Complexity · ToolCommand · ×1
  • ToolCommand::execute (cognitive 59) crates/sui-tool/src/commands.rs:361 — ToolCommand::execute has cognitive complexity 59 (threshold 15). Drivers by points: if/else 15 (27 pts), loops 7 (19 pts), match/switch 7 (13 pts) (nesting depth added 30). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · seed-search.discover_binaries (cognitive 59) · ×1
  • seed-search.discover_binaries (cognitive 59) scripts/simtest/seed-search.py:250 — seed-search.discover_binaries has cognitive complexity 59 (threshold 15). Drivers by points: if/else 14 (33 pts), loops 7 (13 pts), boolean chains 7, error handling 1 (3 pts), ternaries 1 (3 pts) (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.
D2 · Cognitive Complexity · EffectsCertifier · ×1
  • EffectsCertifier::wait_for_acknowledgments (cognitive 54) crates/sui-core/src/transaction_driver/effects_certifier.rs:385 — EffectsCertifier::wait_for_acknowledgments has cognitive complexity 54 (threshold 15). Drivers by points: if/else 17 (37 pts), loops 5 (11 pts), match/switch 2 (4 pts), boolean chains 2 (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.
D2 · Cognitive Complexity · KeyToolCommand · ×1
  • KeyToolCommand::execute (cognitive 53) crates/sui/src/keytool.rs:485 — KeyToolCommand::execute has cognitive complexity 53 (threshold 15). Drivers by points: match/switch 15 (33 pts), if/else 8 (15 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 27). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · AttestationDocument · ×1
  • AttestationDocument::validate_document_map (cognitive 50) crates/sui-types/src/nitro_attestation.rs:458 — AttestationDocument::validate_document_map has cognitive complexity 50 (threshold 15). Drivers by points: if/else 18 (36 pts), boolean chains 10, loops 3 (4 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SuiCommand · ×1
  • SuiCommand::execute (cognitive 49) crates/sui/src/sui_commands.rs:449 — SuiCommand::execute has cognitive complexity 49 (threshold 15). Drivers by points: if/else 16 (34 pts), match/switch 4 (8 pts), loops 3 (7 pts) (nesting depth added 26). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · sui_keys · ×1
  • sui_keys::key_derive::validate_path (cognitive 49) crates/sui-keys/src/key_derive.rs:84 — sui_keys::key_derive::validate_path has cognitive complexity 49 (threshold 15). Drivers by points: if/else 16 (36 pts), match/switch 5 (9 pts), boolean chains 4 (nesting depth added 24). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · release_notes.do_generate (cognitive 49) · ×1
  • release_notes.do_generate (cognitive 49) scripts/release_notes.py:610 — release_notes.do_generate has cognitive complexity 49 (threshold 15). Drivers by points: loops 10 (24 pts), if/else 9 (23 pts), boolean chains 2 (nesting depth added 28). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · SuiClientCommandResult · ×1
  • SuiClientCommandResult::fmt (cognitive 47) crates/sui/src/client_commands.rs:2230 — SuiClientCommandResult::fmt has cognitive complexity 47 (threshold 15). Drivers by points: if/else 14 (27 pts), loops 5 (10 pts), match/switch 4 (8 pts), boolean chains 2 (nesting depth added 22). Of this number, 41 points are the body's own statements and 6 belong to one function item inside it that branches. The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · ConsensusAdapter · ×1
  • ConsensusAdapter::submit_and_wait_inner (cognitive 46) crates/sui-core/src/consensus_adapter.rs:449 — ConsensusAdapter::submit_and_wait_inner has cognitive complexity 46 (threshold 15). Drivers by points: if/else 15 (28 pts), match/switch 3 (9 pts), loops 4 (8 pts), boolean chains 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.
D2 · Cognitive Complexity · WritebackCache · ×1
  • WritebackCache::find_object_lt_or_eq_version (cognitive 46) crates/sui-core/src/execution_cache/writeback_cache.rs:1745 — WritebackCache::find_object_lt_or_eq_version has cognitive complexity 46 (threshold 15). Drivers by points: if/else 26 (41 pts), match/switch 2 (5 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.
D2 · Cognitive Complexity · Interpreter · ×1
  • Interpreter::eval_chain (cognitive 46) crates/sui-display/src/v2/interpreter.rs:105 — Interpreter::eval_chain has cognitive complexity 46 (threshold 15). Drivers by points: if/else 14 (38 pts), match/switch 4 (7 pts), loops 1 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TelemetryConfig · ×1
  • TelemetryConfig::init (cognitive 46) crates/telemetry-subscribers/src/lib.rs:600 — TelemetryConfig::init has cognitive complexity 46 (threshold 15). Drivers by points: if/else 24 (29 pts), loops 4 (9 pts), boolean chains 5, match/switch 1 (3 pts) (nesting depth added 12). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · seed-search.run_command (cognitive 46) · ×1
  • seed-search.run_command (cognitive 46) scripts/simtest/seed-search.py:432 — seed-search.run_command has cognitive complexity 46 (threshold 15). Drivers by points: if/else 17 (29 pts), error handling 4 (8 pts), ternaries 4 (6 pts), boolean chains 3 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sui_futures · ×1
  • sui_futures::stream::adaptive_spawn_send (cognitive 45) crates/sui-futures/src/stream.rs:434 — sui_futures::stream::adaptive_spawn_send has cognitive complexity 45 (threshold 15). Drivers by points: if/else 10 (24 pts), boolean chains 8, match/switch 3 (8 pts), loops 3 (5 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.
D2 · Cognitive Complexity · MultiSig · ×1
  • MultiSig::verify_claims (cognitive 41) crates/sui-types/src/multisig.rs:98 — MultiSig::verify_claims has cognitive complexity 41 (threshold 15). Drivers by points: if/else 15 (28 pts), boolean chains 8, loops 2 (3 pts), 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.
D2 · Cognitive Complexity · WorkerPool · ×1
  • WorkerPool::run (cognitive 39) crates/sui-data-ingestion-core/src/worker_pool.rs:47 — WorkerPool::run has cognitive complexity 39 (threshold 15). Drivers by points: if/else 8 (25 pts), loops 5 (8 pts), match/switch 2 (5 pts), boolean chains 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.
D2 · Cognitive Complexity · ConfigBuilder · ×1
  • ConfigBuilder::build (cognitive 39) crates/sui-swarm-config/src/network_config_builder.rs:443 — ConfigBuilder::build has cognitive complexity 39 (threshold 15). Drivers by points: if/else 18 (24 pts), match/switch 4 (7 pts), loops 5 (6 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sui_indexer_alt_graphql · ×1
  • sui_indexer_alt_graphql::api::subscription::scan_then_live::live (cognitive 37) crates/sui-indexer-alt-graphql/src/api/subscription/scan_then_live.rs:595 — sui_indexer_alt_graphql::api::subscription::scan_then_live::live has cognitive complexity 37 (threshold 15). Drivers by points: if/else 8 (26 pts), match/switch 2 (5 pts), loops 2 (4 pts), boolean chains 2 (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.
D2 · Cognitive Complexity · dual_replay._matching (cognitive 37) · ×1
  • dual_replay._matching (cognitive 37) scripts/dual_replay.py:672 — dual_replay._matching has cognitive complexity 37 (threshold 15). Drivers by points: if/else 13 (30 pts), boolean chains 4, ternaries 1 (2 pts), 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.
D2 · Cognitive Complexity · PTB · ×1
  • PTB::execute (cognitive 36) crates/sui/src/client_ptb/ptb.rs:81 — PTB::execute has cognitive complexity 36 (threshold 15). Drivers by points: if/else 18 (22 pts), loops 5 (9 pts), match/switch 4 (5 pts) (nesting depth added 9). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · DiscoveryEventLoop · ×1
  • DiscoveryEventLoop::handle_tick (cognitive 35) crates/sui-network/src/discovery/mod.rs:811 — DiscoveryEventLoop::handle_tick has cognitive complexity 35 (threshold 15). Drivers by points: if/else 12 (23 pts), boolean chains 6, loops 6 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · InternalOperation · ×1
  • InternalOperation::try_into_data (cognitive 34) crates/sui-rosetta/src/types/internal_operation.rs:166 — InternalOperation::try_into_data has cognitive complexity 34 (threshold 15). Drivers by points: if/else 17 (29 pts), match/switch 2 (3 pts), boolean chains 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SwarmBuilder · ×1
  • SwarmBuilder::build (cognitive 34) crates/sui-swarm/src/memory/swarm.rs:383 — SwarmBuilder::build has cognitive complexity 34 (threshold 15). Drivers by points: if/else 25 (31 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · LeaderScheduleV3 · ×1
  • LeaderScheduleV3::add_commit (cognitive 33) consensus/core/src/leader_schedule_v3.rs:248 — LeaderScheduleV3::add_commit has cognitive complexity 33 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 10 (15 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.
D2 · Cognitive Complexity · Lexer · ×1
  • Lexer::next (cognitive 33) crates/sui/src/client_ptb/lexer.rs:206 — Lexer::next has cognitive complexity 33 (threshold 15). Drivers by points: if/else 13 (28 pts), match/switch 3 (5 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SuiProgrammableTransactionBlock · ×1
  • SuiProgrammableTransactionBlock::resolve_input_type (cognitive 31) crates/sui-json-rpc-types/src/sui_transaction.rs:1952 — SuiProgrammableTransactionBlock::resolve_input_type has cognitive complexity 31 (threshold 15). Drivers by points: if/else 6 (20 pts), loops 3 (7 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CompiledPackage · ×1
  • CompiledPackage::generate_struct_layouts (cognitive 31) crates/sui-move-build/src/lib.rs:446 — CompiledPackage::generate_struct_layouts has cognitive complexity 31 (threshold 15). Drivers by points: if/else 4 (13 pts), loops 6 (13 pts), match/switch 1 (5 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · typed_store_derive · ×1
  • typed_store_derive::extract_struct_info (cognitive 31) crates/typed-store-derive/src/lib.rs:37 — typed_store_derive::extract_struct_info has cognitive complexity 31 (threshold 15). Drivers by points: if/else 15 (26 pts), match/switch 1 (4 pts), boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CommitObserver · ×1
  • CommitObserver::recover_and_send_commits (cognitive 30) consensus/core/src/commit_observer.rs:151 — CommitObserver::recover_and_send_commits has cognitive complexity 30 (threshold 15). Drivers by points: if/else 13 (21 pts), match/switch 2 (4 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Core · ×1
  • Core::try_commit (cognitive 30) consensus/core/src/core.rs:616 — Core::try_commit has cognitive complexity 30 (threshold 15). Drivers by points: if/else 13 (24 pts), loops 4 (6 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Subscriber · ×1
  • Subscriber::subscription_loop (cognitive 30) consensus/core/src/subscriber.rs:132 — Subscriber::subscription_loop has cognitive complexity 30 (threshold 15). Drivers by points: if/else 6 (17 pts), match/switch 3 (10 pts), loops 2 (3 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BenchDriver · ×1
  • BenchDriver::run (cognitive 30) crates/sui-benchmark/src/drivers/bench_driver.rs:378 — BenchDriver::run has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (20 pts), loops 6 (9 pts), 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.
D2 · Cognitive Complexity · ConsensusTransactionPool · ×1
  • ConsensusTransactionPool::take (cognitive 30) crates/sui-core/src/consensus_transaction_pool.rs:1018 — ConsensusTransactionPool::take has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (17 pts), loops 5 (6 pts), match/switch 3 (5 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TransactionDriver · ×1
  • TransactionDriver::drive_transaction (cognitive 30) crates/sui-core/src/transaction_driver/mod.rs:195 — TransactionDriver::drive_transaction has cognitive complexity 30 (threshold 15). Drivers by points: if/else 13 (24 pts), match/switch 2 (3 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.
D2 · Cognitive Complexity · release_notes.do_check (cognitive 30) · ×1
  • release_notes.do_check (cognitive 30) scripts/release_notes.py:396 — release_notes.do_check has cognitive complexity 30 (threshold 15). Drivers by points: if/else 13 (23 pts), loops 3 (4 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.
D2 · Cognitive Complexity · DagState · ×1
  • DagState::new (cognitive 29) consensus/core/src/dag_state.rs:117 — DagState::new has cognitive complexity 29 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 6 (11 pts), boolean chains 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NotifyRead · ×1
  • NotifyRead::read (cognitive 29) crates/mysten-common/src/sync/notify_read.rs:234 — NotifyRead::read has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (20 pts), loops 2 (5 pts), match/switch 2 (3 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.
D2 · Cognitive Complexity · ExecutionTimeObserver · ×1
  • ExecutionTimeObserver::record_local_observations_timing (cognitive 29) crates/sui-core/src/authority/execution_time_estimator.rs:333 — ExecutionTimeObserver::record_local_observations_timing has cognitive complexity 29 (threshold 15). Drivers by points: if/else 17 (23 pts), boolean chains 5, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ValidatorMetadataV1 · ×1
  • ValidatorMetadataV1::verify (cognitive 28) crates/sui-types/src/sui_system_state/sui_system_state_inner_v1.rs:125 — ValidatorMetadataV1::verify has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (15 pts), match/switch 10 (12 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · telemetry_subscribers · ×1
  • telemetry_subscribers::bin::import-trace::main (cognitive 28) crates/telemetry-subscribers/src/bin/import-trace.rs:32 — telemetry_subscribers::bin::import-trace::main has cognitive complexity 28 (threshold 15). Drivers by points: loops 6 (15 pts), if/else 4 (13 pts) (nesting depth added 18). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · SignedBlockVerifier · ×1
  • SignedBlockVerifier::verify_block (cognitive 27) consensus/core/src/block_verifier.rs:69 — SignedBlockVerifier::verify_block has cognitive complexity 27 (threshold 15). Drivers by points: if/else 17 (21 pts), boolean chains 4, loops 1, 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, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · EndOfEpochTransactionKind · ×1
  • EndOfEpochTransactionKind::validity_check (cognitive 27) crates/sui-types/src/transaction.rs:720 — EndOfEpochTransactionKind::validity_check has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (26 pts), match/switch 1 (nesting depth added 13). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Datasource · ×1
  • Datasource::start_ingestion_task (cognitive 26) crates/sui-bridge-indexer/src/indexer_builder.rs:362 — Datasource::start_ingestion_task has cognitive complexity 26 (threshold 15). Drivers by points: if/else 15 (22 pts), loops 2 (3 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.
D2 · Cognitive Complexity · SharedObjVerManager · ×1
  • SharedObjVerManager::assign_versions_for_certificate (cognitive 26) crates/sui-core/src/authority/shared_object_version_manager.rs:496 — SharedObjVerManager::assign_versions_for_certificate has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (19 pts), loops 2 (4 pts), match/switch 1 (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.
D2 · Cognitive Complexity · StakeAggregator · ×1
  • StakeAggregator::insert (cognitive 26) crates/sui-core/src/stake_aggregator.rs:126 — StakeAggregator::insert has cognitive complexity 26 (threshold 15). Drivers by points: if/else 4 (11 pts), match/switch 4 (11 pts), loops 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.
D2 · Cognitive Complexity · DataStore · ×1
  • DataStore::get_objects (cognitive 26) crates/sui-data-store/src/stores/graphql.rs:177 — DataStore::get_objects has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (15 pts), match/switch 3 (7 pts), loops 2 (4 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.
D2 · Cognitive Complexity · StateSyncEventLoop · ×1
  • StateSyncEventLoop::start (cognitive 26) crates/sui-network/src/state_sync/mod.rs:713 — StateSyncEventLoop::start has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (19 pts), match/switch 2 (5 pts), loops 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.
D2 · Cognitive Complexity · AccumulatorWriteV1 · ×1
  • AccumulatorWriteV1::merge (cognitive 26) crates/sui-types/src/effects/object_change.rs:121 — AccumulatorWriteV1::merge has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (18 pts), loops 2 (4 pts), match/switch 2 (4 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ExecutionResultsV2 · ×1
  • ExecutionResultsV2::update_version_and_previous_tx (cognitive 26) crates/sui-types/src/execution.rs:180 — ExecutionResultsV2::update_version_and_previous_tx has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (22 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ArgUses · ×1
  • ArgUses::build (cognitive 25) crates/sui-rpc-api/src/grpc/v2/transaction_execution_service/simulate/resolve/mod.rs:843 — ArgUses::build has cognitive complexity 25 (threshold 15). Drivers by points: loops 7 (18 pts), if/else 2 (5 pts), match/switch 1 (2 pts) (nesting depth added 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.
D2 · Cognitive Complexity · sui_verifier_v1 · ×1
  • sui_verifier_v1::one_time_witness_verifier::verify_module (cognitive 25) sui-execution/historical-versions/v1/sui-verifier/src/one_time_witness_verifier.rs:33 — sui_verifier_v1::one_time_witness_verifier::verify_module has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (22 pts), loops 2, boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sui_verifier_v2 · ×1
  • sui_verifier_v2::one_time_witness_verifier::verify_module (cognitive 25) sui-execution/historical-versions/v2/sui-verifier/src/one_time_witness_verifier.rs:33 — sui_verifier_v2::one_time_witness_verifier::verify_module has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (22 pts), loops 2, boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sui_verifier_v3 · ×1
  • sui_verifier_v3::one_time_witness_verifier::verify_module (cognitive 25) sui-execution/historical-versions/v3/sui-verifier/src/one_time_witness_verifier.rs:33 — sui_verifier_v3::one_time_witness_verifier::verify_module has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (22 pts), loops 2, boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sui_verifier_latest · ×1
  • sui_verifier_latest::one_time_witness_verifier::verify_module (cognitive 25) sui-execution/latest/sui-verifier/src/one_time_witness_verifier.rs:33 — sui_verifier_latest::one_time_witness_verifier::verify_module has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (22 pts), loops 2, boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sui_authority_aggregation · ×1
  • sui_authority_aggregation::quorum_map_then_reduce_with_timeout_and_prefs (cognitive 24) crates/sui-authority-aggregation/src/lib.rs:37 — sui_authority_aggregation::quorum_map_then_reduce_with_timeout_and_prefs has cognitive complexity 24 (threshold 15). Drivers by points: match/switch 4 (13 pts), if/else 4 (6 pts), loops 3 (5 pts) (nesting depth added 13). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · SuiSyncer · ×1
  • SuiSyncer::run_grpc_listening_task (cognitive 24) crates/sui-bridge/src/sui_syncer.rs:93 — SuiSyncer::run_grpc_listening_task has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 3 (5 pts), match/switch 1 (4 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ProgressSavingPolicy · ×1
  • ProgressSavingPolicy::cache_progress (cognitive 24) crates/sui-bridge-indexer/src/progress.rs:51 — ProgressSavingPolicy::cache_progress has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (20 pts), loops 1 (2 pts), boolean chains 1, 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.
D2 · Cognitive Complexity · TransactionSubmitter · ×1
  • TransactionSubmitter::submit_transaction (cognitive 24) crates/sui-core/src/transaction_driver/transaction_submitter.rs:55 — TransactionSubmitter::submit_transaction has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (13 pts), match/switch 3 (8 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.
D2 · Cognitive Complexity · ChannelPoolInner · ×1
  • ChannelPoolInner::resize (cognitive 24) crates/sui-kvstore/src/bigtable/client/channel_pool.rs:221 — ChannelPoolInner::resize has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (17 pts), match/switch 1 (4 pts), loops 1 (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.
D2 · Cognitive Complexity · StateSnapshotReaderV1 · ×1
  • StateSnapshotReaderV1::new (cognitive 24) crates/sui-snapshot/src/reader.rs:114 — StateSnapshotReaderV1::new has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (13 pts), loops 4 (6 pts), match/switch 3 (5 pts) (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · SenderSignedData · ×1
  • SenderSignedData::check_user_signature_protocol_compatibility (cognitive 24) crates/sui-types/src/transaction.rs:4223 — SenderSignedData::check_user_signature_protocol_compatibility has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (18 pts), boolean chains 3, match/switch 1 (2 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.
D2 · Cognitive Complexity · sui_verifier_v0 · ×1
  • sui_verifier_v0::one_time_witness_verifier::verify_module (cognitive 24) sui-execution/historical-versions/v0/sui-verifier/src/one_time_witness_verifier.rs:32 — sui_verifier_v0::one_time_witness_verifier::verify_module has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (21 pts), loops 2, boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BridgeMonitor · ×1
  • BridgeMonitor::handle_eth_events (cognitive 23) crates/sui-bridge/src/monitor.rs:227 — BridgeMonitor::handle_eth_events has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (12 pts), match/switch 6 (11 pts) (nesting depth added 11). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Resolver · ×1
  • Resolver::pure_input_layouts (cognitive 23) crates/sui-package-resolver/src/lib.rs:499 — Resolver::pure_input_layouts has cognitive complexity 23 (threshold 15). Drivers by points: loops 5 (12 pts), if/else 5 (8 pts), match/switch 2 (3 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.
D2 · Cognitive Complexity · SurferTask · ×1
  • SurferTask::create_surfer_tasks (cognitive 23) crates/sui-surfer/src/surfer_task.rs:27 — SurferTask::create_surfer_tasks has cognitive complexity 23 (threshold 15). Drivers by points: if/else 4 (15 pts), match/switch 2 (6 pts), boolean chains 1, loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AuthorityNode · ×1
  • AuthorityNode::start (cognitive 22) consensus/core/src/authority_node.rs:193 — AuthorityNode::start has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (16 pts), loops 2 (4 pts), boolean chains 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.
D2 · Cognitive Complexity · RoundProber · ×1
  • RoundProber::probe (cognitive 22) consensus/core/src/round_prober.rs:104 — RoundProber::probe has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (15 pts), match/switch 2 (5 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.
D2 · Cognitive Complexity · AnemoConnectionMonitor · ×1
  • AnemoConnectionMonitor::run (cognitive 22) crates/mysten-network/src/anemo_connection_monitor.rs:80 — AnemoConnectionMonitor::run has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 4 (7 pts), 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.
D2 · Cognitive Complexity · WaitingPeer · ×1
  • WaitingPeer::do_rpc (cognitive 22) crates/mysten-network/src/anemo_ext.rs:38 — WaitingPeer::do_rpc has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (16 pts), match/switch 2 (5 pts), loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ProgramParser · ×1
  • ProgramParser::parse (cognitive 22) crates/sui/src/client_ptb/parser.rs:93 — ProgramParser::parse has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (17 pts), match/switch 2 (4 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Builder · ×1
  • Builder::validate_output (cognitive 22) crates/sui-genesis-builder/src/lib.rs:283 — Builder::validate_output has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (16 pts), loops 3, boolean chains 2, match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sui_indexer_alt · ×1
  • sui_indexer_alt::setup_indexer (cognitive 22) crates/sui-indexer-alt/src/lib.rs:55 — sui_indexer_alt::setup_indexer has cognitive complexity 22 (threshold 15). Drivers by points: if/else 22. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · SubscriptionService · ×1
  • SubscriptionService::start (cognitive 22) crates/sui-rpc-api/src/subscription/mod.rs:549 — SubscriptionService::start has cognitive complexity 22 (threshold 15). Drivers by points: match/switch 5 (14 pts), if/else 2 (6 pts), loops 2 (nesting depth added 13). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · CutPlan · ×1
  • CutPlan::discover (cognitive 22) sui-execution/cut/src/plan.rs:92 — CutPlan::discover has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (17 pts), loops 4, boolean chains 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.
D2 · Cognitive Complexity · ScoringSubdag · ×1
  • ScoringSubdag::add_subdags (cognitive 21) consensus/core/src/leader_scoring.rs:104 — ScoringSubdag::add_subdags has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (15 pts), loops 3 (6 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SuiValidatorCommand · ×1
  • SuiValidatorCommand::execute (cognitive 21) crates/sui/src/validator_commands.rs:294 — SuiValidatorCommand::execute has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (14 pts), match/switch 3 (5 pts), boolean chains 2 (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · ParquetWriter · ×1
  • ParquetWriter::write (cognitive 21) crates/sui-analytics-indexer/src/writers/parquet.rs:66 — ParquetWriter::write has cognitive complexity 21 (threshold 15). Drivers by points: match/switch 4 (12 pts), loops 3 (6 pts), if/else 2 (3 pts) (nesting depth added 12). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · EthSyncer · ×1
  • EthSyncer::run_event_listening_task (cognitive 21) crates/sui-bridge/src/eth_syncer.rs:125 — EthSyncer::run_event_listening_task has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (17 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TakenTransactionsGuard · ×1
  • TakenTransactionsGuard::drop (cognitive 21) crates/sui-core/src/consensus_transaction_pool.rs:946 — TakenTransactionsGuard::drop has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (13 pts), match/switch 2 (5 pts), loops 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.
D2 · Cognitive Complexity · SuiTransactionBlockEffects · ×1
  • SuiTransactionBlockEffects::fmt (cognitive 21) crates/sui-json-rpc-types/src/sui_transaction.rs:1128 — SuiTransactionBlockEffects::fmt has cognitive complexity 21 (threshold 15). Drivers by points: loops 7 (14 pts), if/else 7 (nesting depth added 7). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · release_notes.fetch_release_notes_for_commits (cognitive 21) · ×1
  • release_notes.fetch_release_notes_for_commits (cognitive 21) scripts/release_notes.py:323 — release_notes.fetch_release_notes_for_commits has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (13 pts), loops 4 (8 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TonicObserverClient · ×1
  • TonicObserverClient::fetch_blocks (cognitive 20) consensus/core/src/network/observer.rs:314 — TonicObserverClient::fetch_blocks has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 2 (4 pts), match/switch 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.
D2 · Cognitive Complexity · UniversalCommitter · ×1
  • UniversalCommitter::try_decide (cognitive 20) consensus/core/src/universal_committer.rs:42 — UniversalCommitter::try_decide has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 3 (4 pts), match/switch 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · anemo_benchmark · ×1
  • anemo_benchmark::main (cognitive 20) crates/anemo-benchmark/src/main.rs:133 — anemo_benchmark::main has cognitive complexity 20 (threshold 15). Drivers by points: loops 6 (10 pts), if/else 4 (8 pts), match/switch 1 (2 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.
D2 · Cognitive Complexity · sui_analytics_indexer · ×1
  • sui_analytics_indexer::handlers::tables::parse_struct_field (cognitive 20) crates/sui-analytics-indexer/src/handlers/tables/mod.rs:235 — sui_analytics_indexer::handlers::tables::parse_struct_field has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 2 (4 pts), boolean chains 1, 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.
D2 · Cognitive Complexity · sui_data_ingestion_core · ×1
  • sui_data_ingestion_core::reducer::reduce (cognitive 20) crates/sui-data-ingestion-core/src/reducer.rs:13 — sui_data_ingestion_core::reducer::reduce has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 3 (5 pts), 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.
D2 · Cognitive Complexity · TransactionFilter · ×1
  • TransactionFilter::matches (cognitive 20) crates/sui-indexer-alt-graphql/src/api/types/transaction/filter.rs:214 — TransactionFilter::matches has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 3, 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.
D2 · Cognitive Complexity · Pretty · ×1
  • Pretty::fmt (cognitive 20) crates/sui-json-rpc-types/src/displays/transaction_displays.rs:18 — Pretty::fmt has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 2 (4 pts), match/switch 1 (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.
D2 · Cognitive Complexity · monitor_synced.main (cognitive 20) · ×1
  • monitor_synced.main (cognitive 20) scripts/compatibility/monitor_synced.py:102 — monitor_synced.main has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 2, boolean chains 1, error handling 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TransactionProcessor · ×1
  • TransactionProcessor::process (cognitive 19) crates/sui-analytics-indexer/src/handlers/tables/transaction.rs:44 — TransactionProcessor::process has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 2 (5 pts), match/switch 1 (5 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FileSystemStore · ×1
  • FileSystemStore::write_chain_identifier (cognitive 19) crates/sui-data-store/src/stores/filesystem.rs:731 — FileSystemStore::write_chain_identifier has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 4 (6 pts), match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GenesisValidatorInfo · ×1
  • GenesisValidatorInfo::validate (cognitive 19) crates/sui-genesis-builder/src/validator_info.rs:92 — GenesisValidatorInfo::validate has cognitive complexity 19 (threshold 15). Drivers by points: if/else 19. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · sui_node · ×1
  • sui_node::address_prober::build_groups (cognitive 19) crates/sui-node/src/address_prober.rs:860 — sui_node::address_prober::build_groups has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 5 (7 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MoveTxGenerator · ×1
  • MoveTxGenerator::generate_tx (cognitive 19) crates/sui-single-node-benchmark/src/tx_generator/move_tx_generator.rs:53 — MoveTxGenerator::generate_tx has cognitive complexity 19 (threshold 15). Drivers by points: loops 5 (10 pts), if/else 7 (9 pts) (nesting depth added 7). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · AncestorStateManager · ×1
  • AncestorStateManager::update_all_ancestors_state (cognitive 18) consensus/core/src/ancestor.rs:121 — AncestorStateManager::update_all_ancestors_state has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 3, match/switch 1 (2 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BenchmarkSetup · ×1
  • BenchmarkSetup::new (cognitive 18) crates/sui-benchmark/src/benchmark_setup.rs:31 — BenchmarkSetup::new has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (11 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PartyState · ×1
  • PartyState::handle_result (cognitive 18) crates/sui-benchmark/src/workloads/composite/mod.rs:630 — PartyState::handle_result has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), match/switch 4 (6 pts) (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · EthBridgeEvent · ×1
  • EthBridgeEvent::try_into_bridge_action (cognitive 18) crates/sui-bridge/src/abi.rs:109 — EthBridgeEvent::try_into_bridge_action has cognitive complexity 18 (threshold 15). Drivers by points: match/switch 7 (14 pts), if/else 1 (4 pts) (nesting depth added 10). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · ConsensusThroughputCalculator · ×1
  • ConsensusThroughputCalculator::add_transactions (cognitive 18) crates/sui-core/src/consensus_throughput_calculator.rs:358 — ConsensusThroughputCalculator::add_transactions has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (18 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.
D2 · Cognitive Complexity · ConsensusStorePruner · ×1
  • ConsensusStorePruner::prune_old_epoch_data (cognitive 18) crates/sui-core/src/epoch/consensus_store_pruner.rs:109 — ConsensusStorePruner::prune_old_epoch_data has cognitive complexity 18 (threshold 15). Drivers by points: match/switch 5 (10 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.
D2 · Cognitive Complexity · sui_execution_backtest · ×1
  • sui_execution_backtest::execute::rewrite_coin_reservations (cognitive 18) crates/sui-execution-backtest/src/execute.rs:337 — sui_execution_backtest::execute::rewrite_coin_reservations has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (8 pts), loops 4 (6 pts), match/switch 2 (4 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.
D2 · Cognitive Complexity · sui_kvstore · ×1
  • sui_kvstore::bigtable::mock_server::parse_read_filter (cognitive 18) crates/sui-kvstore/src/bigtable/mock_server.rs:459 — sui_kvstore::bigtable::mock_server::parse_read_filter has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (12 pts), match/switch 2 (4 pts), loops 1 (2 pts) (nesting depth added 12). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · NativesCostTable · ×1
  • NativesCostTable::from_protocol_config (cognitive 18) sui-execution/historical-versions/v3/sui-move-natives/src/lib.rs:205 — NativesCostTable::from_protocol_config has cognitive complexity 18 (threshold 15). Drivers by points: if/else 18. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · GasCharger · ×1
  • GasCharger::legacy_charge_gas (cognitive 18) sui-execution/latest/sui-adapter/src/gas_charger.rs:544 — GasCharger::legacy_charge_gas has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 2, 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.
D2 · Cognitive Complexity · dual_replay._end_of_struct_decl (cognitive 18) · ×1
  • dual_replay._end_of_struct_decl (cognitive 18) scripts/dual_replay.py:607 — dual_replay._end_of_struct_decl has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 5, loops 3 (4 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.
D2 · Cognitive Complexity · release_notes.do_list_prs (cognitive 18) · ×1
  • release_notes.do_list_prs (cognitive 18) scripts/release_notes.py:522 — release_notes.do_list_prs has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 3 (5 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · seed-search.collect_satisfied_assertions (cognitive 18) · ×1
  • seed-search.collect_satisfied_assertions (cognitive 18) scripts/simtest/seed-search.py:122 — seed-search.collect_satisfied_assertions has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 3 (7 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sparse-checkout.read_sparse_config (cognitive 18) · ×1
  • sparse-checkout.read_sparse_config (cognitive 18) scripts/sparse-checkout.py:45 — sparse-checkout.read_sparse_config has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WrappedObjectProcessor · ×1
  • WrappedObjectProcessor::process (cognitive 17) crates/sui-analytics-indexer/src/handlers/tables/wrapped_object.rs:48 — WrappedObjectProcessor::process has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (7 pts), loops 3 (6 pts), match/switch 1 (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.
D2 · Cognitive Complexity · AdmissionQueueEventLoop · ×1
  • AdmissionQueueEventLoop::run (cognitive 17) crates/sui-core/src/admission_queue.rs:749 — AdmissionQueueEventLoop::run has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 3 (8 pts), if/else 3 (6 pts), boolean chains 2, loops 1 (nesting depth added 8). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · CheckpointAggregator · ×1
  • CheckpointAggregator::run_inner (cognitive 17) crates/sui-core/src/checkpoints/mod.rs:2407 — CheckpointAggregator::run_inner has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (14 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.
D2 · Cognitive Complexity · Extractor · ×1
  • Extractor::visit_struct (cognitive 17) crates/sui-display/src/v2/visitor/extractor.rs:148 — Extractor::visit_struct has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (14 pts), 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.
D2 · Cognitive Complexity · sui_fork · ×1
  • sui_fork::gql::queries::address_balances_query::query (cognitive 17) crates/sui-fork/src/gql/queries.rs:696 — sui_fork::gql::queries::address_balances_query::query has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (14 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.
D2 · Cognitive Complexity · sui_indexer_alt_consistent_store · ×1
  • sui_indexer_alt_consistent_store::handlers::checkpoint_input_objects (cognitive 17) crates/sui-indexer-alt-consistent-store/src/handlers/mod.rs:23 — sui_indexer_alt_consistent_store::handlers::checkpoint_input_objects has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 3 (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.
D2 · Cognitive Complexity · EventFilter · ×1
  • EventFilter::matches (cognitive 17) crates/sui-indexer-alt-graphql/src/api/types/event/filter.rs:119 — EventFilter::matches has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 5 (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.
D2 · Cognitive Complexity · EventStreamState · ×1
  • EventStreamState::bucket_events_by_settlement (cognitive 17) crates/sui-light-client/src/authenticated_events/stream.rs:295 — EventStreamState::bucket_events_by_settlement has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (8 pts), boolean chains 4, loops 2 (3 pts), match/switch 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.
D2 · Cognitive Complexity · Indexer · ×1
  • Indexer::add_pipelines (cognitive 17) crates/sui-rpc-store/src/indexer/mod.rs:360 — Indexer::add_pipelines has cognitive complexity 17 (threshold 15). Drivers by points: if/else 17. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · SurfStrategy · ×1
  • SurfStrategy::choose_function_call_args (cognitive 17) crates/sui-surfer/src/surf_strategy.rs:62 — SurfStrategy::choose_function_call_args has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 3 (8 pts), if/else 4 (6 pts), loops 2 (3 pts) (nesting depth added 8). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · sui_transaction_checks · ×1
  • sui_transaction_checks::checked::check_one_object (cognitive 17) crates/sui-transaction-checks/src/lib.rs:501 — sui_transaction_checks::checked::check_one_object has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 5 (11 pts), if/else 3 (6 pts) (nesting depth added 9). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · TransactionKind · ×1
  • TransactionKind::validity_check (cognitive 17) crates/sui-types/src/transaction.rs:2217 — TransactionKind::validity_check has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 1 (2 pts), match/switch 1 (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · sui_move_natives_latest · ×1
  • sui_move_natives_latest::crypto::groth16::verify_groth16_proof_internal (cognitive 17) sui-execution/latest/sui-move-natives/src/crypto/groth16.rs:151 — sui_move_natives_latest::crypto::groth16::verify_groth16_proof_internal has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (14 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.
D2 · Cognitive Complexity · sparse-checkout.modify_cargo_toml (cognitive 17) · ×1
  • sparse-checkout.modify_cargo_toml (cognitive 17) scripts/sparse-checkout.py:120 — sparse-checkout.modify_cargo_toml has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 3 (4 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.
D2 · Cognitive Complexity · LeaderSlotDecider · ×1
  • LeaderSlotDecider::try_indirect_decide (cognitive 16) consensus/core/src/leader_slot_decider.rs:128 — LeaderSlotDecider::try_indirect_decide has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 3 (4 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.
D2 · Cognitive Complexity · ObjectProcessor · ×1
  • ObjectProcessor::process_object (cognitive 16) crates/sui-analytics-indexer/src/handlers/tables/object.rs:125 — ObjectProcessor::process_object has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (12 pts), match/switch 2 (4 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.
D2 · Cognitive Complexity · GasDoubleSpendPayload · ×1
  • GasDoubleSpendPayload::handle_batch_results (cognitive 16) crates/sui-benchmark/src/workloads/gas_double_spend.rs:147 — GasDoubleSpendPayload::handle_batch_results has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BridgeOrchestrator · ×1
  • BridgeOrchestrator::run_eth_watcher (cognitive 16) crates/sui-bridge/src/orchestrator.rs:166 — BridgeOrchestrator::run_eth_watcher has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (7 pts), loops 3 (6 pts), match/switch 1 (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.
D2 · Cognitive Complexity · sui_bridge_indexer · ×1
  • sui_bridge_indexer::eth_bridge_indexer::loop_retrieve_and_process_log_range (cognitive 16) crates/sui-bridge-indexer/src/eth_bridge_indexer.rs:365 — sui_bridge_indexer::eth_bridge_indexer::loop_retrieve_and_process_log_range has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (12 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LiveSetIter · ×1
  • LiveSetIter::next (cognitive 16) crates/sui-core/src/authority/authority_store_tables.rs:916 — LiveSetIter::next has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (14 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NodeStateDump · ×1
  • NodeStateDump::new (cognitive 16) crates/sui-core/src/authority.rs:5108 — NodeStateDump::new has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 5, match/switch 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.
D2 · Cognitive Complexity · CongestionTracker · ×1
  • CongestionTracker::compute_per_checkpoint_congestion_info (cognitive 16) crates/sui-core/src/congestion_tracker.rs:175 — CongestionTracker::compute_per_checkpoint_congestion_info has cognitive complexity 16 (threshold 15). Drivers by points: loops 4 (6 pts), match/switch 2 (6 pts), if/else 1 (4 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AddressBalances · ×1
  • AddressBalances::process (cognitive 16) crates/sui-indexer-alt-consistent-store/src/handlers/address_balances.rs:32 — AddressBalances::process has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 3 (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.
D2 · Cognitive Complexity · SuiTransactionBlockResponse · ×1
  • SuiTransactionBlockResponse::fmt (cognitive 16) crates/sui-json-rpc-types/src/sui_transaction.rs:310 — SuiTransactionBlockResponse::fmt has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (8 pts), loops 2 (5 pts), match/switch 1 (3 pts) (nesting depth added 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.
D2 · Cognitive Complexity · BatchWriteFlowController · ×1
  • BatchWriteFlowController::complete_stream (cognitive 16) crates/sui-kvstore/src/bigtable/client/flow_control.rs:727 — BatchWriteFlowController::complete_stream has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (16 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.
D2 · Cognitive Complexity · CallArg · ×1
  • CallArg::validity_check (cognitive 16) crates/sui-types/src/transaction.rs:861 — CallArg::validity_check has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (10 pts), match/switch 3 (6 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.
D2 · Cognitive Complexity · DBMap · ×1
  • DBMap::new (cognitive 16) crates/typed-store/src/rocks/mod.rs:649 — DBMap::new has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (10 pts), match/switch 1 (3 pts), loops 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.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D35 · Change Coupling · Change coupling clique · ×1
  • Change coupling clique: list_checkpoints.rs, list_events.rs, list_transactions.rs, list_checkpoints.rs, list_transactions.rs crates/sui-kv-rpc/src/v2/list_checkpoints.rs — 5 files — `crates/sui-kv-rpc/src/v2/list_checkpoints.rs`, `crates/sui-kv-rpc/src/v2/list_events.rs`, `crates/sui-kv-rpc/src/v2/list_transactions.rs`, `crates/sui-rpc-api/src/grpc/v2/ledger_service/list_checkpoints.rs`, `crates/sui-rpc-api/src/grpc/v2/ledger_service/list_transactions.rs` — all change together with no explicit dependency: a fully-connected co-change clique, not 10 separate couplings. They share one concern (thin parallel siblings over a common abstraction), so extract the shared part into ONE unit and the whole clique's coupling clears at once — you do not need to break each pair individually.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D4 · Code Duplication · Near-duplicate member family (10 members, 29 shared lines) · ×1
  • Near-duplicate member family (10 members, 29 shared lines) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_k1.rs:65 — sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_k1.rs:65-137 | sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_r1.rs:66-140 | sui-execution/historical-versions/v1/sui-move-natives/src/crypto/ecdsa_k1.rs:65-137 | sui-execution/historical-versions/v1/sui-move-natives/src/crypto/ecdsa_r1.rs:66-140 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/ecdsa_k1.rs:65-137 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/ecdsa_r1.rs:66-140 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/ecdsa_k1.rs:76-148 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/ecdsa_r1.rs:66-140 | sui-execution/latest/sui-move-natives/src/crypto/ecdsa_k1.rs:78-150 | sui-execution/latest/sui-move-natives/src/crypto/ecdsa_r1.rs:68-142 — These 10 members are variants of one another: a block of 29 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them 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 · Near-duplicate member family (10 members, 23 shared lines) · ×1
  • Near-duplicate member family (10 members, 23 shared lines) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_k1.rs:211 — sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_k1.rs:211-288 | sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_r1.rs:173-247 | sui-execution/historical-versions/v1/sui-move-natives/src/crypto/ecdsa_k1.rs:211-288 | sui-execution/historical-versions/v1/sui-move-natives/src/crypto/ecdsa_r1.rs:173-247 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/ecdsa_k1.rs:211-288 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/ecdsa_r1.rs:173-247 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/ecdsa_k1.rs:220-297 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/ecdsa_r1.rs:173-247 | sui-execution/latest/sui-move-natives/src/crypto/ecdsa_k1.rs:222-299 | sui-execution/latest/sui-move-natives/src/crypto/ecdsa_r1.rs:175-249 — These 10 members are variants of one another: a block of 23 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them 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 · Near-duplicate member family (9 members, 26 shared lines) · ×1
  • Near-duplicate member family (9 members, 26 shared lines) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_k1.rs:65 — sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_k1.rs:65-137 | sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_k1.rs:211-288 | sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_r1.rs:66-140 | sui-execution/historical-versions/v1/sui-move-natives/src/crypto/ecdsa_k1.rs:65-137 | sui-execution/historical-versions/v1/sui-move-natives/src/crypto/ecdsa_k1.rs:211-288 | sui-execution/historical-versions/v1/sui-move-natives/src/crypto/ecdsa_r1.rs:66-140 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/ecdsa_k1.rs:65-137 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/ecdsa_k1.rs:211-288 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/ecdsa_r1.rs:66-140 — These 9 members are variants of one another: a block of 26 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 9 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 9 times.
D4 · Code Duplication · Near-duplicate member family (8 members, 23 shared lines) · ×1
  • Near-duplicate member family (8 members, 23 shared lines) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/bls12381.rs:45 — sui-execution/historical-versions/v0/sui-move-natives/src/crypto/bls12381.rs:45-101 | sui-execution/historical-versions/v0/sui-move-natives/src/crypto/bls12381.rs:125-182 | sui-execution/historical-versions/v1/sui-move-natives/src/crypto/bls12381.rs:45-101 | sui-execution/historical-versions/v1/sui-move-natives/src/crypto/bls12381.rs:125-182 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/bls12381.rs:45-101 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/bls12381.rs:125-182 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/bls12381.rs:45-99 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/bls12381.rs:123-178 — These 8 members are variants of one another: a block of 23 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 8 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 8 times.
D4 · Code Duplication · Near-duplicate member family (7 members, 23 shared lines) · ×1
  • Near-duplicate member family (7 members, 23 shared lines) sui-execution/historical-versions/v0/sui-verifier/src/private_generics.rs:166 — sui-execution/historical-versions/v0/sui-verifier/src/private_generics.rs:166-191 | sui-execution/historical-versions/v1/sui-verifier/src/private_generics.rs:168-193 | sui-execution/historical-versions/v2/sui-verifier/src/private_generics.rs:187-212 | sui-execution/historical-versions/v3/sui-verifier/src/private_generics.rs:249-274 | sui-execution/historical-versions/v3/sui-verifier/src/private_generics_verifier_v2.rs:288-313 | sui-execution/latest/sui-verifier/src/private_generics.rs:249-274 | sui-execution/latest/sui-verifier/src/private_generics_verifier_v2.rs:289-314 — These 7 members are variants of one another: a block of 23 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 7 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 7 times.
D4 · Code Duplication · Near-duplicate member family (7 members, 10 shared lines) · ×1
  • Near-duplicate member family (7 members, 10 shared lines) sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs:170 — sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs:170-206 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs:217-263 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs:274-320 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs:331-392 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs:403-464 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs:637-695 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs:706-745 — These 7 members are variants of one another: a block of 10 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 7 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 7 times.
D4 · Code Duplication · Near-duplicate member family (6 members, 19 shared lines) · ×1
  • Near-duplicate member family (6 members, 19 shared lines) sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs:217 — sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs:217-263 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs:274-320 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs:331-392 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs:403-464 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs:476-534 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs:706-745 — These 6 members are variants of one another: a block of 19 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
D4 · Code Duplication · Near-duplicate member family (6 members, 17 shared lines) · ×1
  • Near-duplicate member family (6 members, 17 shared lines) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/translate.rs:1139 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/translate.rs:1139-1158 | sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/translate.rs:1232-1251 | sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/drop_safety.rs:69-88 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/translate.rs:1164-1183 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/translate.rs:1296-1315 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/verify/drop_safety.rs:69-88 — These 6 members are variants of one another: a block of 17 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
D4 · Code Duplication · Near-duplicate member family (5 members, 285 shared lines) · ×1
  • Near-duplicate member family (5 members, 285 shared lines) sui-execution/historical-versions/v0/sui-move-natives/src/lib.rs:135 — sui-execution/historical-versions/v0/sui-move-natives/src/lib.rs:135-469 | sui-execution/historical-versions/v1/sui-move-natives/src/lib.rs:153-503 | sui-execution/historical-versions/v2/sui-move-natives/src/lib.rs:163-611 | sui-execution/historical-versions/v3/sui-move-natives/src/lib.rs:205-808 | sui-execution/latest/sui-move-natives/src/lib.rs:239-890 — These 5 members are variants of one another: a block of 285 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them 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 · Near-duplicate member family (5 members, 156 shared lines) · ×1
  • Near-duplicate member family (5 members, 156 shared lines) sui-execution/historical-versions/v0/sui-verifier/src/id_leak_verifier.rs:390 — sui-execution/historical-versions/v0/sui-verifier/src/id_leak_verifier.rs:390-562 | sui-execution/historical-versions/v1/sui-verifier/src/id_leak_verifier.rs:364-536 | sui-execution/historical-versions/v2/sui-verifier/src/id_leak_verifier.rs:379-551 | sui-execution/historical-versions/v3/sui-verifier/src/id_leak_verifier.rs:408-608 | sui-execution/latest/sui-verifier/src/id_leak_verifier.rs:414-614 — These 5 members are variants of one another: a block of 156 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them 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 · Near-duplicate member family (5 members, 94 shared lines) · ×1
  • Near-duplicate member family (5 members, 94 shared lines) sui-execution/historical-versions/v0/sui-verifier/src/global_storage_access_verifier.rs:14 — sui-execution/historical-versions/v0/sui-verifier/src/global_storage_access_verifier.rs:14-124 | sui-execution/historical-versions/v1/sui-verifier/src/global_storage_access_verifier.rs:14-124 | sui-execution/historical-versions/v2/sui-verifier/src/global_storage_access_verifier.rs:14-122 | sui-execution/historical-versions/v3/sui-verifier/src/global_storage_access_verifier.rs:14-122 | sui-execution/latest/sui-verifier/src/global_storage_access_verifier.rs:14-122 — These 5 members are variants of one another: a block of 94 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them 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 · Near-duplicate member family (5 members, 56 shared lines) · ×1
  • Near-duplicate member family (5 members, 56 shared lines) sui-execution/historical-versions/v0/sui-verifier/src/struct_with_key_verifier.rs:22 — sui-execution/historical-versions/v0/sui-verifier/src/struct_with_key_verifier.rs:22-82 | sui-execution/historical-versions/v1/sui-verifier/src/struct_with_key_verifier.rs:22-82 | sui-execution/historical-versions/v2/sui-verifier/src/struct_with_key_verifier.rs:22-82 | sui-execution/historical-versions/v3/sui-verifier/src/struct_with_key_verifier.rs:23-83 | sui-execution/latest/sui-verifier/src/struct_with_key_verifier.rs:23-83 — These 5 members are variants of one another: a block of 56 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them 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 · Near-duplicate member family (5 members, 51 shared lines) · ×1
  • Near-duplicate member family (5 members, 51 shared lines) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/groth16.rs:131 — sui-execution/historical-versions/v0/sui-move-natives/src/crypto/groth16.rs:131-237 | sui-execution/historical-versions/v1/sui-move-natives/src/crypto/groth16.rs:131-237 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/groth16.rs:131-237 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/groth16.rs:131-245 | sui-execution/latest/sui-move-natives/src/crypto/groth16.rs:155-285 — These 5 members are variants of one another: a block of 51 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them 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 · Near-duplicate member family (5 members, 49 shared lines) · ×1
  • Near-duplicate member family (5 members, 49 shared lines) sui-execution/historical-versions/v0/sui-adapter/src/error.rs:18 — sui-execution/historical-versions/v0/sui-adapter/src/error.rs:18-85 | sui-execution/historical-versions/v1/sui-adapter/src/error.rs:18-85 | sui-execution/historical-versions/v2/sui-adapter/src/error.rs:18-85 | sui-execution/historical-versions/v3/sui-adapter/src/error.rs:19-80 | sui-execution/latest/sui-adapter/src/error.rs:19-80 — These 5 members are variants of one another: a block of 49 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them 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 · Near-duplicate member family (5 members, 40 shared lines) · ×1
  • Near-duplicate member family (5 members, 40 shared lines) sui-execution/historical-versions/v0/sui-adapter/src/execution_engine.rs:503 — sui-execution/historical-versions/v0/sui-adapter/src/execution_engine.rs:503-550 | sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs:708-754 | sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs:735-781 | sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.rs:859-905 | sui-execution/latest/sui-adapter/src/execution_engine.rs:1893-1939 — These 5 members are variants of one another: a block of 40 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them 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 · Near-duplicate member family (5 members, 30 shared lines) · ×1
  • Near-duplicate member family (5 members, 30 shared lines) sui-execution/historical-versions/v0/sui-move-natives/src/lib.rs:472 — sui-execution/historical-versions/v0/sui-move-natives/src/lib.rs:472-701 | sui-execution/historical-versions/v1/sui-move-natives/src/lib.rs:506-750 | sui-execution/historical-versions/v2/sui-move-natives/src/lib.rs:614-903 | sui-execution/historical-versions/v3/sui-move-natives/src/lib.rs:921-1348 | sui-execution/latest/sui-move-natives/src/lib.rs:1039-1520 — These 5 members are variants of one another: a block of 30 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them 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 · Near-duplicate member family (5 members, 25 shared lines) · ×1
  • Near-duplicate member family (5 members, 25 shared lines) sui-execution/historical-versions/v0/sui-verifier/src/entry_points_verifier.rs:73 — sui-execution/historical-versions/v0/sui-verifier/src/entry_points_verifier.rs:73-103 | sui-execution/historical-versions/v1/sui-verifier/src/entry_points_verifier.rs:72-102 | sui-execution/historical-versions/v2/sui-verifier/src/entry_points_verifier.rs:76-106 | sui-execution/historical-versions/v3/sui-verifier/src/entry_points_verifier.rs:76-106 | sui-execution/latest/sui-verifier/src/entry_points_verifier.rs:76-106 — These 5 members are variants of one another: a block of 25 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them 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 · Near-duplicate member family (5 members, 24 shared lines) · ×1
  • Near-duplicate member family (5 members, 24 shared lines) sui-execution/historical-versions/v0/sui-move-natives/src/object_runtime/object_store.rs:187 — sui-execution/historical-versions/v0/sui-move-natives/src/object_runtime/object_store.rs:187-239 | sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/object_store.rs:256-308 | sui-execution/historical-versions/v2/sui-move-natives/src/object_runtime/object_store.rs:259-315 | sui-execution/historical-versions/v3/sui-move-natives/src/object_runtime/object_store.rs:339-408 | sui-execution/latest/sui-move-natives/src/object_runtime/object_store.rs:321-386 — These 5 members are variants of one another: a block of 24 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them 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 · Near-duplicate member family (5 members, 17 shared lines) · ×1
  • Near-duplicate member family (5 members, 17 shared lines) sui-execution/historical-versions/v0/sui-verifier/src/private_generics.rs:68 — sui-execution/historical-versions/v0/sui-verifier/src/private_generics.rs:68-93 | sui-execution/historical-versions/v1/sui-verifier/src/private_generics.rs:70-95 | sui-execution/historical-versions/v2/sui-verifier/src/private_generics.rs:82-107 | sui-execution/historical-versions/v3/sui-verifier/src/private_generics.rs:85-112 | sui-execution/latest/sui-verifier/src/private_generics.rs:85-112 — These 5 members are variants of one another: a block of 17 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them 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 · Near-duplicate member family (5 members, 10 shared lines) · ×1
  • Near-duplicate member family (5 members, 10 shared lines) sui-execution/historical-versions/v0/sui-verifier/src/entry_points_verifier.rs:176 — sui-execution/historical-versions/v0/sui-verifier/src/entry_points_verifier.rs:176-195 | sui-execution/historical-versions/v1/sui-verifier/src/entry_points_verifier.rs:171-190 | sui-execution/historical-versions/v2/sui-verifier/src/entry_points_verifier.rs:176-195 | sui-execution/historical-versions/v3/sui-verifier/src/entry_points_verifier.rs:176-195 | sui-execution/latest/sui-verifier/src/entry_points_verifier.rs:176-195 — These 5 members are variants of one another: a block of 10 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them 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 · Near-duplicate member family (4 members, 71 shared lines) · ×1
  • Near-duplicate member family (4 members, 71 shared lines) REDACTED:1248 — REDACTED:1248-1348 | REDACTED:1169-1271 | REDACTED:1181-1283 | REDACTED:1457-1550 — These 4 members are variants of one another: a block of 71 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Near-duplicate member family (4 members, 48 shared lines) · ×1
  • Near-duplicate member family (4 members, 48 shared lines) sui-execution/historical-versions/v1/sui-move-natives/src/crypto/zklogin.rs:46 — sui-execution/historical-versions/v1/sui-move-natives/src/crypto/zklogin.rs:46-102 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/zklogin.rs:46-102 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/zklogin.rs:46-100 | sui-execution/latest/sui-move-natives/src/crypto/zklogin.rs:49-103 — These 4 members are variants of one another: a block of 48 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Near-duplicate member family (4 members, 40 shared lines) · ×1
  • Near-duplicate member family (4 members, 40 shared lines) REDACTED:348 — REDACTED:348-406 | REDACTED:352-410 | REDACTED:358-416 | REDACTED:527-590 — These 4 members are variants of one another: a block of 40 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Near-duplicate member family (4 members, 34 shared lines) · ×1
  • Near-duplicate member family (4 members, 34 shared lines) sui-execution/historical-versions/v0/sui-move-natives/src/dynamic_field.rs:264 — sui-execution/historical-versions/v0/sui-move-natives/src/dynamic_field.rs:264-318 | sui-execution/historical-versions/v1/sui-move-natives/src/dynamic_field.rs:263-317 | sui-execution/historical-versions/v2/sui-move-natives/src/dynamic_field.rs:263-317 | sui-execution/historical-versions/v3/sui-move-natives/src/dynamic_field.rs:277-348 — These 4 members are variants of one another: a block of 34 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Near-duplicate member family (4 members, 31 shared lines) · ×1
  • Near-duplicate member family (4 members, 31 shared lines) sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/context.rs:894 — sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/context.rs:894-929 | sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:827-862 | sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs:884-919 | sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/context.rs:1147-1186 — These 4 members are variants of one another: a block of 31 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Near-duplicate member family (4 members, 28 shared lines) · ×1
  • Near-duplicate member family (4 members, 28 shared lines) sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/mod.rs:461 — sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/mod.rs:461-493 | sui-execution/historical-versions/v2/sui-move-natives/src/object_runtime/mod.rs:423-455 | sui-execution/historical-versions/v3/sui-move-natives/src/object_runtime/mod.rs:596-629 | sui-execution/latest/sui-move-natives/src/object_runtime/mod.rs:799-832 — These 4 members are variants of one another: a block of 28 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Near-duplicate member family (4 members, 22 shared lines) · ×1
  • Near-duplicate member family (4 members, 22 shared lines) sui-execution/historical-versions/v0/sui-adapter/src/gas_meter.rs:24 — sui-execution/historical-versions/v0/sui-adapter/src/gas_meter.rs:24-67 | sui-execution/historical-versions/v1/sui-adapter/src/gas_meter.rs:24-67 | sui-execution/historical-versions/v2/sui-adapter/src/gas_meter.rs:24-67 | sui-execution/historical-versions/v3/sui-adapter/src/gas_meter.rs:26-69 — These 4 members are variants of one another: a block of 22 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Near-duplicate member family (4 members, 20 shared lines) · ×1
  • Near-duplicate member family (4 members, 20 shared lines) REDACTED:1451 — REDACTED:1451-1500 | REDACTED:1408-1457 | REDACTED:1420-1469 | REDACTED:1836-1885 — These 4 members are variants of one another: a block of 20 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Near-duplicate member family (4 members, 12 shared lines) · ×1
  • Near-duplicate member family (4 members, 12 shared lines) sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/linkage_view.rs:288 — sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/linkage_view.rs:288-325 | sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/linkage_view.rs:230-262 | sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/linkage_view.rs:230-262 | sui-execution/historical-versions/v3/sui-adapter/src/data_store/legacy/linkage_view.rs:252-287 — These 4 members are variants of one another: a block of 12 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Near-duplicate member family (4 members, 9 shared lines) · ×1
  • Near-duplicate member family (4 members, 9 shared lines) sui-execution/historical-versions/v1/sui-move-natives/src/crypto/zklogin.rs:111 — sui-execution/historical-versions/v1/sui-move-natives/src/crypto/zklogin.rs:111-124 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/zklogin.rs:111-124 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/zklogin.rs:109-122 | sui-execution/latest/sui-move-natives/src/crypto/zklogin.rs:112-125 — These 4 members are variants of one another: a block of 9 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Near-duplicate member family (3 members, 75 shared lines) · ×1
  • Near-duplicate member family (3 members, 75 shared lines) sui-execution/historical-versions/v0/sui-adapter/src/execution_engine.rs:355 — sui-execution/historical-versions/v0/sui-adapter/src/execution_engine.rs:355-465 | sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs:458-669 | sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs:478-696 — These 3 members are variants of one another: a block of 75 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 3 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 3 times.
D4 · Code Duplication · Near-duplicate member family (3 members, 51 shared lines) · ×1
  • Near-duplicate member family (3 members, 51 shared lines) sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs:305 — sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs:305-366 | sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs:325-386 | sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.rs:402-463 — These 3 members are variants of one another: a block of 51 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 3 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 3 times.
D4 · Code Duplication · Near-duplicate member family (3 members, 50 shared lines) · ×1
  • Near-duplicate member family (3 members, 50 shared lines) sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:971 — sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:971-1030 | sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs:1028-1087 | sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/context.rs:1617-1680 — These 3 members are variants of one another: a block of 50 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 3 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 3 times.
D4 · Code Duplication · Near-duplicate member family (3 members, 47 shared lines) · ×1
  • Near-duplicate member family (3 members, 47 shared lines) sui-execution/historical-versions/v2/sui-move-natives/src/crypto/poseidon.rs:49 — sui-execution/historical-versions/v2/sui-move-natives/src/crypto/poseidon.rs:49-112 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/poseidon.rs:50-115 | sui-execution/latest/sui-move-natives/src/crypto/poseidon.rs:51-116 — These 3 members are variants of one another: a block of 47 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 3 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 3 times.
D4 · Code Duplication · Near-duplicate member family (3 members, 41 shared lines) · ×1
  • Near-duplicate member family (3 members, 41 shared lines) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ed25519.rs:44 — sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ed25519.rs:44-92 | sui-execution/historical-versions/v1/sui-move-natives/src/crypto/ed25519.rs:44-92 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/ed25519.rs:44-92 — These 3 members are variants of one another: a block of 41 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 3 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 3 times.
D4 · Code Duplication · Near-duplicate member pair (152 shared lines) · ×1
  • Near-duplicate member pair (152 shared lines) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/type_check.rs:136 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/type_check.rs:136-299 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/type_check.rs:158-321 — These two members are variants of one another: 152 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 · Near-duplicate member pair (147 shared lines) · ×1
  • Near-duplicate member pair (147 shared lines) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/interpreter.rs:151 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/interpreter.rs:151-401 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/interpreter.rs:162-424 — These two members are variants of one another: 147 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 · Near-duplicate member pair (125 shared lines) · ×1
  • Near-duplicate member pair (125 shared lines) sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.rs:557 — sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.rs:557-820 | sui-execution/latest/sui-adapter/src/execution_engine.rs:1583-1854 — These two members are variants of one another: 125 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 · Near-duplicate member pair (101 shared lines) · ×1
  • Near-duplicate member pair (101 shared lines) crates/sui-rosetta/src/types/internal_operation/pay_sui.rs:38 — crates/sui-rosetta/src/types/internal_operation/pay_sui.rs:38-181 | crates/sui-rosetta/src/types/internal_operation/stake.rs:44-203 — These two members are variants of one another: 101 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 · Near-duplicate member pair (84 shared lines) · ×1
  • Near-duplicate member pair (84 shared lines) sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs:249 — sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs:249-335 | sui-execution/historical-versions/v2/sui-adapter/src/temporary_store.rs:267-353 — These two members are variants of one another: 84 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 · Near-duplicate member pair (67 shared lines) · ×1
  • Near-duplicate member pair (67 shared lines) consensus/core/src/authority_service.rs:154 — consensus/core/src/authority_service.rs:154-342 | consensus/core/src/observer_service.rs:88-226 — These two members are variants of one another: 67 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (51 shared lines) · ×1
  • Near-duplicate member pair (51 shared lines) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/context.rs:308 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/context.rs:308-452 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/context.rs:489-697 — These two members are variants of one another: 51 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 · Near-duplicate member pair (49 shared lines) · ×1
  • Near-duplicate member pair (49 shared lines) crates/sui-data-store/src/gql_queries.rs:139 — crates/sui-data-store/src/gql_queries.rs:139-200 | crates/sui-fork/src/gql/queries.rs:85-171 — These two members are variants of one another: 49 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 · Near-duplicate member pair (48 shared lines) · ×1
  • Near-duplicate member pair (48 shared lines) sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/context.rs:1432 — sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/context.rs:1432-1610 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/context.rs:2310-2487 — These two members are variants of one another: 48 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 · Near-duplicate member pair (46 shared lines) · ×1
  • Near-duplicate member pair (46 shared lines) crates/sui-bridge/src/server/mod.rs:531 — crates/sui-bridge/src/server/mod.rs:531-600 | crates/sui-bridge/src/server/mod.rs:618-699 — These two members are variants of one another: 46 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 · Near-duplicate member pair (44 shared lines) · ×1
  • Near-duplicate member pair (44 shared lines) crates/sui-json-rpc-types/src/sui_transaction.rs:310 — crates/sui-json-rpc-types/src/sui_transaction.rs:310-388 | crates/sui/src/displays/dry_run_tx_block.rs:16-113 — These two members are variants of one another: 44 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 · Near-duplicate member pair (42 shared lines) · ×1
  • Near-duplicate member pair (42 shared lines) crates/sui-data-store/src/stores/in_memory.rs:243 — crates/sui-data-store/src/stores/in_memory.rs:243-313 | crates/sui-data-store/src/stores/in_memory_lru.rs:182-245 — These two members are variants of one another: 42 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 · Near-duplicate member pair (37 shared lines) · ×1
  • Near-duplicate member pair (37 shared lines) crates/sui-rpc-api/src/grpc/v2/state_service/list_dynamic_fields.rs:34 — crates/sui-rpc-api/src/grpc/v2/state_service/list_dynamic_fields.rs:34-130 | crates/sui-rpc-api/src/grpc/v2/state_service/list_owned_objects.rs:30-143 — These two members are variants of one another: 37 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 · Near-duplicate member pair (33 shared lines) · ×1
  • Near-duplicate member pair (33 shared lines) crates/sui-rpc-api/src/grpc/v2/ledger_service/list_checkpoints.rs:85 — crates/sui-rpc-api/src/grpc/v2/ledger_service/list_checkpoints.rs:85-219 | crates/sui-rpc-api/src/grpc/v2/ledger_service/list_transactions.rs:82-218 — These two members are variants of one another: 33 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 · Near-duplicate member pair (30 shared lines) · ×1
  • Near-duplicate member pair (30 shared lines) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/memory_safety.rs:534 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/memory_safety.rs:534-593 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/verify/memory_safety.rs:587-660 — These two members are variants of one another: 30 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 (137 corresponding lines) · ×1
  • Edited copy of a member (137 corresponding lines) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/translate.rs:374 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/translate.rs:374-510 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/translate.rs:391-527 — These two members are one piece of code written twice and then edited apart: 137 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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) · ×1
  • Edited copy of a member (53 corresponding lines) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/defining_ids_in_types.rs:11 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/defining_ids_in_types.rs:11-63 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/defining_ids_in_types.rs:14-66 — 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 (51 corresponding lines) · ×1
  • Edited copy of a member (51 corresponding lines) sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs:575 — sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs:575-625 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs:725-775 — 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 (47 corresponding lines) · ×1
  • Edited copy of a member (47 corresponding lines) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/drop_safety.rs:345 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/drop_safety.rs:345-391 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/verify/drop_safety.rs:348-394 — 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 (40 corresponding lines) · ×1
  • Edited copy of a member (40 corresponding lines) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/context.rs:174 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/context.rs:174-213 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/context.rs:283-322 — These two members are one piece of code written twice and then edited apart: 40 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (83 corresponding lines) · ×1
  • Edited copy of a member (83 corresponding lines) sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs:210 — sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs:210-292 | sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs:230-312 — These two members are one piece of code written twice and then edited apart: 83 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (39 corresponding lines) · ×1
  • Edited copy of a member (39 corresponding lines) crates/simulacrum/src/lib.rs:677 — crates/simulacrum/src/lib.rs:677-723 | crates/sui-indexer-alt-e2e-tests/src/lib.rs:862-905 — 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 (15 corresponding lines) · ×1
  • Edited copy of a member (15 corresponding lines) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/loading/ast.rs:312 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/loading/ast.rs:312-326 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/loading/ast.rs:408-422 — 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 (26 corresponding lines) · ×1
  • Edited copy of a member (26 corresponding lines) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/values.rs:392 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/values.rs:392-417 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/values.rs:445-470 — 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 (32 corresponding lines) · ×1
  • Edited copy of a member (32 corresponding lines) sui-execution/historical-versions/v2/sui-adapter/src/temporary_store.rs:71 — sui-execution/historical-versions/v2/sui-adapter/src/temporary_store.rs:71-105 | sui-execution/historical-versions/v3/sui-adapter/src/temporary_store.rs:99-141 — 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 (25 corresponding lines) · ×1
  • Edited copy of a member (25 corresponding lines) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/translate.rs:152 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/translate.rs:152-178 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/translate.rs:163-193 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (20 corresponding lines) · ×1
  • Edited copy of a member (20 corresponding lines) consensus/core/src/network/observer.rs:558 — consensus/core/src/network/observer.rs:558-586 | consensus/core/src/network/tonic_network.rs:734-760 — 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 · Members sharing a duplicated core (11 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (11 members, 50+ identical tokens) crates/sui-config/src/node.rs:722 — crates/sui-config/src/node.rs:722-732 | crates/sui-config/src/node.rs:734-744 | crates/sui-config/src/node.rs:746-756 | crates/sui-config/src/node.rs:758-769 | crates/sui-config/src/node.rs:771-782 | crates/sui-config/src/node.rs:784-795 | crates/sui-config/src/node.rs:797-807 | crates/sui-config/src/node.rs:809-819 | crates/sui-config/src/node.rs:821-832 | crates/sui-config/src/node.rs:834-845 | crates/sui-config/src/node.rs:847-858 — These 11 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 11 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 11 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) sui-execution/historical-versions/v0/sui-verifier/src/private_generics.rs:99 — sui-execution/historical-versions/v0/sui-verifier/src/private_generics.rs:99-134 | sui-execution/historical-versions/v0/sui-verifier/src/private_generics.rs:140-164 | sui-execution/historical-versions/v1/sui-verifier/src/private_generics.rs:101-136 | sui-execution/historical-versions/v1/sui-verifier/src/private_generics.rs:142-166 | sui-execution/historical-versions/v2/sui-verifier/src/private_generics.rs:114-155 | sui-execution/historical-versions/v2/sui-verifier/src/private_generics.rs:161-185 | sui-execution/historical-versions/v3/sui-verifier/src/private_generics.rs:119-160 | sui-execution/historical-versions/v3/sui-verifier/src/private_generics.rs:166-212 | sui-execution/latest/sui-verifier/src/private_generics.rs:119-160 | sui-execution/latest/sui-verifier/src/private_generics.rs:166-212 — 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 · Members sharing a duplicated core (8 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (8 members, 50+ identical tokens) crates/sui-benchmark/src/workloads/adversarial.rs:421 — crates/sui-benchmark/src/workloads/adversarial.rs:421-447 | crates/sui-benchmark/src/workloads/batch_payment.rs:140-166 | crates/sui-benchmark/src/workloads/delegation.rs:104-127 | crates/sui-benchmark/src/workloads/expected_failure.rs:117-144 | crates/sui-benchmark/src/workloads/party.rs:196-220 | crates/sui-benchmark/src/workloads/randomness.rs:116-142 | crates/sui-benchmark/src/workloads/slow.rs:163-187 | crates/sui-benchmark/src/workloads/transfer_object.rs:111-137 — These 8 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 8 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 8 times.
D4 · Code Duplication · Duplicated block (174 lines × 5) · ×1
  • Duplicated block (174 lines × 5) sui-execution/historical-versions/v0/sui-move-natives/src/lib.rs:294 — sui-execution/historical-versions/v0/sui-move-natives/src/lib.rs:294-467 | sui-execution/historical-versions/v1/sui-move-natives/src/lib.rs:312-485 | sui-execution/historical-versions/v2/sui-move-natives/src/lib.rs:322-495 | sui-execution/historical-versions/v3/sui-move-natives/src/lib.rs:453-626 | sui-execution/latest/sui-move-natives/src/lib.rs:519-692 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/lib.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/lib.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 317 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (126 lines × 2) · ×1
  • Duplicated block (126 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/type_check.rs:165 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/type_check.rs:165-290 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/type_check.rs:187-312 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/type_check.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/type_check.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 289 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (110 lines × 3) · ×1
  • Duplicated block (110 lines × 3) sui-execution/historical-versions/v2/sui-move-natives/src/lib.rs:499 — sui-execution/historical-versions/v2/sui-move-natives/src/lib.rs:499-608 | sui-execution/historical-versions/v3/sui-move-natives/src/lib.rs:630-739 | sui-execution/latest/sui-move-natives/src/lib.rs:704-813 — before extracting anything, compare `sui-execution/historical-versions/v2/sui-move-natives/src/lib.rs` and `sui-execution/historical-versions/v3/sui-move-natives/src/lib.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 436 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (104 lines × 5) · ×1
  • Duplicated block (104 lines × 5) sui-execution/historical-versions/v0/sui-verifier/src/id_leak_verifier.rs:391 — sui-execution/historical-versions/v0/sui-verifier/src/id_leak_verifier.rs:391-494 | sui-execution/historical-versions/v1/sui-verifier/src/id_leak_verifier.rs:365-468 | sui-execution/historical-versions/v2/sui-verifier/src/id_leak_verifier.rs:380-483 | sui-execution/historical-versions/v3/sui-verifier/src/id_leak_verifier.rs:409-512 | sui-execution/latest/sui-verifier/src/id_leak_verifier.rs:415-518 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-verifier/src/id_leak_verifier.rs` and `sui-execution/historical-versions/v1/sui-verifier/src/id_leak_verifier.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 350 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (86–87 lines × 5) · ×1
  • Duplicated block (86–87 lines × 5) sui-execution/historical-versions/v0/sui-verifier/src/global_storage_access_verifier.rs:15 — sui-execution/historical-versions/v0/sui-verifier/src/global_storage_access_verifier.rs:15-100 | sui-execution/historical-versions/v1/sui-verifier/src/global_storage_access_verifier.rs:15-100 | sui-execution/historical-versions/v2/sui-verifier/src/global_storage_access_verifier.rs:15-101 | sui-execution/historical-versions/v3/sui-verifier/src/global_storage_access_verifier.rs:15-101 | sui-execution/latest/sui-verifier/src/global_storage_access_verifier.rs:15-101 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-verifier/src/global_storage_access_verifier.rs` and `sui-execution/historical-versions/v1/sui-verifier/src/global_storage_access_verifier.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 127 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (84 lines × 2) · ×1
  • Duplicated block (84 lines × 2) sui-execution/historical-versions/v3/sui-move-natives/src/object_runtime/mod.rs:841 — sui-execution/historical-versions/v3/sui-move-natives/src/object_runtime/mod.rs:841-924 | sui-execution/latest/sui-move-natives/src/object_runtime/mod.rs:988-1071 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-move-natives/src/object_runtime/mod.rs` and `sui-execution/latest/sui-move-natives/src/object_runtime/mod.rs` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 491 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (81 lines × 2) · ×1
  • Duplicated block (81 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/context.rs:1115 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/context.rs:1115-1195 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/context.rs:1497-1577 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/context.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/context.rs` as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 625 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (80 lines × 2) · ×1
  • Duplicated block (80 lines × 2) crates/sui-types/src/sui_system_state/sui_system_state_inner_v1.rs:690 — crates/sui-types/src/sui_system_state/sui_system_state_inner_v1.rs:690-769 | crates/sui-types/src/sui_system_state/sui_system_state_inner_v2.rs:250-329 — before extracting anything, compare `crates/sui-types/src/sui_system_state/sui_system_state_inner_v1.rs` and `crates/sui-types/src/sui_system_state/sui_system_state_inner_v2.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 184 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (76 lines × 2) · ×1
  • Duplicated block (76 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/translate.rs:75 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/translate.rs:75-150 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/translate.rs:86-161 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/translate.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/translate.rs` as WHOLE FILES: this scan already matched 40 separate duplicated blocks between them, totalling at least 589 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (71 lines × 5) · ×1
  • Duplicated block (71 lines × 5) sui-execution/historical-versions/v0/sui-move-natives/src/lib.rs:145 — sui-execution/historical-versions/v0/sui-move-natives/src/lib.rs:145-215 | sui-execution/historical-versions/v1/sui-move-natives/src/lib.rs:163-233 | sui-execution/historical-versions/v2/sui-move-natives/src/lib.rs:173-243 | sui-execution/historical-versions/v3/sui-move-natives/src/lib.rs:224-294 | sui-execution/latest/sui-move-natives/src/lib.rs:273-343 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/lib.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/lib.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 317 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (68 lines × 3) · ×1
  • Duplicated block (68 lines × 3) REDACTED:248 — REDACTED:248-315 | REDACTED:252-319 | REDACTED:258-325 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 54 separate duplicated blocks between them, totalling at least 1035 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (63 lines × 3) · ×1
  • Duplicated block (63 lines × 3) sui-execution/historical-versions/v0/sui-move-natives/src/object_runtime/object_store.rs:88 — sui-execution/historical-versions/v0/sui-move-natives/src/object_runtime/object_store.rs:88-150 | sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/object_store.rs:152-214 | sui-execution/historical-versions/v2/sui-move-natives/src/object_runtime/object_store.rs:155-217 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/object_runtime/object_store.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/object_store.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 237 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (59 lines × 5) · ×1
  • Duplicated block (59 lines × 5) sui-execution/historical-versions/v0/sui-verifier/src/one_time_witness_verifier.rs:45 — sui-execution/historical-versions/v0/sui-verifier/src/one_time_witness_verifier.rs:45-103 | sui-execution/historical-versions/v1/sui-verifier/src/one_time_witness_verifier.rs:55-113 | sui-execution/historical-versions/v2/sui-verifier/src/one_time_witness_verifier.rs:55-113 | sui-execution/historical-versions/v3/sui-verifier/src/one_time_witness_verifier.rs:55-113 | sui-execution/latest/sui-verifier/src/one_time_witness_verifier.rs:55-113 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-verifier/src/one_time_witness_verifier.rs` and `sui-execution/historical-versions/v1/sui-verifier/src/one_time_witness_verifier.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 138 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (57 lines × 4) · ×1
  • Duplicated block (57 lines × 4) sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs:951 — sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs:951-1007 | sui-execution/historical-versions/v2/sui-adapter/src/temporary_store.rs:1003-1059 | sui-execution/historical-versions/v3/sui-adapter/src/temporary_store.rs:986-1042 | sui-execution/latest/sui-adapter/src/temporary_store/invariants.rs:226-282 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs` and `sui-execution/historical-versions/v2/sui-adapter/src/temporary_store.rs` as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 779 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (56 lines × 5) · ×1
  • Duplicated block (56 lines × 5) REDACTED:1580 — REDACTED:1580-1635 | REDACTED:1537-1592 | REDACTED:1549-1604 | REDACTED:2033-2088 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/context.rs:2168-2223 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 54 separate duplicated blocks between them, totalling at least 1035 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (55 lines × 4) · ×1
  • Duplicated block (55 lines × 4) REDACTED:1027 — REDACTED:1027-1081 | REDACTED:947-1001 | REDACTED:959-1013 | REDACTED:1192-1246 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 54 separate duplicated blocks between them, totalling at least 1035 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (53–55 lines × 3) · ×1
  • Duplicated block (53–55 lines × 3) crates/sui-rosetta/src/types/internal_operation/pay_coin.rs:332 — crates/sui-rosetta/src/types/internal_operation/pay_coin.rs:332-384 | crates/sui-rosetta/src/types/internal_operation/pay_sui.rs:195-249 | crates/sui-rosetta/src/types/internal_operation/stake.rs:218-272 — before extracting anything, compare `crates/sui-rosetta/src/types/internal_operation/pay_coin.rs` and `crates/sui-rosetta/src/types/internal_operation/pay_sui.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 117 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (55 lines × 2) · ×1
  • Duplicated block (55 lines × 2) sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs:184 — sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs:184-238 | sui-execution/historical-versions/v2/sui-adapter/src/temporary_store.rs:202-256 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs` and `sui-execution/historical-versions/v2/sui-adapter/src/temporary_store.rs` as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 779 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (52 lines × 5) · ×1
  • Duplicated block (52 lines × 5) sui-execution/historical-versions/v0/sui-verifier/src/entry_points_verifier.rs:120 — sui-execution/historical-versions/v0/sui-verifier/src/entry_points_verifier.rs:120-171 | sui-execution/historical-versions/v1/sui-verifier/src/entry_points_verifier.rs:115-166 | sui-execution/historical-versions/v2/sui-verifier/src/entry_points_verifier.rs:119-170 | sui-execution/historical-versions/v3/sui-verifier/src/entry_points_verifier.rs:119-170 | sui-execution/latest/sui-verifier/src/entry_points_verifier.rs:119-170 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-verifier/src/entry_points_verifier.rs` and `sui-execution/historical-versions/v1/sui-verifier/src/entry_points_verifier.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 130 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (51 lines × 3) · ×1
  • Duplicated block (51 lines × 3) sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs:306 — sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs:306-356 | sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs:326-376 | sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.rs:403-453 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs` and `sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs` as WHOLE FILES: this scan already matched 39 separate duplicated blocks between them, totalling at least 959 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (51 lines × 2) · ×1
  • Duplicated block (51 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/interpreter.rs:232 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/interpreter.rs:232-282 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/interpreter.rs:266-316 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/interpreter.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/interpreter.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 170 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (28–50 lines × 5) · ×1
  • Duplicated block (28–50 lines × 5) crates/sui-types/src/gas_model/tables.rs:363 — crates/sui-types/src/gas_model/tables.rs:363-406 | crates/sui-types/src/gas_model/tables.rs:409-458 | crates/sui-types/src/gas_model/tables.rs:461-507 | crates/sui-types/src/gas_model/tables.rs:510-537 | crates/sui-types/src/gas_model/tables.rs:540-569 — 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.
D4 · Code Duplication · Duplicated block (47 lines × 3) · ×1
  • Duplicated block (47 lines × 3) REDACTED:139 — REDACTED:139-185 | REDACTED:142-188 | REDACTED:148-194 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 54 separate duplicated blocks between them, totalling at least 1035 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (47 lines × 2) · ×1
  • Duplicated block (47 lines × 2) consensus/core/src/network/metrics.rs:140 — consensus/core/src/network/metrics.rs:140-186 | crates/mysten-network/src/metrics.rs:168-214 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication · Duplicated block (41–47 lines × 2) · ×1
  • Duplicated block (41–47 lines × 2) crates/sui-indexer-alt-consistent-store/src/handlers/mod.rs:26 — crates/sui-indexer-alt-consistent-store/src/handlers/mod.rs:26-72 | crates/sui-rpc-store/src/indexer/mod.rs:117-157 — before extracting anything, compare `crates/sui-indexer-alt-consistent-store/src/handlers/mod.rs` and `crates/sui-rpc-store/src/indexer/mod.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 80 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (45 lines × 4) · ×1
  • Duplicated block (45 lines × 4) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/groth16.rs:189 — sui-execution/historical-versions/v0/sui-move-natives/src/crypto/groth16.rs:189-233 | sui-execution/historical-versions/v1/sui-move-natives/src/crypto/groth16.rs:189-233 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/groth16.rs:189-233 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/groth16.rs:197-241 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/crypto/groth16.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/crypto/groth16.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 227 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (45 lines × 3) · ×1
  • Duplicated block (45 lines × 3) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs:591 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs:591-635 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs:755-799 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs:1541-1585 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/memory_safety.rs` as WHOLE FILES: this scan already matched 35 separate duplicated blocks between them, totalling at least 484 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (44 lines × 3) · ×1
  • Duplicated block (44 lines × 3) sui-execution/historical-versions/v0/sui-move-natives/src/event.rs:36 — sui-execution/historical-versions/v0/sui-move-natives/src/event.rs:36-79 | sui-execution/historical-versions/v1/sui-move-natives/src/event.rs:36-79 | sui-execution/historical-versions/v2/sui-move-natives/src/event.rs:36-79 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/event.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/event.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 70 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (44 lines × 2) · ×1
  • Duplicated block (44 lines × 2) sui-execution/historical-versions/v3/sui-move-natives/src/object_runtime/object_store.rs:567 — sui-execution/historical-versions/v3/sui-move-natives/src/object_runtime/object_store.rs:567-610 | sui-execution/latest/sui-move-natives/src/object_runtime/object_store.rs:569-612 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-move-natives/src/object_runtime/object_store.rs` and `sui-execution/latest/sui-move-natives/src/object_runtime/object_store.rs` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 521 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (43 lines × 4) · ×1
  • Duplicated block (43 lines × 4) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecvrf.rs:58 — sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecvrf.rs:58-100 | sui-execution/historical-versions/v1/sui-move-natives/src/crypto/ecvrf.rs:58-100 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/ecvrf.rs:58-100 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/ecvrf.rs:56-98 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times.
D4 · Code Duplication · Duplicated block (42–43 lines × 2) · ×1
  • Duplicated block (42–43 lines × 2) sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs:82 — sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs:82-123 | sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs:93-135 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs` and `sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs` as WHOLE FILES: this scan already matched 39 separate duplicated blocks between them, totalling at least 959 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (42 lines × 5) · ×1
  • Duplicated block (42 lines × 5) sui-execution/historical-versions/v0/sui-verifier/src/id_leak_verifier.rs:509 — sui-execution/historical-versions/v0/sui-verifier/src/id_leak_verifier.rs:509-550 | sui-execution/historical-versions/v1/sui-verifier/src/id_leak_verifier.rs:483-524 | sui-execution/historical-versions/v2/sui-verifier/src/id_leak_verifier.rs:498-539 | sui-execution/historical-versions/v3/sui-verifier/src/id_leak_verifier.rs:527-568 | sui-execution/latest/sui-verifier/src/id_leak_verifier.rs:533-574 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-verifier/src/id_leak_verifier.rs` and `sui-execution/historical-versions/v1/sui-verifier/src/id_leak_verifier.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 350 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (42 lines × 3) · ×1
  • Duplicated block (42 lines × 3) REDACTED:187 — REDACTED:187-228 | REDACTED:191-232 | REDACTED:197-238 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 54 separate duplicated blocks between them, totalling at least 1035 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (41 lines × 3) · ×1
  • Duplicated block (41 lines × 3) sui-execution/src/v0.rs:147 — sui-execution/src/v0.rs:147-187 | sui-execution/src/v1.rs:147-187 | sui-execution/src/v2.rs:147-187 — before extracting anything, compare `sui-execution/src/v0.rs` and `sui-execution/src/v1.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 132 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (40 lines × 5) · ×1
  • Duplicated block (40 lines × 5) sui-execution/historical-versions/v0/sui-move-natives/src/lib.rs:240 — sui-execution/historical-versions/v0/sui-move-natives/src/lib.rs:240-279 | sui-execution/historical-versions/v1/sui-move-natives/src/lib.rs:258-297 | sui-execution/historical-versions/v2/sui-move-natives/src/lib.rs:268-307 | sui-execution/historical-versions/v3/sui-move-natives/src/lib.rs:322-361 | sui-execution/latest/sui-move-natives/src/lib.rs:416-455 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/lib.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/lib.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 317 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (40 lines × 4) · ×1
  • Duplicated block (40 lines × 4) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/hmac.rs:49 — sui-execution/historical-versions/v0/sui-move-natives/src/crypto/hmac.rs:49-88 | sui-execution/historical-versions/v1/sui-move-natives/src/crypto/hmac.rs:49-88 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/hmac.rs:49-88 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/hmac.rs:47-86 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times.
D4 · Code Duplication · Duplicated block (40 lines × 3) · ×1
  • Duplicated block (40 lines × 3) sui-execution/historical-versions/v0/sui-move-natives/src/object_runtime/object_store.rs:188 — sui-execution/historical-versions/v0/sui-move-natives/src/object_runtime/object_store.rs:188-227 | sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/object_store.rs:257-296 | sui-execution/historical-versions/v2/sui-move-natives/src/object_runtime/object_store.rs:260-299 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/object_runtime/object_store.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/object_store.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 237 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (39 lines × 3) · ×1
  • Duplicated block (39 lines × 3) sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs:576 — sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs:576-614 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs:726-764 | sui-execution/latest/sui-move-natives/src/crypto/group_ops.rs:729-767 — before extracting anything, compare `sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs` and `sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 256 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (38–39 lines × 3) · ×1
  • Duplicated block (38–39 lines × 3) sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs:655 — sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs:655-692 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs:803-841 | sui-execution/latest/sui-move-natives/src/crypto/group_ops.rs:805-843 — before extracting anything, compare `sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs` and `sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 256 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (38 lines × 4) · ×1
  • Duplicated block (38 lines × 4) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/groth16.rs:51 — sui-execution/historical-versions/v0/sui-move-natives/src/crypto/groth16.rs:51-88 | sui-execution/historical-versions/v1/sui-move-natives/src/crypto/groth16.rs:51-88 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/groth16.rs:51-88 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/groth16.rs:51-88 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/crypto/groth16.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/crypto/groth16.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 227 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (37–38 lines × 4) · ×1
  • Duplicated block (37–38 lines × 4) sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/object_store.rs:100 — sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/object_store.rs:100-137 | sui-execution/historical-versions/v2/sui-move-natives/src/object_runtime/object_store.rs:103-140 | sui-execution/historical-versions/v3/sui-move-natives/src/object_runtime/object_store.rs:215-251 | sui-execution/latest/sui-move-natives/src/object_runtime/object_store.rs:197-233 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/object_store.rs` and `sui-execution/historical-versions/v2/sui-move-natives/src/object_runtime/object_store.rs` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 415 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (33–38 lines × 3) · ×1
  • Duplicated block (33–38 lines × 3) sui-execution/historical-versions/v0/sui-adapter/src/execution_engine.rs:99 — sui-execution/historical-versions/v0/sui-adapter/src/execution_engine.rs:99-131 | sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs:111-143 | sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs:123-160 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/execution_engine.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 531 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (37 lines × 4) · ×1
  • Duplicated block (37 lines × 4) sui-execution/historical-versions/v1/sui-move-natives/src/crypto/zklogin.rs:51 — sui-execution/historical-versions/v1/sui-move-natives/src/crypto/zklogin.rs:51-87 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/zklogin.rs:51-87 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/zklogin.rs:49-85 | sui-execution/latest/sui-move-natives/src/crypto/zklogin.rs:52-88 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-move-natives/src/crypto/zklogin.rs` and `sui-execution/historical-versions/v2/sui-move-natives/src/crypto/zklogin.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 95 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (33 lines × 5) · ×1
  • Duplicated block (33 lines × 5) sui-execution/historical-versions/v0/sui-adapter/src/execution_engine.rs:518 — sui-execution/historical-versions/v0/sui-adapter/src/execution_engine.rs:518-550 | sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs:722-754 | sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs:749-781 | sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.rs:873-905 | sui-execution/latest/sui-adapter/src/execution_engine.rs:1907-1939 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/execution_engine.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 531 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (28–33 lines × 4) · ×1
  • Duplicated block (28–33 lines × 4) sui-execution/historical-versions/v0/sui-adapter/src/execution_engine.rs:104 — sui-execution/historical-versions/v0/sui-adapter/src/execution_engine.rs:104-131 | sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs:116-143 | sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs:128-159 | sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.rs:177-209 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/execution_engine.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 531 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (31–33 lines × 4) · ×1
  • Duplicated block (31–33 lines × 4) sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/context.rs:897 — sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/context.rs:897-927 | sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:830-860 | sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs:887-917 | sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/context.rs:1150-1182 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/context.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 378 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (33 lines × 4) · ×1
  • Duplicated block (33 lines × 4) sui-execution/historical-versions/v0/sui-adapter/src/temporary_store.rs:798 — sui-execution/historical-versions/v0/sui-adapter/src/temporary_store.rs:798-830 | sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs:863-895 | sui-execution/historical-versions/v2/sui-adapter/src/temporary_store.rs:915-947 | sui-execution/historical-versions/v3/sui-adapter/src/temporary_store.rs:898-930 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/temporary_store.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 195 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (33 lines × 3) · ×1
  • Duplicated block (33 lines × 3) sui-execution/historical-versions/v0/sui-move-natives/src/object_runtime/object_store.rs:326 — sui-execution/historical-versions/v0/sui-move-natives/src/object_runtime/object_store.rs:326-358 | sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/object_store.rs:465-497 | sui-execution/historical-versions/v2/sui-move-natives/src/object_runtime/object_store.rs:480-512 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/object_runtime/object_store.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/object_store.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 237 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (30–32 lines × 5) · ×1
  • Duplicated block (30–32 lines × 5) sui-execution/historical-versions/v0/sui-move-natives/src/lib.rs:659 — sui-execution/historical-versions/v0/sui-move-natives/src/lib.rs:659-688 | sui-execution/historical-versions/v1/sui-move-natives/src/lib.rs:708-737 | sui-execution/historical-versions/v2/sui-move-natives/src/lib.rs:861-890 | sui-execution/historical-versions/v3/sui-move-natives/src/lib.rs:1312-1341 | sui-execution/latest/sui-move-natives/src/lib.rs:1480-1511 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/lib.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/lib.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 317 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (32 lines × 4) · ×1
  • Duplicated block (32 lines × 4) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/groth16.rs:155 — sui-execution/historical-versions/v0/sui-move-natives/src/crypto/groth16.rs:155-186 | sui-execution/historical-versions/v1/sui-move-natives/src/crypto/groth16.rs:155-186 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/groth16.rs:155-186 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/groth16.rs:155-186 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/crypto/groth16.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/crypto/groth16.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 227 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (32 lines × 3) · ×1
  • Duplicated block (32 lines × 3) sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs:496 — sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs:496-527 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs:650-681 | sui-execution/latest/sui-move-natives/src/crypto/group_ops.rs:653-684 — before extracting anything, compare `sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs` and `sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 256 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (28–32 lines × 2) · ×1
  • Duplicated block (28–32 lines × 2) sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs:771 — sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs:771-798 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/context.rs:2318-2349 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication · Duplicated block (30–31 lines × 4) · ×1
  • Duplicated block (30–31 lines × 4) sui-execution/historical-versions/v0/sui-move-natives/src/dynamic_field.rs:190 — sui-execution/historical-versions/v0/sui-move-natives/src/dynamic_field.rs:190-220 | sui-execution/historical-versions/v1/sui-move-natives/src/dynamic_field.rs:189-219 | sui-execution/historical-versions/v2/sui-move-natives/src/dynamic_field.rs:189-219 | sui-execution/historical-versions/v3/sui-move-natives/src/dynamic_field.rs:202-231 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/dynamic_field.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/dynamic_field.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 384 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (28–31 lines × 2) · ×1
  • Duplicated block (28–31 lines × 2) consensus/core/src/core.rs:105 — consensus/core/src/core.rs:105-135 | consensus/core/src/core.rs:222-249 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (25–31 lines × 2) · ×1
  • Duplicated block (25–31 lines × 2) crates/sui-prompt/src/lib.rs:180 — crates/sui-prompt/src/lib.rs:180-204 | crates/sui-prompt/src/lib.rs:316-346 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (30–31 lines × 2) · ×1
  • Duplicated block (30–31 lines × 2) sui-execution/historical-versions/v3/sui-move-natives/src/transfer.rs:203 — sui-execution/historical-versions/v3/sui-move-natives/src/transfer.rs:203-232 | sui-execution/latest/sui-move-natives/src/transfer.rs:225-255 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-move-natives/src/transfer.rs` and `sui-execution/latest/sui-move-natives/src/transfer.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 122 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (29–30 lines × 2) · ×1
  • Duplicated block (29–30 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/mod.rs:61 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/mod.rs:61-90 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/mod.rs:73-101 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication · Duplicated block (29 lines × 8) · ×1
  • Duplicated block (29 lines × 8) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_k1.rs:241 — sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_k1.rs:241-269 | sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_r1.rs:200-228 | sui-execution/historical-versions/v1/sui-move-natives/src/crypto/ecdsa_k1.rs:241-269 | sui-execution/historical-versions/v1/sui-move-natives/src/crypto/ecdsa_r1.rs:200-228 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/ecdsa_k1.rs:241-269 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/ecdsa_r1.rs:200-228 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/ecdsa_k1.rs:250-278 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/ecdsa_r1.rs:200-228 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_k1.rs` and `sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_r1.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 151 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (29 lines × 5) · ×1
  • Duplicated block (29 lines × 5) sui-execution/historical-versions/v0/sui-move-natives/src/object_runtime/mod.rs:644 — sui-execution/historical-versions/v0/sui-move-natives/src/object_runtime/mod.rs:644-672 | sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/mod.rs:690-718 | sui-execution/historical-versions/v2/sui-move-natives/src/object_runtime/mod.rs:658-686 | sui-execution/historical-versions/v3/sui-move-natives/src/object_runtime/mod.rs:974-1002 | sui-execution/latest/sui-move-natives/src/object_runtime/mod.rs:1119-1147 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/object_runtime/mod.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/mod.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 208 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (28–29 lines × 3) · ×1
  • Duplicated block (28–29 lines × 3) REDACTED:603 — REDACTED:603-631 | REDACTED:587-614 | REDACTED:593-620 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 54 separate duplicated blocks between them, totalling at least 1035 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (27–28 lines × 8) · ×1
  • Duplicated block (27–28 lines × 8) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_k1.rs:90 — sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_k1.rs:90-116 | sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_r1.rs:92-119 | sui-execution/historical-versions/v1/sui-move-natives/src/crypto/ecdsa_k1.rs:90-116 | sui-execution/historical-versions/v1/sui-move-natives/src/crypto/ecdsa_r1.rs:92-119 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/ecdsa_k1.rs:90-116 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/ecdsa_r1.rs:92-119 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/ecdsa_k1.rs:101-127 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/ecdsa_r1.rs:92-119 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_k1.rs` and `sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_r1.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 151 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (20–28 lines × 2) · ×1
  • Duplicated block (20–28 lines × 2) crates/sui-core/src/authority/authority_store_pruner.rs:227 — crates/sui-core/src/authority/authority_store_pruner.rs:227-254 | crates/sui-core/src/authority/authority_store_pruner.rs:286-305 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (27–28 lines × 2) · ×1
  • Duplicated block (27–28 lines × 2) sui-execution/latest/sui-move-natives/src/crypto/ecdsa_k1.rs:103 — sui-execution/latest/sui-move-natives/src/crypto/ecdsa_k1.rs:103-129 | sui-execution/latest/sui-move-natives/src/crypto/ecdsa_r1.rs:94-121 — before extracting anything, compare `sui-execution/latest/sui-move-natives/src/crypto/ecdsa_k1.rs` and `sui-execution/latest/sui-move-natives/src/crypto/ecdsa_r1.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 151 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (21–27 lines × 6) · ×1
  • Duplicated block (21–27 lines × 6) sui-execution/src/v0.rs:92 — sui-execution/src/v0.rs:92-118 | sui-execution/src/v0.rs:215-235 | sui-execution/src/v1.rs:92-118 | sui-execution/src/v1.rs:215-235 | sui-execution/src/v2.rs:92-118 | sui-execution/src/v2.rs:215-235 — before extracting anything, compare `sui-execution/src/v0.rs` and `sui-execution/src/v1.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 132 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (22–27 lines × 3) · ×1
  • Duplicated block (22–27 lines × 3) crates/sui-protocol-config/src/lib.rs:3519 — crates/sui-protocol-config/src/lib.rs:3519-3540 | crates/sui-protocol-config/src/lib.rs:3597-3618 | crates/sui-protocol-config/src/lib.rs:4021-4047 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (24–27 lines × 3) · ×1
  • Duplicated block (24–27 lines × 3) sui-execution/historical-versions/v0/sui-adapter/src/adapter.rs:179 — sui-execution/historical-versions/v0/sui-adapter/src/adapter.rs:179-205 | sui-execution/historical-versions/v1/sui-adapter/src/adapter.rs:180-203 | sui-execution/historical-versions/v2/sui-adapter/src/adapter.rs:178-204 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/adapter.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/adapter.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 100 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (26 lines × 3) · ×1
  • Duplicated block (26 lines × 3) sui-execution/historical-versions/v0/sui-adapter/src/execution_engine.rs:426 — sui-execution/historical-versions/v0/sui-adapter/src/execution_engine.rs:426-451 | sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs:531-556 | sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs:551-576 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/execution_engine.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 531 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (21–26 lines × 2) · ×1
  • Duplicated block (21–26 lines × 2) sui-execution/src/v3.rs:92 — sui-execution/src/v3.rs:92-117 | sui-execution/src/v3.rs:148-168 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (25 lines × 5) · ×1
  • Duplicated block (25 lines × 5) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ed25519.rs:68 — sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ed25519.rs:68-92 | sui-execution/historical-versions/v1/sui-move-natives/src/crypto/ed25519.rs:68-92 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/ed25519.rs:68-92 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/ed25519.rs:66-90 | sui-execution/latest/sui-move-natives/src/crypto/ed25519.rs:68-92 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ed25519.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/crypto/ed25519.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 61 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (4–25 lines × 6) · ×1
  • Duplicated block (4–25 lines × 6) sui-execution/historical-versions/v0/sui-adapter/src/error.rs:34 — sui-execution/historical-versions/v0/sui-adapter/src/error.rs:34-37 | sui-execution/historical-versions/v0/sui-adapter/src/error.rs:56-80 | sui-execution/historical-versions/v1/sui-adapter/src/error.rs:34-37 | sui-execution/historical-versions/v1/sui-adapter/src/error.rs:56-80 | sui-execution/historical-versions/v2/sui-adapter/src/error.rs:34-37 | sui-execution/historical-versions/v2/sui-adapter/src/error.rs:56-80 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/error.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/error.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 75 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (24–25 lines × 3) · ×1
  • Duplicated block (24–25 lines × 3) sui-execution/historical-versions/v0/sui-adapter/src/execution_engine.rs:194 — sui-execution/historical-versions/v0/sui-adapter/src/execution_engine.rs:194-217 | sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs:211-235 | sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs:231-255 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/execution_engine.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 531 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (23–25 lines × 2) · ×1
  • Duplicated block (23–25 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/context.rs:1456 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/context.rs:1456-1478 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/context.rs:2627-2651 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/context.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/context.rs` as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 625 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (24 lines × 4) · ×1
  • Duplicated block (24 lines × 4) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/hash.rs:31 — sui-execution/historical-versions/v0/sui-move-natives/src/crypto/hash.rs:31-54 | sui-execution/historical-versions/v1/sui-move-natives/src/crypto/hash.rs:31-54 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/hash.rs:31-54 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/hash.rs:31-54 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/crypto/hash.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/crypto/hash.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 75 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (21–24 lines × 2) · ×1
  • Duplicated block (21–24 lines × 2) REDACTED:1404 — REDACTED:1404-1427 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/verify/move_functions.rs:222-242 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication · Duplicated block (19–24 lines × 2) · ×1
  • Duplicated block (19–24 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/context.rs:409 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/context.rs:409-427 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/context.rs:647-670 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/context.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/context.rs` as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 625 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (23 lines × 5) · ×1
  • Duplicated block (23 lines × 5) REDACTED:1682 — REDACTED:1682-1704 | REDACTED:1639-1661 | REDACTED:1651-1673 | REDACTED:2135-2157 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/context.rs:2270-2292 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 54 separate duplicated blocks between them, totalling at least 1035 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (22–23 lines × 3) · ×1
  • Duplicated block (22–23 lines × 3) crates/sui-data-store/src/stores/graphql.rs:400 — crates/sui-data-store/src/stores/graphql.rs:400-421 | crates/sui-data-store/src/stores/in_memory.rs:437-458 | crates/sui-data-store/src/stores/in_memory_lru.rs:348-370 — before extracting anything, compare `crates/sui-data-store/src/stores/graphql.rs` and `crates/sui-data-store/src/stores/in_memory.rs` as WHOLE FILES: this scan already matched 3 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. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (21–23 lines × 2) · ×1
  • Duplicated block (21–23 lines × 2) consensus/core/src/authority_service.rs:213 — consensus/core/src/authority_service.rs:213-235 | consensus/core/src/observer_service.rs:133-153 — before extracting anything, compare `consensus/core/src/authority_service.rs` and `consensus/core/src/observer_service.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 85 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (20–22 lines × 3) · ×1
  • Duplicated block (20–22 lines × 3) sui-execution/historical-versions/v0/sui-adapter/src/temporary_store.rs:1053 — sui-execution/historical-versions/v0/sui-adapter/src/temporary_store.rs:1053-1072 | sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs:1171-1190 | sui-execution/historical-versions/v2/sui-adapter/src/temporary_store.rs:1223-1244 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/temporary_store.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 195 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (19–22 lines × 2) · ×1
  • Duplicated block (19–22 lines × 2) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/translate.rs:887 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/translate.rs:887-905 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/translate.rs:898-919 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/translate.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/translate.rs` as WHOLE FILES: this scan already matched 40 separate duplicated blocks between them, totalling at least 589 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (20–21 lines × 6) · ×1
  • Duplicated block (20–21 lines × 6) sui-execution/historical-versions/v2/sui-move-natives/src/object_runtime/object_store.rs:474 — sui-execution/historical-versions/v2/sui-move-natives/src/object_runtime/object_store.rs:474-494 | sui-execution/historical-versions/v2/sui-move-natives/src/object_runtime/object_store.rs:525-544 | sui-execution/historical-versions/v3/sui-move-natives/src/object_runtime/object_store.rs:564-584 | sui-execution/historical-versions/v3/sui-move-natives/src/object_runtime/object_store.rs:622-641 | sui-execution/latest/sui-move-natives/src/object_runtime/object_store.rs:566-586 | sui-execution/latest/sui-move-natives/src/object_runtime/object_store.rs:624-643 — before extracting anything, compare `sui-execution/historical-versions/v2/sui-move-natives/src/object_runtime/object_store.rs` and `sui-execution/historical-versions/v3/sui-move-natives/src/object_runtime/object_store.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 179 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (21 lines × 4) · ×1
  • Duplicated block (21 lines × 4) sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs:375 — sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs:375-395 | sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs:395-415 | sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.rs:472-492 | sui-execution/latest/sui-adapter/src/execution_engine.rs:1497-1517 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs` and `sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs` as WHOLE FILES: this scan already matched 39 separate duplicated blocks between them, totalling at least 959 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (19–21 lines × 3) · ×1
  • Duplicated block (19–21 lines × 3) sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/context.rs:464 — sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/context.rs:464-482 | sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:472-492 | sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs:490-510 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/context.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 378 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (20–21 lines × 2) · ×1
  • Duplicated block (20–21 lines × 2) sui-execution/historical-versions/v3/sui-move-natives/src/object_runtime/mod.rs:336 — sui-execution/historical-versions/v3/sui-move-natives/src/object_runtime/mod.rs:336-355 | sui-execution/latest/sui-move-natives/src/object_runtime/mod.rs:497-517 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-move-natives/src/object_runtime/mod.rs` and `sui-execution/latest/sui-move-natives/src/object_runtime/mod.rs` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 491 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (19–20 lines × 5) · ×1
  • Duplicated block (19–20 lines × 5) sui-execution/historical-versions/v0/sui-adapter/src/error.rs:42 — sui-execution/historical-versions/v0/sui-adapter/src/error.rs:42-60 | sui-execution/historical-versions/v1/sui-adapter/src/error.rs:42-60 | sui-execution/historical-versions/v2/sui-adapter/src/error.rs:42-60 | sui-execution/historical-versions/v3/sui-adapter/src/error.rs:40-59 | sui-execution/latest/sui-adapter/src/error.rs:40-59 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/error.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/error.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 75 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (18–19 lines × 4) · ×1
  • Duplicated block (18–19 lines × 4) crates/sui-keys/src/external.rs:570 — crates/sui-keys/src/external.rs:570-588 | crates/sui-keys/src/external.rs:590-608 | crates/sui-keys/src/external.rs:610-627 | crates/sui-keys/src/external.rs:629-647 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (18–19 lines × 3) · ×1
  • Duplicated block (18–19 lines × 3) sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:582 — sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs:582-600 | sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs:601-618 | sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/context.rs:838-855 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs` and `sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs` as WHOLE FILES: this scan already matched 61 separate duplicated blocks between them, totalling at least 1074 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (17–19 lines × 2) · ×1
  • Duplicated block (17–19 lines × 2) crates/sui-consistent-store/src/restore/format.rs:137 — crates/sui-consistent-store/src/restore/format.rs:137-153 | crates/sui-indexer-alt-consistent-store/src/restore/format.rs:121-139 — before extracting anything, compare `crates/sui-consistent-store/src/restore/format.rs` and `crates/sui-indexer-alt-consistent-store/src/restore/format.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 67 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (17–18 lines × 7) · ×1
  • Duplicated block (17–18 lines × 7) sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs:501 — sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs:501-517 | sui-execution/historical-versions/v2/sui-adapter/src/temporary_store.rs:520-536 | sui-execution/historical-versions/v2/sui-adapter/src/temporary_store.rs:542-559 | sui-execution/historical-versions/v3/sui-adapter/src/temporary_store.rs:488-504 | sui-execution/historical-versions/v3/sui-adapter/src/temporary_store.rs:510-527 | sui-execution/latest/sui-adapter/src/temporary_store.rs:801-817 | sui-execution/latest/sui-adapter/src/temporary_store/invariants.rs:148-165 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs` and `sui-execution/historical-versions/v2/sui-adapter/src/temporary_store.rs` as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 779 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (17–18 lines × 5) · ×1
  • Duplicated block (17–18 lines × 5) sui-execution/historical-versions/v0/sui-verifier/src/struct_with_key_verifier.rs:40 — sui-execution/historical-versions/v0/sui-verifier/src/struct_with_key_verifier.rs:40-57 | sui-execution/historical-versions/v1/sui-verifier/src/struct_with_key_verifier.rs:40-57 | sui-execution/historical-versions/v2/sui-verifier/src/struct_with_key_verifier.rs:40-57 | sui-execution/historical-versions/v3/sui-verifier/src/struct_with_key_verifier.rs:41-57 | sui-execution/latest/sui-verifier/src/struct_with_key_verifier.rs:41-57 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-verifier/src/struct_with_key_verifier.rs` and `sui-execution/historical-versions/v1/sui-verifier/src/struct_with_key_verifier.rs` as WHOLE FILES: this scan already matched 4 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (10–18 lines × 2) · ×1
  • Duplicated block (10–18 lines × 2) consensus/core/src/network/tonic_network.rs:1026 — consensus/core/src/network/tonic_network.rs:1026-1043 | consensus/core/src/network/tonic_network.rs:1139-1148 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (14–18 lines × 2) · ×1
  • Duplicated block (14–18 lines × 2) REDACTED:830 — REDACTED:830-843 | REDACTED:836-853 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 77 separate duplicated blocks between them, totalling at least 1502 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (16–18 lines × 2) · ×1
  • Duplicated block (16–18 lines × 2) REDACTED:116 — REDACTED:116-133 | sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/interpreter.rs:44-59 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication · Duplicated block (17 lines × 10) · ×1
  • Duplicated block (17 lines × 10) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_k1.rs:121 — sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_k1.rs:121-137 | sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_r1.rs:124-140 | sui-execution/historical-versions/v1/sui-move-natives/src/crypto/ecdsa_k1.rs:121-137 | sui-execution/historical-versions/v1/sui-move-natives/src/crypto/ecdsa_r1.rs:124-140 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/ecdsa_k1.rs:121-137 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/ecdsa_r1.rs:124-140 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/ecdsa_k1.rs:132-148 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/ecdsa_r1.rs:124-140 | sui-execution/latest/sui-move-natives/src/crypto/ecdsa_k1.rs:134-150 | sui-execution/latest/sui-move-natives/src/crypto/ecdsa_r1.rs:126-142 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_k1.rs` and `sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_r1.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 151 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (17 lines × 6) · ×1
  • Duplicated block (17 lines × 6) sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/translate.rs:1142 — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/translate.rs:1142-1158 | sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/translate.rs:1235-1251 | sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/drop_safety.rs:72-88 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/translate.rs:1167-1183 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/translate.rs:1299-1315 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/verify/drop_safety.rs:72-88 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/translate.rs` and `sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/translate.rs` as WHOLE FILES: this scan already matched 40 separate duplicated blocks between them, totalling at least 589 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (16–17 lines × 4) · ×1
  • Duplicated block (16–17 lines × 4) sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/mod.rs:604 — sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/mod.rs:604-620 | sui-execution/historical-versions/v2/sui-move-natives/src/object_runtime/mod.rs:572-588 | sui-execution/historical-versions/v3/sui-move-natives/src/object_runtime/mod.rs:727-742 | sui-execution/latest/sui-move-natives/src/object_runtime/mod.rs:932-947 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/mod.rs` and `sui-execution/historical-versions/v2/sui-move-natives/src/object_runtime/mod.rs` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 314 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (15–16 lines × 9) · ×1
  • Duplicated block (15–16 lines × 9) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_k1.rs:66 — sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_k1.rs:66-80 | sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_k1.rs:212-227 | sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_r1.rs:67-82 | sui-execution/historical-versions/v1/sui-move-natives/src/crypto/ecdsa_k1.rs:66-80 | sui-execution/historical-versions/v1/sui-move-natives/src/crypto/ecdsa_k1.rs:212-227 | sui-execution/historical-versions/v1/sui-move-natives/src/crypto/ecdsa_r1.rs:67-82 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/ecdsa_k1.rs:66-80 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/ecdsa_k1.rs:212-227 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/ecdsa_r1.rs:67-82 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_k1.rs` and `sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_r1.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 151 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (16 lines × 6) · ×1
  • Duplicated block (16 lines × 6) sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs:221 — sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs:221-236 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs:278-293 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs:335-350 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs:407-422 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs:641-656 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs:710-725 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (15–16 lines × 6) · ×1
  • Duplicated block (15–16 lines × 6) sui-execution/historical-versions/v3/sui-move-natives/src/crypto/ecdsa_k1.rs:77 — sui-execution/historical-versions/v3/sui-move-natives/src/crypto/ecdsa_k1.rs:77-91 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/ecdsa_k1.rs:221-236 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/ecdsa_r1.rs:67-82 | sui-execution/latest/sui-move-natives/src/crypto/ecdsa_k1.rs:79-93 | sui-execution/latest/sui-move-natives/src/crypto/ecdsa_k1.rs:223-238 | sui-execution/latest/sui-move-natives/src/crypto/ecdsa_r1.rs:69-84 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-move-natives/src/crypto/ecdsa_k1.rs` and `sui-execution/historical-versions/v3/sui-move-natives/src/crypto/ecdsa_r1.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 151 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (14–16 lines × 5) · ×1
  • Duplicated block (14–16 lines × 5) crates/sui-benchmark/src/workloads/addr_bal_deposit.rs:184 — crates/sui-benchmark/src/workloads/addr_bal_deposit.rs:184-197 | crates/sui-benchmark/src/workloads/composite/mod.rs:2030-2043 | crates/sui-benchmark/src/workloads/composite/mod.rs:2131-2145 | crates/sui-benchmark/src/workloads/composite/operations.rs:312-325 | crates/sui-benchmark/src/workloads/composite/operations.rs:428-443 — before extracting anything, compare `crates/sui-benchmark/src/workloads/addr_bal_deposit.rs` and `crates/sui-benchmark/src/workloads/composite/mod.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 65 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (15–16 lines × 5) · ×1
  • Duplicated block (15–16 lines × 5) sui-execution/historical-versions/v0/sui-verifier/src/struct_with_key_verifier.rs:23 — sui-execution/historical-versions/v0/sui-verifier/src/struct_with_key_verifier.rs:23-38 | sui-execution/historical-versions/v1/sui-verifier/src/struct_with_key_verifier.rs:23-38 | sui-execution/historical-versions/v2/sui-verifier/src/struct_with_key_verifier.rs:23-38 | sui-execution/historical-versions/v3/sui-verifier/src/struct_with_key_verifier.rs:24-38 | sui-execution/latest/sui-verifier/src/struct_with_key_verifier.rs:24-38 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-verifier/src/struct_with_key_verifier.rs` and `sui-execution/historical-versions/v1/sui-verifier/src/struct_with_key_verifier.rs` as WHOLE FILES: this scan already matched 4 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (14–16 lines × 4) · ×1
  • Duplicated block (14–16 lines × 4) crates/simulacrum/src/store/in_mem_store.rs:239 — crates/simulacrum/src/store/in_mem_store.rs:239-254 | crates/sui-transactional-test-runner/src/simulator_persisted_store.rs:412-427 | crates/sui-transactional-test-runner/src/simulator_persisted_store.rs:693-708 | crates/sui-types/src/in_memory_storage.rs:48-61 — before extracting anything, compare `crates/simulacrum/src/store/in_mem_store.rs` and `crates/sui-transactional-test-runner/src/simulator_persisted_store.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 59 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (12–16 lines × 4) · ×1
  • Duplicated block (12–16 lines × 4) sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs:188 — sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs:188-203 | sui-execution/historical-versions/v2/sui-adapter/src/temporary_store.rs:206-221 | sui-execution/historical-versions/v3/sui-adapter/src/temporary_store.rs:312-327 | sui-execution/latest/sui-adapter/src/temporary_store.rs:568-579 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs` and `sui-execution/historical-versions/v2/sui-adapter/src/temporary_store.rs` as WHOLE FILES: this scan already matched 38 separate duplicated blocks between them, totalling at least 779 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (15–16 lines × 4) · ×1
  • Duplicated block (15–16 lines × 4) sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/mod.rs:464 — sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/mod.rs:464-478 | sui-execution/historical-versions/v2/sui-move-natives/src/object_runtime/mod.rs:426-440 | sui-execution/historical-versions/v3/sui-move-natives/src/object_runtime/mod.rs:599-614 | sui-execution/latest/sui-move-natives/src/object_runtime/mod.rs:802-817 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/mod.rs` and `sui-execution/historical-versions/v2/sui-move-natives/src/object_runtime/mod.rs` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 314 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (11–16 lines × 2) · ×1
  • Duplicated block (11–16 lines × 2) crates/sui-core/src/accumulators/object_funds_checker/mod.rs:142 — crates/sui-core/src/accumulators/object_funds_checker/mod.rs:142-157 | crates/sui-core/src/accumulators/unsettled_object_withdrawals.rs:123-133 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication · Duplicated block (13–16 lines × 2) · ×1
  • Duplicated block (13–16 lines × 2) crates/sui-rosetta/src/operations.rs:1544 — crates/sui-rosetta/src/operations.rs:1544-1559 | crates/sui-rosetta/src/operations.rs:1581-1593 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (15 lines × 7) · ×1
  • Duplicated block (15 lines × 7) sui-execution/historical-versions/v0/sui-verifier/src/private_generics.rs:177 — sui-execution/historical-versions/v0/sui-verifier/src/private_generics.rs:177-191 | sui-execution/historical-versions/v1/sui-verifier/src/private_generics.rs:179-193 | sui-execution/historical-versions/v2/sui-verifier/src/private_generics.rs:198-212 | sui-execution/historical-versions/v3/sui-verifier/src/private_generics.rs:260-274 | sui-execution/historical-versions/v3/sui-verifier/src/private_generics_verifier_v2.rs:299-313 | sui-execution/latest/sui-verifier/src/private_generics.rs:260-274 | sui-execution/latest/sui-verifier/src/private_generics_verifier_v2.rs:300-314 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-verifier/src/private_generics.rs` and `sui-execution/historical-versions/v1/sui-verifier/src/private_generics.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 144 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (13–15 lines × 5) · ×1
  • Duplicated block (13–15 lines × 5) crates/sui-bridge/src/sui_transaction_builder.rs:251 — crates/sui-bridge/src/sui_transaction_builder.rs:251-263 | crates/sui-bridge/src/sui_transaction_builder.rs:324-338 | crates/sui-bridge/src/sui_transaction_builder.rs:391-405 | crates/sui-bridge/src/sui_transaction_builder.rs:454-468 | crates/sui-bridge/src/sui_transaction_builder.rs:517-531 — 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.
D4 · Code Duplication · Duplicated block (14–15 lines × 3) · ×1
  • Duplicated block (14–15 lines × 3) sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/linkage_view.rs:312 — sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/linkage_view.rs:312-325 | sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/linkage_view.rs:249-262 | sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/linkage_view.rs:248-262 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/linkage_view.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/linkage_view.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 128 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (14–15 lines × 2) · ×1
  • Duplicated block (14–15 lines × 2) crates/sui-consistent-store/src/restore/storage.rs:57 — crates/sui-consistent-store/src/restore/storage.rs:57-70 | crates/sui-indexer-alt-consistent-store/src/restore/storage.rs:41-55 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication · Duplicated block (11–14 lines × 16) · ×1
  • Duplicated block (11–14 lines × 16) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/bls12381.rs:59 — sui-execution/historical-versions/v0/sui-move-natives/src/crypto/bls12381.rs:59-72 | sui-execution/historical-versions/v0/sui-move-natives/src/crypto/bls12381.rs:140-153 | sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_k1.rs:256-266 | sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_r1.rs:215-225 | sui-execution/historical-versions/v1/sui-move-natives/src/crypto/bls12381.rs:59-72 | sui-execution/historical-versions/v1/sui-move-natives/src/crypto/bls12381.rs:140-153 | sui-execution/historical-versions/v1/sui-move-natives/src/crypto/ecdsa_k1.rs:256-266 | sui-execution/historical-versions/v1/sui-move-natives/src/crypto/ecdsa_r1.rs:215-225 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/bls12381.rs:59-72 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/bls12381.rs:140-153 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/ecdsa_k1.rs:256-266 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/ecdsa_r1.rs:215-225 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/bls12381.rs:57-70 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/bls12381.rs:136-149 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/ecdsa_k1.rs:265-275 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/ecdsa_r1.rs:215-225 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/crypto/bls12381.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/crypto/bls12381.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 128 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (14 lines × 8) · ×1
  • Duplicated block (14 lines × 8) crates/sui-benchmark/src/workloads/adversarial.rs:422 — crates/sui-benchmark/src/workloads/adversarial.rs:422-435 | crates/sui-benchmark/src/workloads/batch_payment.rs:141-154 | crates/sui-benchmark/src/workloads/delegation.rs:105-118 | crates/sui-benchmark/src/workloads/expected_failure.rs:118-131 | crates/sui-benchmark/src/workloads/party.rs:197-210 | crates/sui-benchmark/src/workloads/randomness.rs:117-130 | crates/sui-benchmark/src/workloads/slow.rs:164-177 | crates/sui-benchmark/src/workloads/transfer_object.rs:112-125 — before extracting anything, compare `crates/sui-benchmark/src/workloads/adversarial.rs` and `crates/sui-benchmark/src/workloads/party.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. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (11–14 lines × 4) · ×1
  • Duplicated block (11–14 lines × 4) sui-execution/latest/sui-move-natives/src/crypto/bls12381.rs:56 — sui-execution/latest/sui-move-natives/src/crypto/bls12381.rs:56-69 | sui-execution/latest/sui-move-natives/src/crypto/bls12381.rs:135-148 | sui-execution/latest/sui-move-natives/src/crypto/ecdsa_k1.rs:267-277 | sui-execution/latest/sui-move-natives/src/crypto/ecdsa_r1.rs:217-227 — before extracting anything, compare `sui-execution/latest/sui-move-natives/src/crypto/ecdsa_k1.rs` and `sui-execution/latest/sui-move-natives/src/crypto/ecdsa_r1.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 151 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (12–14 lines × 3) · ×1
  • Duplicated block (12–14 lines × 3) crates/sui-benchmark/src/workloads/addr_bal_deposit.rs:205 — crates/sui-benchmark/src/workloads/addr_bal_deposit.rs:205-217 | crates/sui-benchmark/src/workloads/composite/mod.rs:2051-2064 | crates/sui-benchmark/src/workloads/composite/mod.rs:2396-2407 — before extracting anything, compare `crates/sui-benchmark/src/workloads/addr_bal_deposit.rs` and `crates/sui-benchmark/src/workloads/composite/mod.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 65 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (11–14 lines × 2) · ×1
  • Duplicated block (11–14 lines × 2) crates/sui-execution-backtest/src/ndjson_store.rs:170 — crates/sui-execution-backtest/src/ndjson_store.rs:170-180 | crates/sui-indexer-alt-framework-store-traits/src/testing/mock_store.rs:199-212 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication · Duplicated block (12–13 lines × 10) · ×1
  • Duplicated block (12–13 lines × 10) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_k1.rs:247 — sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_k1.rs:247-258 | sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_r1.rs:205-217 | sui-execution/historical-versions/v1/sui-move-natives/src/crypto/ecdsa_k1.rs:247-258 | sui-execution/historical-versions/v1/sui-move-natives/src/crypto/ecdsa_r1.rs:205-217 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/ecdsa_k1.rs:247-258 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/ecdsa_r1.rs:205-217 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/ecdsa_k1.rs:256-267 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/ecdsa_r1.rs:205-217 | sui-execution/latest/sui-move-natives/src/crypto/ecdsa_k1.rs:258-269 | sui-execution/latest/sui-move-natives/src/crypto/ecdsa_r1.rs:207-219 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_k1.rs` and `sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_r1.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 151 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (10–13 lines × 9) · ×1
  • Duplicated block (10–13 lines × 9) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_r1.rs:174 — sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_r1.rs:174-183 | sui-execution/historical-versions/v0/sui-move-natives/src/crypto/groth16.rs:45-55 | sui-execution/historical-versions/v0/sui-move-natives/src/crypto/groth16.rs:132-144 | sui-execution/historical-versions/v1/sui-move-natives/src/crypto/ecdsa_r1.rs:174-183 | sui-execution/historical-versions/v1/sui-move-natives/src/crypto/groth16.rs:45-55 | sui-execution/historical-versions/v1/sui-move-natives/src/crypto/groth16.rs:132-144 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/ecdsa_r1.rs:174-183 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/groth16.rs:45-55 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/groth16.rs:132-144 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_r1.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/crypto/ecdsa_r1.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 225 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (12–13 lines × 3) · ×1
  • Duplicated block (12–13 lines × 3) crates/sui-benchmark/src/workloads/addr_bal_deposit.rs:195 — crates/sui-benchmark/src/workloads/addr_bal_deposit.rs:195-206 | crates/sui-benchmark/src/workloads/addr_bal_deposit.rs:334-346 | crates/sui-benchmark/src/workloads/composite/mod.rs:2041-2052 — before extracting anything, compare `crates/sui-benchmark/src/workloads/addr_bal_deposit.rs` and `crates/sui-benchmark/src/workloads/composite/mod.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 65 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (3–13 lines × 3) · ×1
  • Duplicated block (3–13 lines × 3) crates/sui-indexer-alt-graphql/src/api/types/address.rs:638 — crates/sui-indexer-alt-graphql/src/api/types/address.rs:638-640 | crates/sui-indexer-alt-graphql/src/api/types/move_package.rs:690-702 | crates/sui-indexer-alt-graphql/src/api/types/object.rs:772-783 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (8–13 lines × 2) · ×1
  • Duplicated block (8–13 lines × 2) sui-execution/historical-versions/v0/sui-move-natives/src/object_runtime/mod.rs:533 — sui-execution/historical-versions/v0/sui-move-natives/src/object_runtime/mod.rs:533-540 | sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/mod.rs:584-596 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/object_runtime/mod.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/object_runtime/mod.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 208 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (11–12 lines × 4) · ×1
  • Duplicated block (11–12 lines × 4) REDACTED:1303 — REDACTED:1303-1314 | REDACTED:1225-1236 | REDACTED:1237-1248 | REDACTED:1508-1518 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 54 separate duplicated blocks between them, totalling at least 1035 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (10–12 lines × 3) · ×1
  • Duplicated block (10–12 lines × 3) crates/sui-proxy/src/peers.rs:898 — crates/sui-proxy/src/peers.rs:898-907 | crates/sui-proxy/src/peers.rs:970-981 | crates/sui-proxy/src/peers.rs:1032-1043 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (11 lines × 16) · ×1
  • Duplicated block (11 lines × 16) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_k1.rs:108 — sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_k1.rs:108-118 | sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_k1.rs:261-271 | sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_r1.rs:111-121 | sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_r1.rs:220-230 | sui-execution/historical-versions/v1/sui-move-natives/src/crypto/ecdsa_k1.rs:108-118 | sui-execution/historical-versions/v1/sui-move-natives/src/crypto/ecdsa_k1.rs:261-271 | sui-execution/historical-versions/v1/sui-move-natives/src/crypto/ecdsa_r1.rs:111-121 | sui-execution/historical-versions/v1/sui-move-natives/src/crypto/ecdsa_r1.rs:220-230 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/ecdsa_k1.rs:108-118 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/ecdsa_k1.rs:261-271 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/ecdsa_r1.rs:111-121 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/ecdsa_r1.rs:220-230 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/ecdsa_k1.rs:119-129 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/ecdsa_k1.rs:270-280 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/ecdsa_r1.rs:111-121 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/ecdsa_r1.rs:220-230 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_k1.rs` and `sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_r1.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 151 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (11 lines × 10) · ×1
  • Duplicated block (11 lines × 10) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_k1.rs:278 — sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_k1.rs:278-288 | sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_r1.rs:237-247 | sui-execution/historical-versions/v1/sui-move-natives/src/crypto/ecdsa_k1.rs:278-288 | sui-execution/historical-versions/v1/sui-move-natives/src/crypto/ecdsa_r1.rs:237-247 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/ecdsa_k1.rs:278-288 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/ecdsa_r1.rs:237-247 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/ecdsa_k1.rs:287-297 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/ecdsa_r1.rs:237-247 | sui-execution/latest/sui-move-natives/src/crypto/ecdsa_k1.rs:289-299 | sui-execution/latest/sui-move-natives/src/crypto/ecdsa_r1.rs:239-249 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_k1.rs` and `sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ecdsa_r1.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 151 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (11 lines × 6) · ×1
  • Duplicated block (11 lines × 6) sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs:179 — sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs:179-189 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs:228-238 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs:285-295 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs:342-352 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs:414-424 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs:717-727 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (7–11 lines × 2) · ×1
  • Duplicated block (7–11 lines × 2) crates/sui-benchmark/src/workloads/adversarial.rs:482 — crates/sui-benchmark/src/workloads/adversarial.rs:482-492 | crates/sui-benchmark/src/workloads/slow.rs:218-224 — before extracting anything, compare `crates/sui-benchmark/src/workloads/adversarial.rs` and `crates/sui-benchmark/src/workloads/slow.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 42 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (8–10 lines × 8) · ×1
  • Duplicated block (8–10 lines × 8) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ed25519.rs:58 — sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ed25519.rs:58-65 | sui-execution/historical-versions/v0/sui-move-natives/src/crypto/groth16.rs:145-154 | sui-execution/historical-versions/v1/sui-move-natives/src/crypto/ed25519.rs:58-65 | sui-execution/historical-versions/v1/sui-move-natives/src/crypto/groth16.rs:145-154 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/ed25519.rs:58-65 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/groth16.rs:145-154 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/ed25519.rs:56-63 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/groth16.rs:145-154 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/crypto/ed25519.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/crypto/ed25519.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 61 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (10 lines × 8) · ×1
  • Duplicated block (10 lines × 8) sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs:171 — sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs:171-180 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs:218-227 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs:275-284 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs:332-341 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs:404-413 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs:477-486 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs:638-647 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs:707-716 — all 8 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (9–10 lines × 4) · ×1
  • Duplicated block (9–10 lines × 4) sui-execution/historical-versions/v3/sui-adapter/src/gas_meter.rs:152 — sui-execution/historical-versions/v3/sui-adapter/src/gas_meter.rs:152-160 | sui-execution/historical-versions/v3/sui-adapter/src/gas_meter.rs:171-180 | sui-execution/latest/sui-adapter/src/gas_meter.rs:174-182 | sui-execution/latest/sui-adapter/src/gas_meter.rs:190-199 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-adapter/src/gas_meter.rs` and `sui-execution/latest/sui-adapter/src/gas_meter.rs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 123 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (7–10 lines × 2) · ×1
  • Duplicated block (7–10 lines × 2) crates/sui-replay-2/src/package_tools.rs:373 — crates/sui-replay-2/src/package_tools.rs:373-382 | crates/sui-types/src/move_package.rs:843-849 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication · Duplicated block (9 lines × 10) · ×1
  • Duplicated block (9 lines × 10) sui-execution/historical-versions/v0/sui-move-natives/src/crypto/bls12381.rs:93 — sui-execution/historical-versions/v0/sui-move-natives/src/crypto/bls12381.rs:93-101 | sui-execution/historical-versions/v0/sui-move-natives/src/crypto/bls12381.rs:174-182 | sui-execution/historical-versions/v1/sui-move-natives/src/crypto/bls12381.rs:93-101 | sui-execution/historical-versions/v1/sui-move-natives/src/crypto/bls12381.rs:174-182 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/bls12381.rs:93-101 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/bls12381.rs:174-182 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/bls12381.rs:91-99 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/bls12381.rs:170-178 | sui-execution/latest/sui-move-natives/src/crypto/bls12381.rs:90-98 | sui-execution/latest/sui-move-natives/src/crypto/bls12381.rs:169-177 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/crypto/bls12381.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/crypto/bls12381.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 128 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (9 lines × 8) · ×1
  • Duplicated block (9 lines × 8) REDACTED:213 — REDACTED:213-221 | REDACTED:240-248 | REDACTED:217-225 | REDACTED:244-252 | REDACTED:223-231 | REDACTED:250-258 | REDACTED:348-356 | REDACTED:386-394 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 54 separate duplicated blocks between them, totalling at least 1035 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (8–9 lines × 6) · ×1
  • Duplicated block (8–9 lines × 6) sui-execution/historical-versions/v0/sui-adapter/src/gas_meter.rs:147 — sui-execution/historical-versions/v0/sui-adapter/src/gas_meter.rs:147-154 | sui-execution/historical-versions/v0/sui-adapter/src/gas_meter.rs:165-173 | sui-execution/historical-versions/v1/sui-adapter/src/gas_meter.rs:147-154 | sui-execution/historical-versions/v1/sui-adapter/src/gas_meter.rs:165-173 | sui-execution/historical-versions/v2/sui-adapter/src/gas_meter.rs:147-154 | sui-execution/historical-versions/v2/sui-adapter/src/gas_meter.rs:165-173 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/gas_meter.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/gas_meter.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 155 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (8–9 lines × 4) · ×1
  • Duplicated block (8–9 lines × 4) sui-execution/historical-versions/v0/sui-move-natives/src/dynamic_field.rs:369 — sui-execution/historical-versions/v0/sui-move-natives/src/dynamic_field.rs:369-376 | sui-execution/historical-versions/v1/sui-move-natives/src/dynamic_field.rs:368-375 | sui-execution/historical-versions/v2/sui-move-natives/src/dynamic_field.rs:368-375 | sui-execution/historical-versions/v3/sui-move-natives/src/dynamic_field.rs:397-405 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/dynamic_field.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/dynamic_field.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 384 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (7–9 lines × 4) · ×1
  • Duplicated block (7–9 lines × 4) sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs:555 — sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs:555-563 | sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs:575-583 | sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.rs:685-691 | sui-execution/latest/sui-adapter/src/execution_engine.rs:1722-1728 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs` and `sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs` as WHOLE FILES: this scan already matched 39 separate duplicated blocks between them, totalling at least 959 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (4–9 lines × 4) · ×1
  • Duplicated block (4–9 lines × 4) crates/sui-data-store/src/stores/filesystem.rs:658 — crates/sui-data-store/src/stores/filesystem.rs:658-661 | crates/sui-data-store/src/stores/graphql.rs:376-384 | crates/sui-data-store/src/stores/in_memory.rs:405-413 | crates/sui-data-store/src/stores/in_memory_lru.rs:332-340 — before extracting anything, compare `crates/sui-data-store/src/stores/filesystem.rs` and `crates/sui-data-store/src/stores/graphql.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.
D4 · Code Duplication · Duplicated block (4–9 lines × 3) · ×1
  • Duplicated block (4–9 lines × 3) crates/sui-indexer-alt-graphql/src/api/subscription/mod.rs:96 — crates/sui-indexer-alt-graphql/src/api/subscription/mod.rs:96-99 | crates/sui-indexer-alt-graphql/src/api/subscription/mod.rs:142-150 | crates/sui-indexer-alt-graphql/src/api/subscription/mod.rs:187-195 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (8 lines × 14) · ×1
  • Duplicated block (8 lines × 14) sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs:247 — sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs:247-254 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs:309-316 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs:382-389 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs:455-462 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs:544-551 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs:634-641 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs:859-866 | sui-execution/latest/sui-move-natives/src/crypto/group_ops.rs:250-257 | sui-execution/latest/sui-move-natives/src/crypto/group_ops.rs:312-319 | sui-execution/latest/sui-move-natives/src/crypto/group_ops.rs:385-392 | sui-execution/latest/sui-move-natives/src/crypto/group_ops.rs:458-465 | sui-execution/latest/sui-move-natives/src/crypto/group_ops.rs:547-554 | sui-execution/latest/sui-move-natives/src/crypto/group_ops.rs:637-644 | sui-execution/latest/sui-move-natives/src/crypto/group_ops.rs:861-868 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs` and `sui-execution/latest/sui-move-natives/src/crypto/group_ops.rs` as WHOLE FILES: this scan already matched 33 separate duplicated blocks between them, totalling at least 590 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (8 lines × 12) · ×1
  • Duplicated block (8 lines × 12) sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs:223 — sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs:223-230 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs:280-287 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs:337-344 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs:409-416 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs:643-650 | sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs:712-719 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs:313-320 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs:386-393 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs:459-466 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs:548-555 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs:793-800 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs:863-870 — before extracting anything, compare `sui-execution/historical-versions/v2/sui-move-natives/src/crypto/group_ops.rs` and `sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 256 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (6–8 lines × 3) · ×1
  • Duplicated block (6–8 lines × 3) sui-execution/historical-versions/v1/sui-adapter/src/gas_charger.rs:314 — sui-execution/historical-versions/v1/sui-adapter/src/gas_charger.rs:314-319 | sui-execution/historical-versions/v2/sui-adapter/src/gas_charger.rs:315-320 | sui-execution/historical-versions/v3/sui-adapter/src/gas_charger.rs:406-413 — before extracting anything, compare `sui-execution/historical-versions/v1/sui-adapter/src/gas_charger.rs` and `sui-execution/historical-versions/v2/sui-adapter/src/gas_charger.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 205 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (7 lines × 16) · ×1
  • Duplicated block (7 lines × 16) sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs:246 — sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs:246-252 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs:308-314 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs:381-387 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs:454-460 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs:543-549 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs:633-639 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs:858-864 | sui-execution/historical-versions/v3/sui-move-natives/src/crypto/nitro_attestation.rs:76-82 | sui-execution/latest/sui-move-natives/src/crypto/group_ops.rs:249-255 | sui-execution/latest/sui-move-natives/src/crypto/group_ops.rs:311-317 | sui-execution/latest/sui-move-natives/src/crypto/group_ops.rs:384-390 | sui-execution/latest/sui-move-natives/src/crypto/group_ops.rs:457-463 | sui-execution/latest/sui-move-natives/src/crypto/group_ops.rs:546-552 | sui-execution/latest/sui-move-natives/src/crypto/group_ops.rs:636-642 | sui-execution/latest/sui-move-natives/src/crypto/group_ops.rs:860-866 | sui-execution/latest/sui-move-natives/src/crypto/nitro_attestation.rs:78-84 — before extracting anything, compare `sui-execution/historical-versions/v3/sui-move-natives/src/crypto/group_ops.rs` and `sui-execution/latest/sui-move-natives/src/crypto/group_ops.rs` as WHOLE FILES: this scan already matched 33 separate duplicated blocks between them, totalling at least 590 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (7 lines × 8) · ×1
  • Duplicated block (7 lines × 8) sui-execution/historical-versions/v0/sui-verifier/src/global_storage_access_verifier.rs:102 — sui-execution/historical-versions/v0/sui-verifier/src/global_storage_access_verifier.rs:102-109 | sui-execution/historical-versions/v0/sui-verifier/src/id_leak_verifier.rs:551-558 | sui-execution/historical-versions/v1/sui-verifier/src/global_storage_access_verifier.rs:102-109 | sui-execution/historical-versions/v1/sui-verifier/src/id_leak_verifier.rs:525-532 | sui-execution/historical-versions/v2/sui-verifier/src/global_storage_access_verifier.rs:103-109 | sui-execution/historical-versions/v2/sui-verifier/src/id_leak_verifier.rs:540-547 | sui-execution/historical-versions/v3/sui-verifier/src/global_storage_access_verifier.rs:103-109 | sui-execution/latest/sui-verifier/src/global_storage_access_verifier.rs:103-109 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-verifier/src/global_storage_access_verifier.rs` and `sui-execution/historical-versions/v1/sui-verifier/src/global_storage_access_verifier.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 127 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (7 lines × 7) · ×1
  • Duplicated block (7 lines × 7) crates/sui-indexer-alt-reader/src/object_versions.rs:45 — crates/sui-indexer-alt-reader/src/object_versions.rs:45-51 | crates/sui-indexer-alt-reader/src/object_versions.rs:105-111 | crates/sui-indexer-alt-reader/src/object_versions.rs:178-184 | crates/sui-indexer-alt-reader/src/object_versions.rs:255-261 | crates/sui-indexer-alt-reader/src/packages.rs:41-47 | crates/sui-indexer-alt-reader/src/packages.rs:97-103 | crates/sui-indexer-alt-reader/src/packages.rs:173-179 — before extracting anything, compare `crates/sui-indexer-alt-reader/src/object_versions.rs` and `crates/sui-indexer-alt-reader/src/packages.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 55 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (7 lines × 6) · ×1
  • Duplicated block (7 lines × 6) REDACTED:874 — REDACTED:874-880 | REDACTED:807-813 | REDACTED:813-819 | sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/context.rs:1324-1330 | sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/execution/context.rs:746-752 | sui-execution/latest/sui-adapter/src/static_programmable_transactions/env.rs:665-671 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 54 separate duplicated blocks between them, totalling at least 1035 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (6–7 lines × 2) · ×1
  • Duplicated block (6–7 lines × 2) crates/sui-core/src/consensus_validator.rs:501 — crates/sui-core/src/consensus_validator.rs:501-507 | crates/sui-core/src/consensus_validator.rs:517-522 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (6 lines × 8) · ×1
  • Duplicated block (6 lines × 8) sui-execution/historical-versions/v0/sui-adapter/src/execution_value.rs:104 — sui-execution/historical-versions/v0/sui-adapter/src/execution_value.rs:104-109 | sui-execution/historical-versions/v0/sui-adapter/src/execution_value.rs:111-116 | sui-execution/historical-versions/v1/sui-adapter/src/execution_value.rs:104-109 | sui-execution/historical-versions/v1/sui-adapter/src/execution_value.rs:111-116 | sui-execution/historical-versions/v2/sui-adapter/src/execution_value.rs:104-109 | sui-execution/historical-versions/v2/sui-adapter/src/execution_value.rs:111-116 | sui-execution/historical-versions/v3/sui-adapter/src/execution_value.rs:118-123 | sui-execution/historical-versions/v3/sui-adapter/src/execution_value.rs:125-130 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-adapter/src/execution_value.rs` and `sui-execution/historical-versions/v1/sui-adapter/src/execution_value.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 64 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (11 lines × 9) · ×1
  • Duplicated block (11 lines × 9) crates/sui-benchmark/src/drivers/mod.rs:436 — crates/sui-benchmark/src/drivers/mod.rs:436-446 | crates/sui-benchmark/src/drivers/mod.rs:451-461 | crates/sui-benchmark/src/drivers/mod.rs:466-476 | crates/sui-benchmark/src/drivers/mod.rs:481-491 | crates/sui-benchmark/src/drivers/mod.rs:496-506 | crates/sui-benchmark/src/drivers/mod.rs:511-521 | crates/sui-benchmark/src/drivers/mod.rs:526-536 | crates/sui-benchmark/src/drivers/mod.rs:541-551 | crates/sui-benchmark/src/drivers/mod.rs:556-566 — all 9 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (7 lines × 11) · ×1
  • Duplicated block (7 lines × 11) crates/sui-config/src/node.rs:723 — crates/sui-config/src/node.rs:723-729 | crates/sui-config/src/node.rs:735-741 | crates/sui-config/src/node.rs:747-753 | crates/sui-config/src/node.rs:759-766 | crates/sui-config/src/node.rs:772-779 | crates/sui-config/src/node.rs:785-792 | crates/sui-config/src/node.rs:798-804 | crates/sui-config/src/node.rs:810-816 | crates/sui-config/src/node.rs:822-829 | crates/sui-config/src/node.rs:835-842 | crates/sui-config/src/node.rs:848-855 — all 11 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (7–9 lines × 3) · ×1
  • Duplicated block (7–9 lines × 3) scripts/release_notes.py:333 — scripts/release_notes.py:333-341 | scripts/release_notes.py:556-564 | scripts/release_notes.py:643-649 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Near-duplicate member family (4 members, 54 shared lines) · ×1
  • Near-duplicate member family (4 members, 54 shared lines) sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs:49 — sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs:49-255 | sui-execution/historical-versions/v1/sui-move-natives/src/test_scenario.rs:48-250 | sui-execution/historical-versions/v2/sui-move-natives/src/test_scenario.rs:47-252 | sui-execution/historical-versions/v3/sui-move-natives/src/test_scenario.rs:104-378 — These 4 members are variants of one another: a block of 54 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Near-duplicate member family (4 members, 53 shared lines) · ×1
  • Near-duplicate member family (4 members, 53 shared lines) sui-execution/historical-versions/v1/sui-move-natives/src/test_scenario.rs:48 — sui-execution/historical-versions/v1/sui-move-natives/src/test_scenario.rs:48-250 | sui-execution/historical-versions/v2/sui-move-natives/src/test_scenario.rs:47-252 | sui-execution/historical-versions/v3/sui-move-natives/src/test_scenario.rs:104-378 | sui-execution/latest/sui-move-natives/src/test_scenario.rs:239-521 — These 4 members are variants of one another: a block of 53 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Near-duplicate member pair (53 shared lines) · ×1
  • Near-duplicate member pair (53 shared lines) crates/sui-transactional-test-runner/src/test_adapter.rs:2018 — crates/sui-transactional-test-runner/src/test_adapter.rs:2018-2161 | crates/sui-transactional-test-runner/src/test_adapter.rs:2192-2296 — These two members are variants of one another: 53 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Members sharing a duplicated core (9 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (9 members, 50+ identical tokens) crates/sui-indexer-alt-e2e-tests/src/coin_registry.rs:100 — crates/sui-indexer-alt-e2e-tests/src/coin_registry.rs:100-138 | crates/sui-indexer-alt-e2e-tests/src/coin_registry.rs:155-186 | crates/sui-indexer-alt-e2e-tests/src/coin_registry.rs:209-250 | crates/sui-indexer-alt-e2e-tests/src/coin_registry.rs:272-311 | crates/sui-indexer-alt-e2e-tests/src/coin_registry.rs:329-362 | crates/sui-indexer-alt-e2e-tests/src/coin_registry.rs:380-413 | crates/sui-indexer-alt-e2e-tests/src/coin_registry.rs:428-465 | crates/sui-indexer-alt-e2e-tests/src/coin_registry.rs:482-519 | crates/sui-indexer-alt-e2e-tests/src/coin_registry.rs:538-575 — These 9 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 9 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 9 times.
D4 · Code Duplication · Duplicated block (74 lines × 5) · ×1
  • Duplicated block (74 lines × 5) sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs:654 — sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs:654-727 | sui-execution/historical-versions/v1/sui-move-natives/src/test_scenario.rs:649-722 | sui-execution/historical-versions/v2/sui-move-natives/src/test_scenario.rs:651-724 | sui-execution/historical-versions/v3/sui-move-natives/src/test_scenario.rs:935-1008 | sui-execution/latest/sui-move-natives/src/test_scenario.rs:1108-1181 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/test_scenario.rs` as WHOLE FILES: this scan already matched 35 separate duplicated blocks between them, totalling at least 619 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (43 lines × 3) · ×1
  • Duplicated block (43 lines × 3) sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs:173 — sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs:173-215 | sui-execution/historical-versions/v1/sui-move-natives/src/test_scenario.rs:168-210 | sui-execution/historical-versions/v2/sui-move-natives/src/test_scenario.rs:170-212 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/test_scenario.rs` as WHOLE FILES: this scan already matched 35 separate duplicated blocks between them, totalling at least 619 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (31–32 lines × 3) · ×1
  • Duplicated block (31–32 lines × 3) sui-execution/historical-versions/v2/sui-move-natives/src/test_scenario.rs:86 — sui-execution/historical-versions/v2/sui-move-natives/src/test_scenario.rs:86-116 | sui-execution/historical-versions/v3/sui-move-natives/src/test_scenario.rs:173-204 | sui-execution/latest/sui-move-natives/src/test_scenario.rs:312-343 — before extracting anything, compare `sui-execution/historical-versions/v2/sui-move-natives/src/test_scenario.rs` and `sui-execution/historical-versions/v3/sui-move-natives/src/test_scenario.rs` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 432 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (19–21 lines × 2) · ×1
  • Duplicated block (19–21 lines × 2) crates/sui-transactional-test-runner/src/test_adapter.rs:1186 — crates/sui-transactional-test-runner/src/test_adapter.rs:1186-1204 | crates/sui-transactional-test-runner/src/test_adapter.rs:1533-1553 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (12–20 lines × 5) · ×1
  • Duplicated block (12–20 lines × 5) sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs:53 — sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs:53-64 | sui-execution/historical-versions/v1/sui-move-natives/src/test_scenario.rs:52-63 | sui-execution/historical-versions/v2/sui-move-natives/src/test_scenario.rs:51-62 | sui-execution/historical-versions/v3/sui-move-natives/src/test_scenario.rs:108-127 | sui-execution/latest/sui-move-natives/src/test_scenario.rs:247-266 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/test_scenario.rs` as WHOLE FILES: this scan already matched 35 separate duplicated blocks between them, totalling at least 619 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (14–17 lines × 2) · ×1
  • Duplicated block (14–17 lines × 2) crates/sui-indexer-alt-e2e-tests/src/coin_registry.rs:210 — crates/sui-indexer-alt-e2e-tests/src/coin_registry.rs:210-223 | crates/sui-indexer-alt-e2e-tests/src/coin_registry.rs:273-289 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (12 lines × 7) · ×1
  • Duplicated block (12 lines × 7) crates/sui-indexer-alt-e2e-tests/src/coin_registry.rs:234 — crates/sui-indexer-alt-e2e-tests/src/coin_registry.rs:234-245 | crates/sui-indexer-alt-e2e-tests/src/coin_registry.rs:295-306 | crates/sui-indexer-alt-e2e-tests/src/coin_registry.rs:346-357 | crates/sui-indexer-alt-e2e-tests/src/coin_registry.rs:397-408 | crates/sui-indexer-alt-e2e-tests/src/coin_registry.rs:449-460 | crates/sui-indexer-alt-e2e-tests/src/coin_registry.rs:503-514 | crates/sui-indexer-alt-e2e-tests/src/coin_registry.rs:559-570 — all 7 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (10 lines × 9) · ×1
  • Duplicated block (10 lines × 9) crates/sui-indexer-alt-e2e-tests/src/coin_registry.rs:124 — crates/sui-indexer-alt-e2e-tests/src/coin_registry.rs:124-133 | crates/sui-indexer-alt-e2e-tests/src/coin_registry.rs:172-181 | crates/sui-indexer-alt-e2e-tests/src/coin_registry.rs:234-245 | crates/sui-indexer-alt-e2e-tests/src/coin_registry.rs:295-306 | crates/sui-indexer-alt-e2e-tests/src/coin_registry.rs:346-357 | crates/sui-indexer-alt-e2e-tests/src/coin_registry.rs:397-408 | crates/sui-indexer-alt-e2e-tests/src/coin_registry.rs:449-460 | crates/sui-indexer-alt-e2e-tests/src/coin_registry.rs:503-514 | crates/sui-indexer-alt-e2e-tests/src/coin_registry.rs:559-570 — all 9 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (8 lines × 6) · ×1
  • Duplicated block (8 lines × 6) sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs:422 — sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs:422-429 | sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs:497-504 | sui-execution/historical-versions/v1/sui-move-natives/src/test_scenario.rs:417-424 | sui-execution/historical-versions/v1/sui-move-natives/src/test_scenario.rs:492-499 | sui-execution/historical-versions/v2/sui-move-natives/src/test_scenario.rs:419-426 | sui-execution/historical-versions/v2/sui-move-natives/src/test_scenario.rs:494-501 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/test_scenario.rs` as WHOLE FILES: this scan already matched 35 separate duplicated blocks between them, totalling at least 619 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (6 lines × 6) · ×1
  • Duplicated block (6 lines × 6) sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs:342 — sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs:342-347 | sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs:424-429 | sui-execution/historical-versions/v1/sui-move-natives/src/test_scenario.rs:337-342 | sui-execution/historical-versions/v1/sui-move-natives/src/test_scenario.rs:419-424 | sui-execution/historical-versions/v2/sui-move-natives/src/test_scenario.rs:339-344 | sui-execution/historical-versions/v2/sui-move-natives/src/test_scenario.rs:421-426 — before extracting anything, compare `sui-execution/historical-versions/v0/sui-move-natives/src/test_scenario.rs` and `sui-execution/historical-versions/v1/sui-move-natives/src/test_scenario.rs` as WHOLE FILES: this scan already matched 35 separate duplicated blocks between them, totalling at least 619 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.
D5 · Coupling · Unstable project move-cli · ×1
  • Unstable project move-cli — move-cli has instability 0.91 with 2 dependents.
D5 · Coupling · Unstable project move-coverage · ×1
  • Unstable project move-coverage — move-coverage has instability 0.82 with 2 dependents.
D5 · Coupling · Unstable project move-decompiler · ×1
  • Unstable project move-decompiler — move-decompiler has instability 0.89 with 1 dependents.
D5 · Coupling · Unstable project move-stackless-bytecode-2 · ×1
  • Unstable project move-stackless-bytecode-2 — move-stackless-bytecode-2 has instability 0.89 with 1 dependents.
D5 · Coupling · Unstable project simulacrum · ×1
  • Unstable project simulacrum — simulacrum has instability 0.85 with 2 dependents.
D5 · Coupling · Unstable project sui-adapter-latest · ×1
  • Unstable project sui-adapter-latest — sui-adapter-latest has instability 0.89 with 2 dependents.
D5 · Coupling · Unstable project sui-adapter-v0 · ×1
  • Unstable project sui-adapter-v0 — sui-adapter-v0 has instability 0.93 with 1 dependents.
D5 · Coupling · Unstable project sui-adapter-v1 · ×1
  • Unstable project sui-adapter-v1 — sui-adapter-v1 has instability 0.93 with 1 dependents.
D5 · Coupling · Unstable project sui-adapter-v2 · ×1
  • Unstable project sui-adapter-v2 — sui-adapter-v2 has instability 0.93 with 1 dependents.
D5 · Coupling · Unstable project sui-adapter-v3 · ×1
  • Unstable project sui-adapter-v3 — sui-adapter-v3 has instability 0.95 with 1 dependents.
D5 · Coupling · Unstable project sui-execution · ×1
  • Unstable project sui-execution — sui-execution has instability 0.83 with 8 dependents.
D5 · Coupling · Unstable project sui-faucet · ×1
  • Unstable project sui-faucet — sui-faucet has instability 0.88 with 1 dependents.
D5 · Coupling · Unstable project sui-indexer-alt · ×1
  • Unstable project sui-indexer-alt — sui-indexer-alt has instability 0.89 with 1 dependents.
D5 · Coupling · Unstable project sui-indexer-alt-consistent-store · ×1
  • Unstable project sui-indexer-alt-consistent-store — sui-indexer-alt-consistent-store has instability 0.91 with 1 dependents.
D5 · Coupling · Unstable project sui-indexer-alt-graphql · ×1
  • Unstable project sui-indexer-alt-graphql — sui-indexer-alt-graphql has instability 0.95 with 1 dependents.
D5 · Coupling · Unstable project sui-indexer-alt-reader · ×1
  • Unstable project sui-indexer-alt-reader — sui-indexer-alt-reader has instability 0.85 with 2 dependents.
D5 · Coupling · Unstable project sui-kvstore · ×1
  • Unstable project sui-kvstore — sui-kvstore has instability 0.82 with 2 dependents.
D5 · Coupling · Unstable project sui-move · ×1
  • Unstable project sui-move — sui-move has instability 0.95 with 1 dependents.
D5 · Coupling · Unstable project sui-node · ×1
  • Unstable project sui-node — sui-node has instability 0.96 with 1 dependents.
D5 · Coupling · Unstable project sui-replay-2 · ×1
  • Unstable project sui-replay-2 — sui-replay-2 has instability 0.95 with 1 dependents.
D5 · Coupling · Unstable project sui-rpc-store · ×1
  • Unstable project sui-rpc-store — sui-rpc-store has instability 0.82 with 2 dependents.
D5 · Coupling · Unstable project sui-source-verification · ×1
  • Unstable project sui-source-verification — sui-source-verification has instability 0.94 with 1 dependents.
D5 · Coupling · Unstable project sui-surfer · ×1
  • Unstable project sui-surfer — sui-surfer has instability 0.90 with 1 dependents.
D5 · Coupling · Unstable project sui-swarm · ×1
  • Unstable project sui-swarm — sui-swarm has instability 0.92 with 1 dependents.
D5 · Coupling · Unstable project sui-verifier-v0 · ×1
  • Unstable project sui-verifier-v0 — sui-verifier-v0 has instability 0.82 with 2 dependents.
D5 · Coupling · Unstable project sui-verifier-v2 · ×1
  • Unstable project sui-verifier-v2 — sui-verifier-v2 has instability 0.82 with 2 dependents.
D5 · Coupling · Unstable project sui-verifier-v3 · ×1
  • Unstable project sui-verifier-v3 — sui-verifier-v3 has instability 0.82 with 2 dependents.
D8 · Code Coverage · Coverage not measured · ×1
  • Coverage not measured — JavaScript/TypeScript suite — Coverage NOT MEASURED: the JavaScript/TypeScript half could not be measured — external-crates/move/crates/move-analyzer/prettier-plugin/ runs mocha but declares no coverage provider, so the suite can run and still produce no lcov — add `c8` (or `nyc`) as a devDependency so the suite can be wrapped for coverage. Coverage is excluded from the score rather than counted as a near-zero. The named suite step is one the repository's maintainers can perform; once it passes, the real number is measured on the next scan. Alternatively, commit the lcov/Cobertura report your CI produces and it is read without a re-run.
P12 · CI test-gate honesty · Coverage collected but not gated · ×1
  • Coverage collected but not gated — CI collects a coverage report but no step enforces a minimum — coverage could halve and CI stays green. Add a step that fails the build when coverage drops below a floor (your coverage tool's minimum-threshold flag, or a coverage-gate action) so the number guards something. What was searched, so you can tell an absence from a miss: this repository's CI files AND its coverage configuration — the well-known coverage and test-runner config files, read at the repository root and inside workspace package directories two levels down, so a floor declared beside the tests rather than in the pipeline is credited — matched against the threshold settings this check knows by name. A floor set in your coverage service's web UI rather than in a committed file, or under a setting whose name is not one of those, is not seen here.
P5 · DR & Backup · No DR/backup evidence · ×1
  • No DR/backup evidence — A persistence guard (data volume / purge-protection) was found, but no backup, geo-recovery or RTO/RPO controls were evidenced — a volume that survives a container recreate is not a tested restore from catastrophic loss.
S1 · Web-Security Posture · Third-party script without Subresource Integrity · ×1
  • Third-party script without Subresource Integrity crates/sui-indexer-alt-graphql/assets/graphiql.html:10 — `https://unpkg.com/react@18.3.1/umd/react.production.min.js` is executed by this page with no Subresource Integrity. Whoever can answer that request — the CDN, anyone who compromises it, anyone on the network path — runs arbitrary script in this page's origin, with its session. 4 such include(s) across the repository's markup.
X1 · Async correctness · Blocking `sleep` inside an `async` body · ×1
  • Blocking `sleep` inside an `async` body crates/sui/src/zklogin_commands_util.rs:125 — This `async` body is polled on an executor's worker thread, and `std::thread::sleep` blocks that thread: for the whole delay no other task scheduled on it makes progress — the Rust form of blocking on a task. Use `tokio::time::sleep(…).await` (or the runtime's own timer), which suspends only this task. Where the blocking work is not a sleep but a synchronous call that cannot be made async, move it off the executor with `tokio::task::spawn_blocking(…).await`.
Minor — 186 finding(s)
D34 · Knowledge Freshness · Orphaned file · ×70
  • Orphaned file crates/sui-types/src/bridge.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file crates/sui-snapshot/src/writer.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file crates/sui-indexer-alt/src/handlers/cp_bloom_blocks.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file REDACTED:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file crates/sui-snapshot/src/lib.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file crates/sui-bridge/src/sui_syncer.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file crates/sui-proxy/src/consumer.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file crates/sui-proxy/src/prom_to_mimir.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file crates/sui/src/genesis_inspector.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file crates/sui-light-client/src/verifier.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file crates/sui-indexer-alt/src/handlers/cp_blooms.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file crates/sui-indexer-alt-schema/src/blooms/blocked.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file crates/sui-bridge/src/storage.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file crates/sui-light-client/src/proof/ocs.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file crates/mysten-metrics/src/metered_channel.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file crates/sui-storage/src/lib.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file crates/sui-benchmark/src/workloads/batch_payment.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file crates/sui-benchmark/src/workloads/expected_failure.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file crates/sui-swarm-config/src/test_utils.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file crates/sui-proxy/src/histogram_relay.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file crates/sui-bridge-indexer/src/progress.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file crates/sui-benchmark/src/workloads/transfer_object.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file crates/sui-benchmark/src/in_memory_wallet.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file crates/sui-bridge-indexer-alt/src/handlers/governance_action_handler.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file crates/sui-bridge-indexer/src/main.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • + 45 more in this group — see findings.md.
X4 · Structured logging · Interpolated log message defeats structured logging · ×40
  • Interpolated log message defeats structured logging sui-execution/src/latest.rs:347 — `debug!` at line 347 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging sui-execution/src/latest.rs:355 — `debug!` at line 355 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging sui-execution/src/v0.rs:313 — `error!` at line 313 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging sui-execution/src/v0.rs:321 — `debug!` at line 321 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging sui-execution/src/v0.rs:329 — `debug!` at line 329 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging sui-execution/src/v1.rs:307 — `error!` at line 307 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging sui-execution/src/v1.rs:315 — `debug!` at line 315 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging sui-execution/src/v1.rs:323 — `debug!` at line 323 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging sui-execution/src/v2.rs:307 — `error!` at line 307 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging sui-execution/src/v2.rs:315 — `debug!` at line 315 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging sui-execution/src/v2.rs:323 — `debug!` at line 323 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging sui-execution/src/v3.rs:318 — `error!` at line 318 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging sui-execution/src/v3.rs:327 — `debug!` at line 327 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging sui-execution/src/v3.rs:335 — `debug!` at line 335 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging sui-execution/latest/sui-move-natives/src/config.rs:140 — `error!` at line 140 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging sui-execution/latest/sui-move-natives/src/object_runtime/mod.rs:733 — `error!` at line 733 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging sui-execution/latest/sui-adapter/src/execution_engine.rs:349 — `trace!` at line 349 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `trace!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging sui-execution/latest/sui-adapter/src/execution_engine.rs:1181 — `trace!` at line 1181 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `trace!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging sui-execution/latest/sui-adapter/src/execution_engine.rs:1920 — `info!` at line 1920 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging sui-execution/latest/sui-adapter/src/execution_engine.rs:1975 — `info!` at line 1975 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging sui-execution/latest/sui-adapter/src/execution_engine.rs:2029 — `error!` at line 2029 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging sui-execution/latest/sui-adapter/src/execution_engine.rs:2082 — `info!` at line 2082 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging sui-execution/latest/sui-adapter/src/execution_engine.rs:2112 — `info!` at line 2112 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging sui-execution/latest/sui-adapter/src/temporary_store.rs:961 — `debug!` at line 961 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging sui-execution/historical-versions/v3/sui-move-natives/src/config.rs:139 — `error!` at line 139 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • + 15 more in this group — see findings.md.
X10 · Duplicated predicate · Duplicated predicate · ×25
  • Duplicated predicate sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/drop_safety.rs:418 — `!abilities.has_drop() && !Mode::allow_arbitrary_values()` appears character-identically in 2 files — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/drop_safety.rs, sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/verify/drop_safety.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 sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/private_entry_arguments.rs:522 — `!abilities.has_drop() && !abilities.has_store()` appears character-identically in 2 files — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/private_entry_arguments.rs, sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/verify/private_entry_arguments.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 crates/sui-rosetta/src/types/internal_operation/pay_coin.rs:337 — `!coins.is_empty() || !party_coins.is_empty()` appears character-identically in 3 files — crates/sui-rosetta/src/types/internal_operation/pay_coin.rs, crates/sui-rosetta/src/types/internal_operation/pay_sui.rs, crates/sui-rosetta/src/types/internal_operation/stake.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 REDACTED:923 — `!disallow_new_modules || new_normalized.is_empty()` appears character-identically in 2 files — REDACTED, sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/context.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 sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/type_check.rs:294 — `!drop_value || result_ty.abilities().has_drop()` appears character-identically in 2 files — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/type_check.rs, sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/invariant_checks/type_check.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 consensus/core/src/block_sync_service.rs:91 — `!fetch_after_rounds.is_empty() && !block_refs.is_empty()` appears character-identically in 2 files — consensus/core/src/block_sync_service.rs, consensus/core/src/network/tonic_network.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 REDACTED:1046 — `!from_init && function == INIT_FN_NAME && context.protocol_config.ban_entry_init()` appears character-identically in 4 files — REDACTED, REDACTED, REDACTED, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate sui-execution/historical-versions/v3/sui-verifier/src/entry_points_verifier.rs:63 — `!func_def.is_entry || verifier_config.disable_entry_point_signature_check` appears character-identically in 2 files — sui-execution/historical-versions/v3/sui-verifier/src/entry_points_verifier.rs, sui-execution/latest/sui-verifier/src/entry_points_verifier.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 sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs:307 — `!is_genesis_tx && !Mode::skip_conservation_checks()` appears character-identically in 3 files — sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs, sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs, sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.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 sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/loading/translate.rs:77 — `!is_withdrawal_compatibility_input || matches!(arg, CallArg::FundsWithdrawal(_))` appears character-identically in 2 files — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/loading/translate.rs, sui-execution/latest/sui-adapter/src/static_programmable_transactions/loading/translate.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 crates/sui-inverted-index/src/bitmap_query/iter.rs:352 — `!scan_limited && frontier_advanced(progress_frontier, floor_pos, direction)` appears character-identically in 2 files — crates/sui-inverted-index/src/bitmap_query/iter.rs, crates/sui-inverted-index/src/bitmap_query/stream.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 sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs:534 — `!self.execution_results.written_objects.contains_key(id) && !self.execution_results.deleted_object_ids.contains(id)` appears character-identically in 2 files — sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.rs, sui-execution/historical-versions/v2/sui-adapter/src/temporary_store.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 REDACTED:1384 — `Mode::allow_arbitrary_values() || !abilities.has_key()` appears character-identically in 4 files — REDACTED, REDACTED, REDACTED, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/context.rs:628 — `abilities.has_drop() || (abilities.has_copy() && matches!(last_usage_kind, Some(UsageKind::ByValue)))` appears character-identically in 4 files — sui-execution/historical-versions/v0/sui-adapter/src/programmable_transactions/context.rs, sui-execution/historical-versions/v1/sui-adapter/src/programmable_transactions/context.rs, sui-execution/historical-versions/v2/sui-adapter/src/programmable_transactions/context.rs, sui-execution/historical-versions/v3/sui-adapter/src/programmable_transactions/context.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 sui-execution/historical-versions/v3/sui-move-natives/src/test_scenario.rs:299 — `all_wrapped.contains(id) || all_active_child_objects_with_values.contains(id)` appears character-identically in 2 files — sui-execution/historical-versions/v3/sui-move-natives/src/test_scenario.rs, sui-execution/latest/sui-move-natives/src/test_scenario.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 sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/drop_safety.rs:246 — `ast.gas_coin.is_none() && env.protocol_config.gasless_transaction_drop_safety()` appears character-identically in 2 files — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/drop_safety.rs, sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/memory_safety.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 sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/drop_safety.rs:133 — `ast.withdrawal_compatibility_conversions.is_empty() || env.protocol_config.enable_accumulators()` appears character-identically in 2 files — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/drop_safety.rs, sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/verify/drop_safety.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 sui-execution/historical-versions/v0/sui-adapter/src/temporary_store.rs:553 — `authenticated_objs.contains(id) || gas_objs.contains(id)` appears character-identically in 2 files — sui-execution/historical-versions/v0/sui-adapter/src/temporary_store.rs, sui-execution/historical-versions/v1/sui-adapter/src/temporary_store.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 REDACTED:892 — `disallow_new_modules && existing_modules_len != upgrading_modules_len` appears character-identically in 2 files — REDACTED, sui-execution/latest/sui-adapter/src/static_programmable_transactions/execution/context.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 sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/input_arguments.rs:225 — `dt.qualified_ident() == RESOLVED_RECEIVING_STRUCT && dt.type_arguments.len() == 1 && dt.type_arguments.first().unwrap().abilities().has_key(…` appears character-identically in 2 files — sui-execution/historical-versions/v3/sui-adapter/src/static_programmable_transactions/typing/verify/input_arguments.rs, sui-execution/latest/sui-adapter/src/static_programmable_transactions/typing/verify/input_arguments.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 crates/sui-benchmark/src/workloads/large_transaction.rs:53 — `effects.is_ok() || effects.is_cancelled()` appears character-identically in 2 files — crates/sui-benchmark/src/workloads/large_transaction.rs, crates/sui-benchmark/src/workloads/slow.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 sui-execution/historical-versions/v0/sui-adapter/src/execution_engine.rs:130 — `enable_expensive_checks && !Mode::allow_arbitrary_function_calls()` appears character-identically in 5 files — sui-execution/historical-versions/v0/sui-adapter/src/execution_engine.rs, sui-execution/historical-versions/v1/sui-adapter/src/execution_engine.rs, sui-execution/historical-versions/v2/sui-adapter/src/execution_engine.rs, sui-execution/historical-versions/v3/sui-adapter/src/execution_engine.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 crates/sui-consistent-store/codegen.rs:71 — `entry.file_type().is_file() && entry.path().extension() == Some(proto_ext)` appears character-identically in 2 files — crates/sui-consistent-store/codegen.rs, crates/sui-rpc-store/codegen.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 crates/sui-bridge-indexer/src/eth_bridge_indexer.rs:396 — `err_str.contains("query returned more than") || err_str.contains("-32005") || err_str.contains("32005")` appears character-identically in 2 files — crates/sui-bridge-indexer/src/eth_bridge_indexer.rs, crates/sui-bridge/src/eth_syncer.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 sui-execution/historical-versions/v0/sui-verifier/src/one_time_witness_verifier.rs:61 — `field_count == 1 && def.field(0).unwrap().signature.0 == SignatureToken::Bool` appears character-identically in 5 files — sui-execution/historical-versions/v0/sui-verifier/src/one_time_witness_verifier.rs, sui-execution/historical-versions/v1/sui-verifier/src/one_time_witness_verifier.rs, sui-execution/historical-versions/v2/sui-verifier/src/one_time_witness_verifier.rs, sui-execution/historical-versions/v3/sui-verifier/src/one_time_witness_verifier.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.
D16 · Bus Factor · Off-boarding risk · ×12
  • Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 27 significant file(s) lose their only recent owner: crates/sui-kv-rpc/src/pipeline.rs, crates/sui-kvstore/src/bigtable/client/flow_control.rs, crates/sui-rpc-api/src/subscription/mod.rs, crates/sui-inverted-index/src/bitmap_query/mod.rs, crates/sui-kvstore/src/store/bitmap_committer/tests.rs, crates/sui-rpc-api/src/subscription/matcher.rs, crates/sui-inverted-index/src/dimensions.rs, crates/sui-kvstore/src/store/mod.rs (+19 more). Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #2 — If anonymized user #2 becomes unavailable, 27 significant file(s) lose their only recent owner: crates/sui-display/src/v2/mod.rs, crates/sui-display/src/v2/parser.rs, crates/sui-display/src/v2/value.rs, crates/sui-display/src/v2/lexer.rs, crates/sui-indexer-alt-reader/src/object_versions.rs, crates/sui-indexer-alt-graphql/src/api/types/move_module.rs, crates/sui-display/src/v2/interpreter.rs, crates/sui-indexer-alt-consistent-store/src/db/map.rs (+19 more). Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #3 — If anonymized user #3 becomes unavailable, 23 significant file(s) lose their only recent owner: crates/sui-rpc-store/src/reader/indexes.rs, crates/sui-rpc-store/src/indexer/restore.rs, crates/sui-consistent-store/src/restore/driver.rs, crates/sui-rpc-store/src/indexer/object_version_by_checkpoint.rs, crates/sui-rpc-api/src/grpc/v2/transaction_execution_service/simulate/resolve/literal.rs, crates/sui-rpc-store/src/schema/object_version_by_checkpoint.rs, crates/sui-rpc-store/src/schema/epochs.rs, crates/sui-rpc-store/src/schema/object_by_owner.rs (+15 more). Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #4 — If anonymized user #4 becomes unavailable, 14 significant file(s) lose their only recent owner: crates/sui-indexer-alt-graphql/src/task/streaming/checkpoint_stream_task.rs, crates/sui-indexer-alt-graphql/src/task/streaming/gap_recovery.rs, crates/sui-indexer-alt-graphql/src/metrics/subscription.rs, crates/sui-indexer-alt-graphql/src/task/streaming/lifecycle.rs, crates/sui-indexer-alt-graphql/src/throttle.rs, crates/sui-indexer-alt-graphql/src/task/streaming/streamed_package_store.rs, crates/sui-indexer-alt-graphql/src/api/subscription/checkpoints.rs, crates/sui-indexer-alt-graphql/src/task/streaming/test_utils.rs (+6 more). Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #5 — If anonymized user #5 becomes unavailable, 11 significant file(s) lose their only recent owner: crates/sui-fork/src/gql/queries.rs, crates/sui-fork/src/gql/client.rs, crates/sui-fork/src/local_store.rs, crates/sui-fork/src/seed.rs, crates/sui-fork/src/pending.rs, crates/sui-fork/src/cli.rs, crates/sui-fork/src/remote.rs, crates/sui-fork/src/rpc/executor.rs (+3 more). Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #6 — If anonymized user #6 becomes unavailable, 7 significant file(s) lose their only recent owner: scripts/dual_replay.py, sui-execution/latest/sui-adapter/src/static_programmable_transactions/linkage/single_linkage.rs, crates/sui-types/src/metrics.rs, sui-execution/latest/sui-adapter/src/static_programmable_transactions/linkage/resolution.rs, sui-execution/latest/sui-move-natives/src/address.rs, sui-execution/latest/sui-adapter/src/static_programmable_transactions/linkage/resolved_linkage.rs, crates/sui-execution-backtest/src/graphql.rs. Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #7 — If anonymized user #7 becomes unavailable, 6 significant file(s) lose their only recent owner: crates/sui-protocol-config/src/reachability.rs, crates/sui-core/src/execution_scheduler/funds_withdraw_scheduler/address_funds/scheduler.rs, crates/sui-core/src/execution_scheduler/funds_withdraw_scheduler/address_funds/eager_scheduler/mod.rs, crates/sui-core/src/execution_scheduler/funds_withdraw_scheduler/address_funds/naive_scheduler.rs, crates/sui-core/src/accumulators/unsettled_object_withdrawals.rs, crates/sui-core/src/execution_scheduler/funds_withdraw_scheduler/address_funds/mod.rs. Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #8 — If anonymized user #8 becomes unavailable, 6 significant file(s) lose their only recent owner: crates/sui-network/src/endpoint_manager.rs, scripts/simtest/collect-failures.py, crates/sui-network/src/discovery/server.rs, crates/mysten-common/src/zip_debug_eq.rs, crates/sui-network/src/randomness/builder.rs, crates/sui-network/src/discovery/metrics.rs. Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #9 — If anonymized user #9 becomes unavailable, 4 significant file(s) lose their only recent owner: crates/sui-core/src/execution_cache/cache_types.rs, scripts/sparse-checkout.py, crates/mysten-common/src/sync/oneshot.rs, crates/sui-core/src/accumulators/transaction_rewriting.rs. Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #10 — If anonymized user #10 becomes unavailable, 4 significant file(s) lose their only recent owner: crates/sui-rpc-api/src/grpc/v2/move_package_service/conversions.rs, crates/sui-rpc-api/src/grpc/v2/move_package_service/get_package.rs, crates/sui-rpc-api/src/grpc/v2/move_package_service/list_package_versions.rs, crates/sui-rpc-api/src/grpc/v2/move_package_service/mod.rs. Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #11 — If anonymized user #11 becomes unavailable, 3 significant file(s) lose their only recent owner: consensus/core/src/observer_service.rs, crates/sui-benchmark/src/workloads/gas_double_spend.rs, crates/sui-types/src/node_role.rs. Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #12 — If anonymized user #12 becomes unavailable, 3 significant file(s) lose their only recent owner: crates/sui-source-verification/src/binary.rs, crates/sui-source-verification/src/lib.rs, crates/sui-source-verification/src/prebuilt.rs. Pair on, review, or document these before any departure.
X7 · Silent fallback defaults · Silent fallback default on Err · ×8
  • Silent fallback default on Err crates/sui-framework-snapshot/src/lib.rs:76 — `load_bytecode_snapshot_manifest` turns every `Err` into `SnapshotManifest::default()` — 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 crates/sui-package-alt/src/sui_flavor.rs:72 — `with_client` turns every `Err` into `Self::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 crates/sui-source-verification/src/pinning.rs:23 — `moving_revisions` turns every `Err` into `vec![]` — 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 crates/sui-source-verification/src/pinning.rs:31 — `moving_revisions_in` turns every `Err` into `vec![]` — 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 crates/sui-tool/src/db_shell/completion.rs:106 — `complete_path` turns every `Err` into `vec![]` — 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 crates/sui-types/src/committee.rs:328 — `weight` 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 external-crates/move/crates/move-command-line-common/src/env.rs:20 — `read_env_var` 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 external-crates/move/crates/move-unit-test/src/test_reporter.rs:246 — `report_exec_state` turns every `Err` into `"\tmalformed stack trace (no source map)".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.
D30 · Dependency Vulnerabilities · Low CVE · ×6
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
M4 · Documentation accuracy · README/code drift · ×4
  • README/code drift crates/sui-types/src/README.md:14 — crates/sui-types/src/README.md links to `signature_seed.rs`, but `crates/sui-types/src/signature_seed.rs` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift crates/sui-types/src/README.md:17 — crates/sui-types/src/README.md links to `messages.rs`, but `crates/sui-types/src/messages.rs` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift external-crates/move/crates/move-docgen/README.md:1 — external-crates/move/crates/move-docgen/README.md links to `../doc/user/docgen.md`, but `external-crates/move/crates/doc/user/docgen.md` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift external-crates/move/crates/move-unit-test/README.md:19 — external-crates/move/crates/move-unit-test/README.md links to `../../move-compiler/src/unit_test/mod.rs`, but `external-crates/move/move-compiler/src/unit_test/mod.rs` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
D31 · IaC & Container Security · Low IaC · ×3
  • REDACTED
  • REDACTED
  • REDACTED
X9 · Subsumed condition operand · Subsumed condition operand · ×2
  • Subsumed condition operand crates/sui-bridge-indexer/src/eth_bridge_indexer.rs:397 — `err_str.contains("-32005")` can never decide this `||` — every value satisfying `err_str.contains("-32005")` also satisfies `err_str.contains("32005")`, so the `||` chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident.
  • Subsumed condition operand crates/sui-bridge/src/eth_syncer.rs:169 — `err_str.contains("-32005")` can never decide this `||` — every value satisfying `err_str.contains("-32005")` also satisfies `err_str.contains("32005")`, so the `||` chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident.
C2 · Access Controls · No named authorization policies · ×1
  • No named authorization policies — Authorization IS enforced here (by route guards, auth middleware or checks that refuse a caller) — this is NOT a claim that endpoints are unprotected. What's missing is a NAMED rule set: who may do what is encoded inline where it is checked, so the rules can't be listed, reviewed or tested apart from the code that applies them. Recommendation, not a defect.
D16 · Bus Factor · Further sole-owners (lower concentration) · ×1
  • Further sole-owners (lower concentration) — 9 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold — folded into the bus-factor score and metrics (147 single-owned of 1458 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 1458 of the 1877 production source files in this repository met that bar). They are anonymized user #13 (2 file(s)), anonymized user #14 (2 file(s)), anonymized user #15 (2 file(s)), anonymized user #16 (1 file(s)), anonymized user #17 (1 file(s)), anonymized user #18 (1 file(s)) (+3 more) — spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: crates/typed-store/src/tidehunter_util.rs, crates/sui-core/src/authority/finalized_transactions_cache.rs, crates/sui-benchmark/src/workloads/large_transaction.rs, crates/sui-light-client/src/authenticated_events/mmr.rs, sui-execution/latest/sui-adapter/src/static_programmable_transactions/metering/typing/live_references.rs, crates/sui-move/src/format.rs, crates/sui-futures/src/timeout_trace.rs, crates/sui-keys/src/key_derive.rs (+4 more).
D20 · ADR Quality · ADR has no Decision section · ×1
  • ADR has no Decision section external-crates/move/crates/move-package/design/dvx-2115-address-identity.md:1 — external-crates/move/crates/move-package/design/dvx-2115-address-identity.md has no Decision section (a heading such as `## Decision`, or the MADR equivalent). A decision record states the context that forced it, the decision and its consequences, so a reader can tell later whether it still holds.
D26 · Project Cohesion · Projects may be oversized for their cohesion · ×1
  • Projects may be oversized for their cohesion — 10 of 192 project(s) overshoot their size bounds, lowering Project Cohesion to 9.0/10. The most over is `crates/sui-core` (76513 LoC, 343 module-visible types across 16 directories). Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
D28 · Secrets (history) · Rotate the exposed credentials · ×1
  • REDACTED
D34 · Knowledge Freshness · Further orphaned files (smaller) · ×1
  • Further orphaned files (smaller) — 70 smaller file(s) also have no living knowledge — folded into the freshness score and metrics rather than raised one row each — most significant first: crates/sui-types/src/bridge.rs, crates/sui-snapshot/src/writer.rs, crates/sui-indexer-alt/src/handlers/cp_bloom_blocks.rs, REDACTED, crates/sui-snapshot/src/lib.rs, crates/sui-bridge/src/sui_syncer.rs, crates/sui-proxy/src/consumer.rs, crates/sui-proxy/src/prom_to_mimir.rs (and 62 more) (73 orphaned of 1458 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 1458 of the 1877 production source files in this repository met that bar). Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
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.
D41 · Kernel & Syscall Confinement · No seccomp profile · ×1
  • No seccomp profile REDACTED:28 — The workload runs a container with no seccomp profile in force (neither RuntimeDefault nor a Localhost profile, on the container or the pod), so Kubernetes runs it Unconfined. Seccomp blocks the syscalls a container never needs, shrinking the kernel attack surface a container escape would use.
M2 · Architecture documentation · ADRs not easily discoverable · ×1
  • ADRs not easily discoverable — 1 ADR-shaped document(s) detected by content — `external-crates/move/crates/move-package/design/dvx-2115-address-identity.md`. They are not under a conventional ADR folder (docs/adr/) and are not named NNNN-title.md, and this check found them by their decision signature rather than by where they live — so a reader who does not already know these paths has no route to them. Detected by content signature only: records kept outside the repository, or written without a Status/Decision/Consequences shape, are not visible to this check and are not counted here.
P2 · Observability · Logging is not universal · ×1
  • Logging is not universal — Only 83/93 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `consensus/config`, `crates/anemo-benchmark`, `crates/sui-framework-snapshot`, `crates/sui-move-lsp`, `crates/sui-test-validator` and 5 more.
P4 · Deployment & Rollback · No rollback/health safety · ×1
  • No rollback/health safety — Deployment automation exists but no readiness/liveness probes, rolling-update strategy, lifecycle hooks or migration job were evidenced — a bad release is harder to detect and reverse.
S1 · Web-Security Posture · No security response headers detected · ×1
  • No security response headers detected — None of the 11 security response headers the OWASP Secure Headers Project recommends (Content-Security-Policy, Strict-Transport-Security, X-Content-Type-Options, X-Frame-Options, …) is set on a response this repository's Rust server sends — defense in depth, even when a proxy could set them. (−2.0 on this card.) The server: `axum::serve(` (crates/sui-rpc-api/src/lib.rs:331).
Minor — 103 finding(s)
D12 · Dependency Hygiene · Outdated · ×102
  • Outdated: anyhow — `anyhow` is locked at 1.0.103 but 1.0.104 is the current stable release on crates.io, and it already satisfies the `"1.0.71"` requirement declared in consensus/core/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p anyhow` and commit the updated REDACTED.
  • Outdated: append-only-vec — `append-only-vec` is locked at 0.1.7 but 0.1.10 is the current stable release on crates.io, and it already satisfies the `"0.1.7"` requirement declared in external-crates/move/crates/move-package/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p append-only-vec` and commit the updated REDACTED.
  • Outdated: arbitrary — `arbitrary` is locked at 1.3.0 but 1.5.0 is the current stable release on crates.io, and it already satisfies the `"1.1.7"` requirement declared in external-crates/move/crates/bytecode-verifier-libfuzzer/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p arbitrary` and commit the updated REDACTED.
  • Outdated: arc-swap — `arc-swap` is locked at 1.6.0 but 1.9.3 is the current stable release on crates.io, and it already satisfies the `"1.5.1"` requirement declared in consensus/core/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p arc-swap` and commit the updated REDACTED.
  • Outdated: async-recursion — `async-recursion` is locked at 1.0.4 but 1.2.0 is the current stable release on crates.io, and it already satisfies the `"1.0.4"` requirement declared in crates/sui/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p async-recursion` and commit the updated REDACTED.
  • Outdated: async-trait — `async-trait` is locked at 0.1.89 but 0.1.92 is the current stable release on crates.io, and it already satisfies the `"0.1.61"` requirement declared in consensus/core/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p async-trait` and commit the updated REDACTED.
  • Outdated: aws-config — `aws-config` is locked at 1.8.12 but 1.13.0 is the current stable release on crates.io, and it already satisfies the `"1.8"` requirement declared in crates/sui/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p aws-config` and commit the updated REDACTED.
  • Outdated: aws-sdk-kms — `aws-sdk-kms` is locked at 1.98.0 but 1.127.0 is the current stable release on crates.io, and it already satisfies the `"1.97"` requirement declared in crates/sui/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p aws-sdk-kms` and commit the updated REDACTED.
  • Outdated: axum — `axum` is locked at 0.8.3 but 0.8.9 is the current stable release on crates.io, and it already satisfies the `"0.8"` requirement declared in crates/mysten-metrics/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p axum` and commit the updated REDACTED.
  • Outdated: bumpalo — `bumpalo` is locked at 3.19.1 but 3.20.3 is the current stable release on crates.io, and it already satisfies the `"3.17.0"` requirement declared in external-crates/move/crates/move-vm-runtime/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p bumpalo` and commit the updated REDACTED.
  • Outdated: bytes — `bytes` is locked at 1.11.1 but 1.12.1 is the current stable release on crates.io, and it already satisfies the `"1.11.1"` requirement declared in consensus/core/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p bytes` and commit the updated REDACTED.
  • Outdated: camino — `camino` is locked at 1.1.9 but 1.2.6 is the current stable release on crates.io, and it already satisfies the `"1.1.1"` requirement declared in crates/sui-genesis-builder/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p camino` and commit the updated REDACTED.
  • Outdated: cc — `cc` is locked at 1.2.51 but 1.10.0 is the current stable release on crates.io, and it already satisfies the `"1"` requirement declared in crates/typed-store-workspace-hack/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p cc` and commit the updated REDACTED.
  • Outdated: cfg-if — `cfg-if` is locked at 1.0.4 but 1.0.5 is the current stable release on crates.io, and it already satisfies the `"1.0.0"` requirement declared in consensus/core/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p cfg-if` and commit the updated REDACTED.
  • Outdated: chrono — `chrono` is locked at 0.4.44 but 0.4.45 is the current stable release on crates.io, and it already satisfies the `"0.4.44"` requirement declared in crates/sui-analytics-indexer/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p chrono` and commit the updated REDACTED.
  • Outdated: ciborium — `ciborium` is locked at 0.2.0 but 0.2.2 is the current stable release on crates.io, and it already satisfies the `"0.2"` requirement declared in crates/sui-types/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p ciborium` and commit the updated REDACTED.
  • Outdated: clap — `clap` is locked at 4.5.4 but 4.6.7 is the current stable release on crates.io, and it already satisfies the `"4.1.4"` requirement declared in crates/anemo-benchmark/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p clap` and commit the updated REDACTED.
  • Outdated: clap_complete — `clap_complete` is locked at 4.5.3 but 4.6.11 is the current stable release on crates.io, and it already satisfies the `"4.4"` requirement declared in crates/sui/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p clap_complete` and commit the updated REDACTED.
  • Outdated: crossbeam — `crossbeam` is locked at 0.8.4 but 0.8.5 is the current stable release on crates.io, and it already satisfies the `"0.8"` requirement declared in external-crates/move/crates/move-analyzer/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p crossbeam` and commit the updated REDACTED.
  • Outdated: crossbeam-channel — `crossbeam-channel` is locked at 0.5.15 but 0.5.17 is the current stable release on crates.io, and it already satisfies the `"0.5.0"` requirement declared in external-crates/move/crates/test-generation/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p crossbeam-channel` and commit the updated REDACTED.
  • Outdated: csv — `csv` is locked at 1.2.1 but 1.4.0 is the current stable release on crates.io, and it already satisfies the `"1.2.1"` requirement declared in crates/sui-analytics-indexer/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p csv` and commit the updated REDACTED.
  • Outdated: cynic — `cynic` is locked at 3.10.0 but 3.14.0 is the current stable release on crates.io, and it already satisfies the `"3.10.0"` requirement declared in crates/sui-data-store/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p cynic` and commit the updated REDACTED.
  • Outdated: derive-where — `derive-where` is locked at 1.2.7 but 1.7.0 is the current stable release on crates.io, and it already satisfies the `"1.2.7"` requirement declared in external-crates/move/crates/move-package/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p derive-where` and commit the updated REDACTED.
  • Outdated: diesel — `diesel` is locked at 2.3.10 but 2.3.14 is the current stable release on crates.io, and it already satisfies the `"2.3"` requirement declared in crates/sui-bridge-indexer-alt/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p diesel` and commit the updated REDACTED.
  • Outdated: diesel-async — `diesel-async` is locked at 0.9.0 but 0.9.2 is the current stable release on crates.io, and it already satisfies the `"0.9"` requirement declared in crates/sui-bridge-indexer-alt/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p diesel-async` and commit the updated REDACTED.
  • + 77 more in this group — see findings.md.
D5 · Coupling · Off the main sequence · ×1
  • Off the main sequence: mysten-common — mysten-common: abstractness 0.23, instability 0.05, distance 0.72 — the shape a shared-kernel / building-block library has BY DESIGN — concrete and widely depended-on is what makes it useful, and this dimension does not penalise it (the distance is reported for completeness, not as a defect). Worth a look only if it has grown past one coherent kernel into an everything-bucket.

Appendix B — Reproduction & audit trail

Every external tool invocation behind a deep-scan dimension — the tool, its captured version, the exact command, how many findings it yielded, and a link to the retained raw output. To reproduce any finding: check out the same commit and run the command shown (repo-relative — never an absolute scratch path). The complete raw scanner output is retained verbatim under artifacts/raw/ (indexed in artifacts/raw/index.json); per-invocation exit codes and wall-clock durations are in sidecar.json — kept out of this table so the rendered report stays byte-identical across runs of the same commit.

DimensionToolVersionCommandFindingsRaw output
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/watchdog-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-2704aedef0344347893dfe933b5f4af7/history.json --exit-code 0 --source .231artifacts/raw/gitleaks-history.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-git --no-banner --config /opt/gitleaks-rules/watchdog-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-2704aedef0344347893dfe933b5f4af7/tree.json --exit-code 0 --source .8artifacts/raw/gitleaks-tree.json
D29 · Static Analysis (SAST)semgrep—semgrep --config /opt/semgrep-rules/security-audit.yml --config /opt/semgrep-rules/owasp-top-ten.yml --config /opt/semgrep-rules/watchdog-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off --exclude *.arrow --exclude *.avro --exclude *.csv --exclude *.dat --exclude *.db --exclude *.feather --exclude *.geojson --exclude *.h5 --exclude *.hdf5 --exclude *.jsonl --exclude *.log --exclude *.ndjson --exclude *.npy --exclude *.npz --exclude *.orc --exclude *.parquet --exclude *.pickle --exclude *.pkl --exclude *.psv --exclude *.sqlite --exclude *.sqlite3 --exclude *.tfrecord --exclude *.tsv --exclude *.txt --exclude crates/sui-rpc-cursor/src/proto/generated --exclude external-crates/move/tooling/tree-sitter/src/tree_sitter .59artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** . --skip-db-update134artifacts/raw/trivy-fs.json
D31 · IaC & Container Securitytrivy—trivy config --format json --quiet .110artifacts/raw/trivy-config.json
D32 · Data Compliance (PII/GDPR)semgrep—semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that.0—
D42 · Runtime Threat Enforcementruntime-hardening—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.0—
D43 · Malicious Dependenciestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** . --skip-db-update0artifacts/raw/trivy-fs.json

Run 01a17d29-1b9e-7455-85da-6097c7269f37 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.

Downloadable artifacts

Machine-readable and reproducible from this commit + frozen rubric — drop them straight into a contract appendix, a CRA dossier, or a downstream SCA / VEX tool.

⬇ Findings, MITRE CWE-tagged .sarif⬇ Health changelog .md